Mercurial > repos > anton > vcfvcfintersect
annotate vcfvcfintersect.xml @ 4:b8ab4ef85a5b
Updated tool version to 0.0.2
author | Anton Nekrutenko <anton@bx.psu.edu> |
---|---|
date | Wed, 25 Jun 2014 16:51:34 -0400 |
parents | 3a799597bc67 |
children | 89c1efc31618 |
rev | line source |
---|---|
4
b8ab4ef85a5b
Updated tool version to 0.0.2
Anton Nekrutenko <anton@bx.psu.edu>
parents:
1
diff
changeset
|
1 <tool id="vcfvcfintersect" name="VCF-VCFintersect:" version="0.0.2"> |
0 | 2 <requirements> |
1
3a799597bc67
Updated to new vcflib version
Anton Nekrutenko <anton@bx.psu.edu>
parents:
0
diff
changeset
|
3 <requirement type="package" version="86723982aa">vcflib</requirement> |
0 | 4 <!-- <requirement type="package" version="0.1.18">samtools</requirement> --> |
5 </requirements> | |
6 <description>Intersect two VCF datasets</description> | |
7 <command> | |
8 | |
9 #set $reference_fasta_filename = "localref.fa" | |
10 #if str( $reference_source.reference_source_selector ) == "history": | |
11 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" && | |
12 #else: | |
13 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) | |
14 #end if | |
15 | |
16 #if $adv_options.adv_options_selector == True: | |
17 | |
18 vcfintersect "${adv_options.adv_options_input}" ${loci} ${invert} -r "${reference_fasta_filename}" -w "${window_size}" ${isect_union} "${vcf_input1}" "${vcf_input2}" > "${out_file1}" | |
19 | |
20 #else: | |
21 | |
22 vcfintersect ${loci} ${invert} -r "${reference_fasta_filename}" -w "${window_size}" ${isect_union} "${vcf_input1}" "${vcf_input2}" > "${out_file1}" | |
23 | |
24 #end if | |
25 | |
26 </command> | |
27 <inputs> | |
28 <!-- selecting refernce source --> | |
29 <param name="vcf_input1" type="data" format="vcf" label="The first VCF dataset" /> | |
30 <param name="vcf_input2" type="data" format="vcf" label="The second VCF dataset" help="The second dataset will be instersected with the first"/> | |
31 <conditional name="reference_source"> | |
32 <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."> | |
33 <option value="cached">Locally cached</option> | |
34 <option value="history">History</option> | |
35 </param> | |
36 <when value="cached"> | |
37 <param name="ref_file" type="select" label="Select reference genome"> | |
38 <options from_data_table="fasta_indexes"> | |
39 <!--<filter type="data_meta" key="dbkey" ref="input_bam" column="value"/>--> | |
40 </options> | |
41 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> | |
42 </param> | |
43 </when> | |
44 <when value="history"> <!-- FIX ME!!!! --> | |
45 <param name="ref_file" type="data" format="fasta" label="Using reference file" /> | |
46 </when> | |
47 </conditional> | |
48 <param name="isect_union" type="select" label="Union or intersection" help="-i or -u"> | |
49 <option value="-i">Intersect</option> | |
50 <option value="-u">Union</option> | |
51 </param> | |
52 <param name="invert" type="boolean" truevalue="-v" falsevalue="" label="Invert selection?" help="-v, --invert" /> | |
53 <param name="window_size" type="integer" value="30" label="compare records up to this many bp away (window size)" help="-w, --window-size" /> | |
54 <param name="loci" type="boolean" truevalue="-l" falsevalue="" label="output whole loci when one alternate allele matches" help="-l, --loci" /> | |
55 <conditional name="adv_options"> | |
56 <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"/> | |
57 <when value="use_adv_controls"> | |
58 <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" /> | |
59 <sanitizer> | |
60 <valid initial="string.printable"> | |
61 <remove value="'"/> | |
62 </valid> | |
63 <mapping initial="none"> | |
64 <add source="'" target="__sq__"/> | |
65 </mapping> | |
66 </sanitizer> | |
67 </when> | |
68 </conditional> | |
69 </inputs> | |
70 <outputs> | |
71 <data format="vcf" name="out_file1" /> | |
72 </outputs> | |
73 <stdio> | |
74 <exit_code range="1:" level="fatal" /> | |
75 </stdio> | |
76 <tests> | |
77 <test> | |
78 <param name="reference_source_selector" value="history" /> | |
79 <param name="vcf_input1" value="vcfvcfintersect-input1.vcf" /> | |
80 <param name="vcf_input2" value="vcfvcfintersect-input2.vcf" /> | |
81 <param name="isect_union" value="Intersect" /> | |
82 <param name="invert" value="False" /> | |
83 <param name="loci" value="False" /> | |
84 <patam name="adv_options" value="False" /> | |
85 <param name="window_size" value="30" /> | |
86 <param name="ref_file" value="vcflib-test-genome-phix.fa" /> | |
87 <output name="out_file1" file="vcfvcfintersect-test1.vcf"/> | |
88 </test> | |
89 <test> | |
90 <param name="reference_source_selector" value="history" /> | |
91 <param name="vcf_input1" value="vcfvcfintersect-input1.vcf" /> | |
92 <param name="vcf_input2" value="vcfvcfintersect-input2.vcf" /> | |
93 <param name="isect_union" value="Union" /> | |
94 <param name="invert" value="False" /> | |
95 <param name="loci" value="False" /> | |
96 <patam name="adv_options" value="False" /> | |
97 <param name="window_size" value="30" /> | |
98 <param name="ref_file" value="vcflib-test-genome-phix.fa" /> | |
99 <output name="out_file1" file="vcfvcfintersect-test2.vcf"/> | |
100 </test> | |
101 </tests> | |
102 <help> | |
103 | |
104 Computes intersections and unions for two VCF datasets. Unifies equivalent alleles within window-size bp. | |
105 | |
106 The options are:: | |
107 | |
108 -v, --invert invert the selection, printing only records which would | |
109 -i, --intersect-vcf FILE use this VCF for set intersection generation | |
110 -u, --union-vcf FILE use this VCF for set union generation | |
111 -w, --window-size N compare records up to this many bp away (default 30) | |
112 -r, --reference FILE FASTA reference file, required with -i and -u | |
113 -l, --loci output whole loci when one alternate allele matches | |
114 -m, --ref-match intersect on the basis of record REF string | |
115 -t, --tag TAG attach TAG to each record's info field if it would intersect | |
116 -V, --tag-value VAL use this value to indicate that the allele is passing | |
117 '.' will be used otherwise. default: 'PASS' | |
118 -M, --merge-from FROM-TAG | |
119 -T, --merge-to TO-TAG merge from FROM-TAG used in the -i file, setting TO-TAG | |
120 in the current file. | |
121 | |
122 ---- | |
123 | |
124 VCFVCFintersect is based on vcfintersect utility of VCFlib toolkit developed by Erik Garrison (https://github.com/ekg/vcflib). | |
125 | |
126 </help> | |
127 </tool> |