annotate average_fst.xml @ 11:d82a83653e14

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