annotate vcfvcfintersect.xml @ 0:b29dbe1270b5 draft

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