0
|
1 <tool id="vcftools_isec" name="Intersect" version="0.1">
|
|
2 <description>multiple VCF datasets</description>
|
|
3
|
|
4 <requirements>
|
|
5 <requirement type="package">tabix</requirement>
|
|
6 <requirement type="package" version="0.1.11">vcftools</requirement>
|
|
7 </requirements>
|
|
8
|
|
9 <command>
|
|
10 ## Preprocessing for each dataset.
|
|
11 #set dataset_names = []
|
|
12 #for i, $input in enumerate( $inputs ):
|
|
13 ## Sort file.
|
|
14 vcf-sort ${input.file} > ${i}.vcf.sorted ;
|
|
15
|
|
16 ## Compress.
|
|
17 bgzip ${i}.vcf.sorted ;
|
|
18
|
|
19 ## Index.
|
|
20 tabix -p vcf ${i}.vcf.sorted.gz ;
|
|
21
|
|
22 #silent dataset_names.append( str($i) + '.vcf.sorted.gz' )
|
|
23 #end for
|
|
24
|
|
25 ## Intersect.
|
|
26 vcf-isec -f
|
|
27 #if $complement:
|
|
28 -c
|
|
29 #end if
|
|
30 #echo ' '.join( dataset_names ) # > ${output}
|
|
31 </command>
|
|
32 <inputs>
|
|
33 <repeat name="inputs" title="Dataset" min="2">
|
|
34 <param name="file" label="Dataset" type="data" format="vcf"/>
|
|
35 </repeat>
|
|
36 <param name="complement" type="boolean" label="Complement intersection" help="If checked, output positions present in the first file but missing from the other files"/>
|
|
37 </inputs>
|
|
38
|
|
39 <outputs>
|
|
40 <data name="output" format="vcf"/>
|
|
41 </outputs>
|
|
42
|
|
43 <stdio>
|
|
44 <regex match=".*" source="both" level="log" description="tool progress"/>
|
|
45 </stdio>
|
|
46
|
|
47 <tests>
|
|
48 <!-- Cannot specify multiple repeats in test framework right now.
|
|
49 <test>
|
|
50 <param name='inputs|1' value='1.vcf' />
|
|
51 <param name='inputs|2' value='2.vcf' />
|
|
52 <param name='complement' value='False' />
|
|
53 <output name='output' file='out.vcf' />
|
|
54 </test>
|
|
55 -->
|
|
56 </tests>
|
|
57
|
|
58 <help>
|
|
59 Please see the VCFtools `documentation`__ for help and further information.
|
|
60
|
|
61 .. __: http://vcftools.sourceforge.net/docs.html
|
|
62 </help>
|
|
63 </tool>
|