annotate vcftools_subset.xml @ 0:c8a6864e2af2 draft default tip

Uploaded
author devteam
date Sun, 24 Nov 2013 11:43:30 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
1 <tool id="vcftools_subset" name="Subset" version="0.1">
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
2 <description>columns from a VCF dataset</description>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
3
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
4 <requirements>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
5 <requirement type="package">tabix</requirement>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
6 <requirement type="package" version="0.1.11">vcftools</requirement>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
7 </requirements>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
8
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
9 <command>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
10 ln -s ${input} input.vcf ;
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
11
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
12 ## Sort file.
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
13 sort -k1,1 -k2,2n input.vcf > input.vcf.sorted ;
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
14
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
15 ## Compress.
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
16 bgzip input.vcf.sorted ;
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
17
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
18 ## Index.
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
19 tabix -p vcf input.vcf.sorted.gz ;
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
20
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
21 ## Subset.
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
22 vcf-subset ${trim_alt_alleles} ${exclude_rows_with_no_variants} -c "${columns}" input.vcf.sorted.gz > $output
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
23 </command>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
24
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
25 <inputs>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
26 <param name="input" label="Input dataset" type="data" format="vcf"/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
27 <param name="columns" label="Columns" type="text" value=""/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
28 <param name="trim_alt_alleles" type="select" label="Remove alternate alleles if not found in the subset" help="">
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
29 <option value="" selected="True">No</option>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
30 <option value="-a">Yes</option>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
31 </param>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
32 <param name="exclude_rows_with_no_variants" type="select" label="Exclude rows not containing variants" help="">
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
33 <option value="" selected="True">No</option>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
34 <option value="-e">Yes</option>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
35 </param>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
36 </inputs>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
37
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
38 <outputs>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
39 <data name="output" format="vcf"/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
40 </outputs>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
41
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
42 <stdio>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
43 <regex match=".*" source="both" level="log" description="tool progress"/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
44 </stdio>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
45
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
46 <tests>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
47 <test>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
48 <param name="input" value="subset_in.vcf"/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
49 <param name="columns" value="sample1"/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
50 <param name="trim_alt_alleles" value="Yes"/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
51 <param name="exclude_rows_with_no_variants" value="Yes"/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
52 <!-- 2 lines diff because command line with full file path is included in output VCF, and
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
53 it not possible to match full file path. -->
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
54 <output name="output" file="subset_out.vcf" lines_diff="2"/>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
55 </test>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
56 </tests>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
57
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
58 <help>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
59 Please see the VCFtools `documentation`__ for help and further information.
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
60
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
61 .. __: http://vcftools.sourceforge.net/docs.html
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
62 </help>
c8a6864e2af2 Uploaded
devteam
parents:
diff changeset
63 </tool>