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

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