comparison vcfrandomsample.xml @ 0:81b9a3179670

Imported from capsule None
author anton
date Wed, 11 Jun 2014 17:11:37 -0400
parents
children a67b14d368a4
comparison
equal deleted inserted replaced
-1:000000000000 0:81b9a3179670
1 <tool id="vcfrandomsample" name="VCFrandomSample:" version="0.0.1">
2 <requirements>
3 <requirement type="package" version="586c5ae5d57a38dae6b32ea831fb1f7cfa14c9bd">vcflib</requirement>
4 </requirements>
5 <description>Randomly sample sites from VCF dataset</description>
6 <command>
7
8 #if $adv_options.adv_options_selector == True:
9 vcfrandomsample -s "${adv_options.scale_by}" -p ${random_seed} -r ${rate} "${vcf_input}" > "${out_file1}"
10 #else:
11 vcfrandomsample -p ${random_seed} -r ${rate} "${vcf_input}" > "${out_file1}"
12 #end if
13 </command>
14 <inputs>
15 <param format="vcf" name="vcf_input" type="data" label="Select random sites from"/>
16 <param name="rate" type="float" value="0.1" label="base sampling probability per locus" help="-r, --rate"/>
17 <param name="random_seed" type="integer" value="17823618326" label="use this random seed" help="-p, --random-seed; use this to make results reproducible" />
18 <conditional name="adv_options">
19 <param name="adv_options_selector" type="boolean" truevalue="use_adv_controls" label="Advanced controls" help="Allows you to specify options that are not listed above"/>
20 <when value="use_adv_controls">
21 <param name="scale_by" type="text" value="AF" label="scale sampling likelihood by this INFO field" help="-s, --scale-by; this only works for Float info fields such as AF" />
22 </when>
23 </conditional>
24 </inputs>
25 <outputs>
26 <data format="vcf" name="out_file1" />
27 </outputs>
28 <tests>
29 <test>
30 <param name="vcf_input" value="vcflib.vcf"/>
31 <param name="rate" value="0.2" />
32 <param name="random_seed" value="1" />
33 <param name="adv_options_selector" value="False" />
34 <output name="out_file1" file="vcfrandomsample-test1.vcf" lines_diff="2" />
35 </test>
36 </tests>
37 <help>
38
39 Randomly sample sites from an input VCF file. Scale the sampling probability by the field specified by --scale-by (see advanced controls). This may be
40 used to provide uniform sampling across allele frequencies, for instance (AF field in this case).
41
42 Options::
43
44 -r, --rate RATE base sampling probability per locus
45 -s, --scale-by KEY scale sampling likelihood by this Float info field
46 -p, --random-seed N use this random seed
47
48 ----
49
50 Vcfrandomsample is a part of VCFlib toolkit developed by Erik Garrison (https://github.com/ekg/vcflib).
51
52 </help>
53 </tool>