annotate average_fst.xml @ 1:0df7a9b89f13

add empty snifffers section to mitigate toolshed bug; new version of dpmix
author Richard Burhans <burhans@bx.psu.edu>
date Mon, 09 Apr 2012 12:40:57 -0400
parents 2c498d40ecde
children e29f4d801bb0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
1 <tool id="gd_average_fst" name="Average FST" version="1.0.0">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
2 <description>of two populations</description>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
3
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
4 <command interpreter="python">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
5 average_fst.py "$input" "$p1_input" "$p2_input" "$data_source.ds_choice" "$data_source.min_value" "$discard_fixed" "$biased" "$output"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
6 #if $use_randomization.ur_choice == '1'
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
7 "$use_randomization.shuffles" "$use_randomization.p0_input"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
8 #else
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
9 "0" "/dev/null"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
10 #end if
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
11 #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
12 #set $arg = '%s:%s' % ($individual_col, $individual)
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
13 "$arg"
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
14 #end for
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
15 </command>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
16
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
17 <inputs>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
18 <param name="input" type="data" format="wsf" label="SNP table" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
19 <param name="p1_input" type="data" format="ind" label="Population 1 individuals" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
20 <param name="p2_input" type="data" format="ind" label="Population 2 individuals" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
21
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
22 <conditional name="data_source">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
23 <param name="ds_choice" type="select" format="integer" label="Data source">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
24 <option value="0" selected="true">sequence coverage and ..</option>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
25 <option value="1">estimated genotype and ..</option>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
26 </param>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
27 <when value="0">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
28 <param name="min_value" type="integer" min="1" value="1" label="Minimum total read count for a population" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
29 </when>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
30 <when value="1">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
31 <param name="min_value" type="integer" min="1" value="1" label="Minimum individual genotype quality" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
32 </when>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
33 </conditional>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
34
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
35 <param name="discard_fixed" type="select" label="Apparently fixed SNPs">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
36 <option value="0">Retain SNPs that appear fixed in the two populations</option>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
37 <option value="1" selected="true">Delete SNPs that appear fixed in the two populations</option>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
38 </param>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
39
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
40 <param name="biased" type="select" label="FST estimator">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
41 <option value="0" selected="true">Wright's original definition</option>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
42 <option value="1">Weir's unbiased estimator</option>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
43 </param>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
44
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
45 <conditional name="use_randomization">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
46 <param name="ur_choice" type="select" format="integer" label="Use randomization">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
47 <option value="0" selected="true">No</option>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
48 <option value="1">Yes</option>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
49 </param>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
50 <when value="0" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
51 <when value="1">
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
52 <param name="shuffles" type="integer" min="0" value="0" label="Shuffles" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
53 <param name="p0_input" type="data" format="ind" label="Individuals for randomization" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
54 </when>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
55 </conditional>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
56 </inputs>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
57
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
58 <outputs>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
59 <data name="output" format="txt" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
60 </outputs>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
61
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
62 <tests>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
63 <test>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
64 <param name="input" value="test_in/sample.wsf" ftype="wsf" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
65 <param name="p1_input" value="test_in/a.ind" ftype="ind" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
66 <param name="p2_input" value="test_in/b.ind" ftype="ind" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
67 <param name="ds_choice" value="0" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
68 <param name="min_value" value="3" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
69 <param name="discard_fixed" value="1" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
70 <param name="biased" value="0" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
71 <param name="ur_choice" value="0" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
72 <output name="output" file="test_out/average_fst/average_fst.txt" />
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
73 </test>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
74 </tests>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
75
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
76 <help>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
77 **What it does**
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
78
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
79 The user specifies a SNP table and two "populations" of individuals,
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
80 both previously defined using the Galaxy tool to select individuals from
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
81 a SNP table. No individual can be in both populations. Other choices are
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
82 as follows.
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
83
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
84 Data source. The allele frequencies of a SNP in the two populations can be
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
85 estimated either by the total number of reads of each allele, or by adding
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
86 the frequencies inferred from genotypes of individuals in the populations.
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
87
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
88 After specifying the data source, the user sets lower bounds on amount
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
89 of data required at a SNP. For estimating the Fst using read counts,
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
90 the bound is the minimum count of reads of the two alleles in a population.
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
91 For estimations based on genotype, the bound is the minimum reported genotype
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
92 quality per individual. SNPs not meeting these lower bounds are ignored.
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
93
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
94 The user specifies whether SNPs where both populations appear to be fixed
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
95 for the same allele should be retained or discarded.
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
96
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
97 The user chooses which definition of Fst to use: Wright's original definition
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
98 or Weir's unbiased estimator.
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
99
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
100 Finally, the user decides whether to use randomizations. If so, then the
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
101 user specifies how many randomly generated population pairs (retaining
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
102 the numbers of individuals of the originals) to generate, as well as the
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
103 "population" of additional individuals (not in the first two populations)
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
104 that can be used in the randomization process.
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
105
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
106 The program prints the average Fst for the original populations and the
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
107 number of SNPs used to compute it. If randomizations were requested,
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
108 it prints the average Fst for each randomly generated population pair,
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
109 ending with a summary that includes the maximum and average value, and the
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
110 highest-scoring population pair.
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
111 </help>
2c498d40ecde Uploaded
miller-lab
parents:
diff changeset
112 </tool>