diff vcf_to_alignment.xml @ 4:f58178c0f00d draft

planemo upload for repository https://github.com/sanbi-sa/tools-sanbi-uwc commit 3e5c71977e50ec920d4f45be809d2528e55bff76
author sanbi-uwc
date Mon, 15 Oct 2018 00:34:44 -0400
parents 62fbd3f96b30
children 4f3f7d390382
line wrap: on
line diff
--- a/vcf_to_alignment.xml	Fri Feb 03 05:56:11 2017 -0500
+++ b/vcf_to_alignment.xml	Mon Oct 15 00:34:44 2018 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<tool id="vcf_to_alignment" name="Generate FASTA alignment from VCF collection" version="0.3">
+<tool id="vcf_to_alignment" name="Generate FASTA alignment from VCF collection" version="0.4">
   <description>Generate a multiple sequence alignment given a collection of variants and a reference sequence</description>
   <requirements>
       <requirement type="package" version="1.67">biopython</requirement>
@@ -22,6 +22,9 @@
     #else
       '${reference.builtin.fields.path}'
     #end if
+    #if $exclude_list.do_exclude == 'yes':
+      --exclude $exclude_list.exclude_file
+    #end if
     --output_file '${output_alignment}'
     ]]>
   </command>
@@ -43,6 +46,16 @@
         </param>
       </when>
     </conditional>
+    <conditional name="exclude_list">
+      <param name="do_exclude" type="select">
+        <option value="yes">Yes</option>
+        <option value="no" selected="true">No</option>
+      </param>
+      <when value="yes">
+        <param name="exclude_file" type="data" format="bed" label="BED file with regions to exclude" />
+      </when>
+      <when value="no"></when>
+    </conditional>
   </inputs>
   <outputs>
     <data name="output_alignment" format="fasta" label="Alignment ${on_string}" />
@@ -50,6 +63,7 @@
   <tests>
     <test>
       <param name="remove_invariant_sites" value="False" />
+      <param name="do_exclude" value="no" />
       <param name="vcf_inputs">
         <collection type="list">
           <element name="vcf_inputs.vcf1" value="vcf1.vcf" />
@@ -62,6 +76,7 @@
     </test>
     <test>
       <param name="remove_invariant_sites" value="True" />
+      <param name="do_exclude" value="no" />
       <param name="vcf_inputs">
         <collection type="list">
           <element name="vcf_inputs.vcf1" value="vcf1.vcf" />
@@ -72,6 +87,20 @@
       <param name="history" value="reference.fasta" ftype="fasta" />
       <output name="output_alignment" value="output2.fasta" />
     </test>
+    <test>
+      <param name="remove_invariant_sites" value="True" />
+      <param name="do_exclude" value="yes" />
+      <param name="exclude_file" value="exclude1.bed" />
+      <param name="vcf_inputs">
+        <collection type="list">
+          <element name="vcf_inputs.vcf1" value="vcf1.vcf" />
+          <element name="vcf_inputs.vcf2" value="vcf2.vcf" />
+          <element name="vcf_inputs.vcf3" value="vcf3.vcf" />
+        </collection>
+      </param>
+      <param name="history" value="reference.fasta" ftype="fasta" />
+      <output name="output_alignment" value="output3.fasta" />
+    </test>
   </tests>
   <help><![CDATA[
     Using the SNPs identified by the VCF files given as input, generates a sequence including the