annotate vcfvcfintersect.xml @ 1:3a799597bc67

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