Mercurial > repos > devteam > vcfvcfintersect
changeset 4:64d95a7df265 draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/vcflib/vcfvcfintersect commit 0b9b6512272b82637c2f1e831367e89aed77ae79
author | devteam |
---|---|
date | Thu, 15 Sep 2016 16:05:46 -0400 |
parents | 1ca4b1b3fc96 |
children | c2026da116b4 |
files | macros.xml tool_dependencies.xml vcfvcfintersect.xml |
diffstat | 3 files changed, 129 insertions(+), 131 deletions(-) [+] |
line wrap: on
line diff
--- a/macros.xml Thu Nov 12 10:02:55 2015 -0500 +++ b/macros.xml Thu Sep 15 16:05:46 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/tool_dependencies.xml Thu Nov 12 10:02:55 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <package name="vcflib" version="8a5602bf07"> - <repository changeset_revision="3ac0905f7b7c" name="package_vcflib_8a5602bf07" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" /> - </package> -</tool_dependency>
--- a/vcfvcfintersect.xml Thu Nov 12 10:02:55 2015 -0500 +++ b/vcfvcfintersect.xml Thu Sep 15 16:05:46 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}" && - #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 "vcfvcf-intersect-result"" 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="'"/> - </valid> - <mapping initial="none"> - <add source="'" 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}" && + #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 "vcfvcf-intersect-result"" + 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="'"/> + </valid> + <mapping initial="none"> + <add source="'" 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>