comparison vcftools_slice.xml @ 0:fb25b685d590 draft

Initial wrapper upload.
author devteam
date Sat, 23 Nov 2013 16:12:29 -0500
parents
children e88ac3aabdc4
comparison
equal deleted inserted replaced
-1:000000000000 0:fb25b685d590
1 <tool id="vcftools_slice" name="Slice VCF" version="0.1">
2 <description>to get data from selected regions</description>
3
4 <requirements>
5 <requirement type="package">vcftools</requirement>
6 </requirements>
7
8 <command>
9 ## Only works if input is sorted.
10 vcf-sort ${input} > sorted.vcf
11
12 ## As of v0.1.10, the first line of a BED file is assumed to be a header and ignored,
13 ## so add a dummy header line if necessary.
14 #set first_line = open( str($regions) ).readline()
15 #if first_line.startswith( '#' ):
16 ## Header already exists, so just link.
17 ; ln -s $regions regions.bed
18 #else:
19 ## Add dummy header.
20 ; echo '#dummy header' | cat - $regions > regions.bed
21 #end if
22
23 ## Slice VCF.
24 ; vcftools --vcf sorted.vcf --out output --bed regions.bed --recode
25 </command>
26
27 <inputs>
28 <param name="input" label="Input dataset" type="data" format="vcf"/>
29 <param name="regions" label="Regions" type="data" format="bed"/>
30 </inputs>
31
32 <outputs>
33 <data name="output" format="vcf" from_work_dir="output.recode.vcf"/>
34 </outputs>
35
36 <tests>
37 <test>
38 <param name="input" value="slice_in.vcf"/>
39 <param name="regions" value="regions.bed"/>
40 <output name="output" file="slice_out.vcf"/>
41 </test>
42 </tests>
43
44 <help>
45 Please see the VCFtools `documentation`__ for help and further information.
46
47 .. __: http://vcftools.sourceforge.net/docs.html
48 </help>
49 </tool>