comparison vcftools_slice.xml @ 0:1363e5d4a8b8 draft default tip

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