Mercurial > repos > devteam > vcftools_subset
comparison vcftools_subset.xml @ 0:23436d1d0fa1 draft default tip
Uploaded
| author | devteam |
|---|---|
| date | Sun, 24 Nov 2013 17:13:57 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:23436d1d0fa1 |
|---|---|
| 1 <tool id="vcftools_subset" name="Subset" version="0.1"> | |
| 2 <description>columns from a VCF dataset</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 ln -s ${input} input.vcf ; | |
| 11 | |
| 12 ## Sort file. | |
| 13 sort -k1,1 -k2,2n input.vcf > input.vcf.sorted ; | |
| 14 | |
| 15 ## Compress. | |
| 16 bgzip input.vcf.sorted ; | |
| 17 | |
| 18 ## Index. | |
| 19 tabix -p vcf input.vcf.sorted.gz ; | |
| 20 | |
| 21 ## Subset. | |
| 22 vcf-subset ${trim_alt_alleles} ${exclude_rows_with_no_variants} -c "${columns}" input.vcf.sorted.gz > $output | |
| 23 </command> | |
| 24 | |
| 25 <inputs> | |
| 26 <param name="input" label="Input dataset" type="data" format="vcf"/> | |
| 27 <param name="columns" label="Columns" type="text" value=""/> | |
| 28 <param name="trim_alt_alleles" type="select" label="Remove alternate alleles if not found in the subset" help=""> | |
| 29 <option value="" selected="True">No</option> | |
| 30 <option value="-a">Yes</option> | |
| 31 </param> | |
| 32 <param name="exclude_rows_with_no_variants" type="select" label="Exclude rows not containing variants" help=""> | |
| 33 <option value="" selected="True">No</option> | |
| 34 <option value="-e">Yes</option> | |
| 35 </param> | |
| 36 </inputs> | |
| 37 | |
| 38 <outputs> | |
| 39 <data name="output" format="vcf"/> | |
| 40 </outputs> | |
| 41 | |
| 42 <stdio> | |
| 43 <regex match=".*" source="both" level="log" description="tool progress"/> | |
| 44 </stdio> | |
| 45 | |
| 46 <tests> | |
| 47 <test> | |
| 48 <param name="input" value="subset_in.vcf"/> | |
| 49 <param name="columns" value="sample1"/> | |
| 50 <param name="trim_alt_alleles" value="Yes"/> | |
| 51 <param name="exclude_rows_with_no_variants" value="Yes"/> | |
| 52 <!-- 2 lines diff because command line with full file path is included in output VCF, and | |
| 53 it not possible to match full file path. --> | |
| 54 <output name="output" file="subset_out.vcf" lines_diff="2"/> | |
| 55 </test> | |
| 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> |
