annotate average_fst.xml @ 0:3be071295340 default tip

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