changeset 2:c7314b925161 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/vcflib/vcfvcfintersect commit 93df3895fbf2fa44ff279303093fb89b79081687
author devteam
date Thu, 15 Sep 2016 13:30:27 -0400
parents d3f4f86a18d4
children 1bc1b2b8b341
files macros.xml vcfvcfintersect.xml
diffstat 2 files changed, 129 insertions(+), 125 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Wed Nov 11 13:01:47 2015 -0500
+++ b/macros.xml	Thu Sep 15 13:30:27 2016 -0400
@@ -1,7 +1,7 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="8a5602bf07">vcflib</requirement>
+            <requirement type="package" version="1.0.0_rc1">vcflib</requirement>
             <yield/>
         </requirements>
     </xml>
@@ -10,6 +10,7 @@
             <exit_code range="1:" level="fatal" />
         </stdio>
     </xml>
+   <token name="@WRAPPER_VERSION@">1.0.0_rc1</token>
    	<xml name="citations">
    	     <citations>
              <citation type="bibtex">
--- a/vcfvcfintersect.xml	Wed Nov 11 13:01:47 2015 -0500
+++ b/vcfvcfintersect.xml	Thu Sep 15 13:30:27 2016 -0400
@@ -1,124 +1,127 @@
-<tool id="vcfvcfintersect" name="VCF-VCFintersect:" version="0.0.3">
-  <description>Intersect two VCF datasets</description>
-  <macros>
-    <import>macros.xml</import>
-  </macros>
-  <expand macro="requirements"></expand>
-  <expand macro="stdio"></expand>
-  <command>
-
-    #set $reference_fasta_filename = "localref.fa"
-    #if str( $reference_source.reference_source_selector ) == "history":
-       ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
-    #else:
-       #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
-    #end if
-    
-    #if $adv_options.adv_options_selector == True:
-    
-    vcfintersect "${adv_options.adv_options_input}" ${loci} ${invert} -r "${reference_fasta_filename}" -w "${window_size}" ${isect_union} "${vcf_input1}" "${vcf_input2}" > "${out_file1}"
-
-    #else:
-
-    vcfintersect ${loci} ${invert} -r "${reference_fasta_filename}" -w "${window_size}" ${isect_union} "${vcf_input1}" "${vcf_input2}" > "${out_file1}"   
-
-    #end if
-
-  </command>
-  <inputs>
-    <!-- selecting refernce source -->
-    <param name="vcf_input1" type="data" format="vcf" label="The first VCF dataset" />
-    <param name="vcf_input2" type="data" format="vcf" label="The second VCF dataset" help="The second dataset will be instersected with the first"/>
-    <conditional name="reference_source">
-      <param name="reference_source_selector" type="select" label="Choose the source for the reference genome" help="This tools needs to access reference genomes sequence specified by this option.">
-	<option value="cached">Locally cached</option>
-	<option value="history">History</option>
-      </param>
-      <when value="cached">
-	<param name="ref_file" type="select" label="Select reference genome">
-	  <options from_data_table="fasta_indexes">
-	    <!--<filter type="data_meta" key="dbkey" ref="input_bam" column="value"/>-->
-	  </options>
-	  <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
-	</param>
-      </when>
-      <when value="history"> <!-- FIX ME!!!! -->
-	<param name="ref_file" type="data" format="fasta" label="Using reference file" />
-      </when>
-    </conditional>
-    <param name="isect_union" type="select" label="Union or intersection" help="-i or -u">
-      <option value="-i">Intersect</option>
-      <option value="-u">Union</option>
-    </param>
-    <param name="invert" type="boolean" truevalue="-v" falsevalue="" label="Invert selection?" help="-v, --invert" />
-    <param name="window_size" type="integer" value="30" label="compare records up to this many bp away (window size)" help="-w, --window-size" />
-    <param name="loci" type="boolean" truevalue="-l" falsevalue="" label="output whole loci when one alternate allele matches" help="-l, --loci" />
-    <conditional name="adv_options">
-      <param name="adv_options_selector" type="boolean" truevalue="use_adv_controls" label="Advanced controls" help="Allows you to specify options that are not listed above"/> 
-      <when value="use_adv_controls">
-	<param name="adv_options_input" type="text" value="-t &quot;vcfvcf-intersect-result&quot;" label="Enter additional command line options described in the help section below" help="such as -m, -t, -V, -M, and -T" />
-	<sanitizer>
-	  <valid initial="string.printable">
-	    <remove value="&apos;"/>
-	  </valid>
-	  <mapping initial="none">
-	    <add source="&apos;" target="__sq__"/>
-	  </mapping>
-	</sanitizer>
-      </when>
-    </conditional>
-  </inputs>
-  <outputs>
-    <data format="vcf" name="out_file1" />
-  </outputs>
-  <tests>
-    <test>
-      <param name="reference_source_selector" value="history" />
-      <param name="vcf_input1" value="vcfvcfintersect-input1.vcf" />
-      <param name="vcf_input2" value="vcfvcfintersect-input2.vcf" />
-      <param name="isect_union" value="-i" />
-      <param name="invert" value="False" />
-      <param name="loci" value="False" />
-      <patam name="adv_options" value="False" />
-      <param name="window_size" value="30" />
-      <param name="ref_file" value="vcflib-test-genome-phix.fa" />
-      <output name="out_file1" file="vcfvcfintersect-test1.vcf"/>
-    </test>
-    <test>
-      <param name="reference_source_selector" value="history" />
-      <param name="vcf_input1" value="vcfvcfintersect-input1.vcf" />
-      <param name="vcf_input2" value="vcfvcfintersect-input2.vcf" />
-      <param name="isect_union" value="-u" />
-      <param name="invert" value="False" />
-      <param name="loci" value="False" />
-      <patam name="adv_options" value="False" />
-      <param name="window_size" value="30" />
-      <param name="ref_file" value="vcflib-test-genome-phix.fa" />
-      <output name="out_file1" file="vcfvcfintersect-test2.vcf"/>
-    </test>
-    </tests>
-  <help>
-
-Computes intersections and unions for two VCF datasets. Unifies equivalent alleles within window-size bp. 
-
-The options are::
-
-    -v, --invert              invert the selection, printing only records which would
-    -i, --intersect-vcf FILE  use this VCF for set intersection generation
-    -u, --union-vcf FILE      use this VCF for set union generation
-    -w, --window-size N       compare records up to this many bp away (default 30)
-    -l, --loci                output whole loci when one alternate allele matches
-    -m, --ref-match           intersect on the basis of record REF string
-    -t, --tag TAG             attach TAG to each record's info field if it would intersect
-    -V, --tag-value VAL       use this value to indicate that the allele is passing
-                              '.' will be used otherwise.  default: 'PASS'
-    -M, --merge-from FROM-TAG
-    -T, --merge-to   TO-TAG   merge from FROM-TAG used in the -i file, setting TO-TAG
-                              in the current file.
-
-----
-
-VCFVCFintersect is based on vcfintersect utility of VCFlib toolkit developed by Erik Garrison (https://github.com/ekg/vcflib).
-</help>
-  <expand macro="citations" />
-</tool>
+<tool id="vcfvcfintersect" name="VCF-VCFintersect:" version="@WRAPPER_VERSION@.0">
+    <description>Intersect two VCF datasets</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="stdio" />
+    <command>
+        #set $reference_fasta_filename = "localref.fa"
+        #if str( $reference_source.reference_source_selector ) == "history":
+           ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
+        #else:
+           #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
+        #end if
+
+        #if $adv_options.adv_options_selector == "use_adv_controls":
+            vcfintersect "${adv_options.adv_options_input}" ${loci} ${invert} -r "${reference_fasta_filename}" -w "${window_size}" ${isect_union} "${vcf_input1}" "${vcf_input2}" > "${out_file1}"
+        #else:
+            vcfintersect ${loci} ${invert} -r "${reference_fasta_filename}" -w "${window_size}" ${isect_union} "${vcf_input1}" "${vcf_input2}" > "${out_file1}"
+        #end if
+    </command>
+    <inputs>
+        <!-- selecting refernce source -->
+        <param name="vcf_input1" type="data" format="vcf" label="The first VCF dataset" />
+        <param name="vcf_input2" type="data" format="vcf" label="The second VCF dataset"
+            help="The second dataset will be instersected with the first"/>
+        <conditional name="reference_source">
+            <param name="reference_source_selector" type="select" label="Choose the source for the reference genome"
+                help="This tools needs to access reference genomes sequence specified by this option.">
+                <option value="cached">Locally cached</option>
+                <option value="history">History</option>
+            </param>
+            <when value="cached">
+                <param name="ref_file" type="select" label="Select reference genome">
+                    <options from_data_table="fasta_indexes">
+                    <!--<filter type="data_meta" key="dbkey" ref="input_bam" column="value"/>-->
+                    </options>
+                    <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
+                </param>
+            </when>
+            <when value="history"> <!-- FIX ME!!!! -->
+                <param name="ref_file" type="data" format="fasta" label="Using reference file" />
+            </when>
+        </conditional>
+        <param name="isect_union" type="select" label="Union or intersection" help="-i or -u">
+            <option value="-i">Intersect</option>
+            <option value="-u">Union</option>
+        </param>
+        <param name="invert" type="boolean" truevalue="-v" falsevalue="" label="Invert selection?" help="-v, --invert" />
+        <param name="window_size" type="integer" value="30"
+            label="compare records up to this many bp away (window size)" help="-w, --window-size" />
+        <param name="loci" type="boolean" truevalue="-l" falsevalue=""
+            label="output whole loci when one alternate allele matches" help="-l, --loci" />
+        <conditional name="adv_options">
+            <param name="adv_options_selector" type="select" label="Advanced controls" help="Allows you to specify options that are not listed above">
+                <option value="no">Don't use advanced options</option>
+                <option value="use_adv_controls">Use advanced options</option>
+            </param>
+            <when value="no" />
+            <when value="use_adv_controls">
+                <param name="adv_options_input" type="text" value="-t &quot;vcfvcf-intersect-result&quot;"
+                    label="Enter additional command line options described in the help section below"
+                    help="such as -m, -t, -V, -M, and -T" />
+                <sanitizer>
+                    <valid initial="string.printable">
+                        <remove value="&apos;"/>
+                    </valid>
+                    <mapping initial="none">
+                        <add source="&apos;" target="__sq__"/>
+                    </mapping>
+                </sanitizer>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data format="vcf" name="out_file1" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="vcf_input1" value="vcfvcfintersect-input1.vcf" />
+            <param name="vcf_input2" value="vcfvcfintersect-input2.vcf" />
+            <param name="reference_source_selector" value="history" />
+            <param name="ref_file" value="vcflib-test-genome-phix.fa" />
+            <param name="isect_union" value="-i" />
+            <param name="invert" value="False" />
+            <param name="loci" value="False" />
+            <patam name="adv_options_selector" value="no" />
+            <param name="window_size" value="30" />
+            <output name="out_file1" file="vcfvcfintersect-test1.vcf"/>
+        </test>
+        <test>
+            <param name="reference_source_selector" value="history" />
+            <param name="vcf_input1" value="vcfvcfintersect-input1.vcf" />
+            <param name="vcf_input2" value="vcfvcfintersect-input2.vcf" />
+            <param name="isect_union" value="-u" />
+            <param name="invert" value="False" />
+            <param name="loci" value="False" />
+            <patam name="adv_options_selector" value="no" />
+            <param name="window_size" value="30" />
+            <param name="ref_file" value="vcflib-test-genome-phix.fa" />
+            <output name="out_file1" file="vcfvcfintersect-test2.vcf"/>
+        </test>
+    </tests>
+    <help>
+Computes intersections and unions for two VCF datasets. Unifies equivalent alleles within window-size bp.
+
+The options are::
+
+    -v, --invert              invert the selection, printing only records which would
+    -i, --intersect-vcf FILE  use this VCF for set intersection generation
+    -u, --union-vcf FILE      use this VCF for set union generation
+    -w, --window-size N       compare records up to this many bp away (default 30)
+    -l, --loci                output whole loci when one alternate allele matches
+    -m, --ref-match           intersect on the basis of record REF string
+    -t, --tag TAG             attach TAG to each record's info field if it would intersect
+    -V, --tag-value VAL       use this value to indicate that the allele is passing
+                              '.' will be used otherwise.  default: 'PASS'
+    -M, --merge-from FROM-TAG
+    -T, --merge-to   TO-TAG   merge from FROM-TAG used in the -i file, setting TO-TAG
+                              in the current file.
+
+----
+
+VCFVCFintersect is based on vcfintersect utility of VCFlib toolkit developed by Erik Garrison (https://github.com/ekg/vcflib).
+    </help>
+    <expand macro="citations" />
+</tool>