Mercurial > repos > miller-lab > genome_diversity
annotate aggregate_gd_indivs.xml @ 26:91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
author | Richard Burhans <burhans@bx.psu.edu> |
---|---|
date | Mon, 03 Jun 2013 12:29:29 -0400 |
parents | 95a05c1ef5d5 |
children | 8997f2ca8c7a |
rev | line source |
---|---|
26
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
1 <tool id="gd_sum_gd_snp" name="Aggregate Individuals" version="1.1.0"> |
13 | 2 <description>: Append summary columns for a population</description> |
3 | |
4 <command interpreter="python"> | |
22
95a05c1ef5d5
update to devshed revision aaece207bd01
Richard Burhans <burhans@bx.psu.edu>
parents:
18
diff
changeset
|
5 aggregate_gd_indivs.py "$input" "$p1_input" "$output" |
26
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
6 #if $input_type.choice == '0' |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
7 "gd_snp" |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
8 #else if $input_type.choice == '1' |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
9 "gd_genotype" |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
10 #end if |
13 | 11 #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns) |
12 #set $arg = '%s:%s' % ($individual_col, $individual) | |
13 "$arg" | |
14 #end for | |
15 </command> | |
16 | |
17 <inputs> | |
26
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
18 |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
19 <conditional name="input_type"> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
20 <param name="choice" type="select" format="integer" label="Input format"> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
21 <option value="0" selected="true">gd_snp</option> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
22 <option value="1">gd_genotype</option> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
23 </param> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
24 |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
25 <when value="0"> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
26 <param name="input" type="data" format="gd_snp" label="SNP dataset" /> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
27 </when> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
28 <when value="1"> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
29 <param name="input" type="data" format="gd_genotype" label="Genotype dataset" /> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
30 </when> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
31 </conditional> |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
32 |
13 | 33 <param name="p1_input" type="data" format="gd_indivs" label="Population individuals" /> |
34 </inputs> | |
35 | |
36 <outputs> | |
26
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
37 <data name="output" format="input" format_source="input" metadata_source="input" /> |
13 | 38 </outputs> |
39 | |
40 <tests> | |
41 <test> | |
42 <param name="input" value="test_in/sample.gd_snp" ftype="gd_snp" /> | |
43 <param name="p1_input" value="test_in/a.gd_indivs" ftype="gd_indivs" /> | |
44 <output name="output" file="test_out/modify_snp_table/modify.gd_snp" /> | |
45 </test> | |
46 </tests> | |
47 | |
48 <help> | |
49 | |
50 **Dataset formats** | |
51 | |
26
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
52 The input datasets are in gd_snp_, gd_genotype_, and gd_indivs_ formats. |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
53 The output dataset is in gd_snp_ or gd_genotype_ format. (`Dataset missing?`_) |
13 | 54 |
55 .. _gd_snp: ./static/formatHelp.html#gd_snp | |
26
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
56 .. _gd_genotype: ./static/formatHelp.html#gd_genotype |
13 | 57 .. _gd_indivs: ./static/formatHelp.html#gd_indivs |
58 .. _Dataset missing?: ./static/formatHelp.html | |
59 | |
60 ----- | |
61 | |
62 **What it does** | |
63 | |
26
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
64 The user specifies that some of the individuals in a gd_snp or gd_genotype |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
65 dataset form a "population", by supplying a list that has been previously |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
66 created using the Specify Individuals tool. The program appends a new |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
67 "entity" (set of four columns for a gd_snp table, or one column for a |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
68 gd_genotype table), analogous to the column(s) for an individual but |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
69 containing summary data for the population as a group. For a gd_snp |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
70 table, these four columns give the total counts for the two alleles, |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
71 the "genotype" for the population, and the maximum quality value, taken |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
72 over all individuals in the population. If all defined genotypes in |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
73 the population are 2 (agree with the reference), then the population's |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
74 genotype is 2, and similarly for 0; otherwise the genotype is 1 (unless |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
75 all individuals have undefined genotype, in which case it is -1). |
91e835060ad2
Updates to Admixture, Aggregate Individuals, and Restore Attributes to support gd_genotype
Richard Burhans <burhans@bx.psu.edu>
parents:
22
diff
changeset
|
76 For a gd_genotype file, only the aggregate genotype is appended. |
13 | 77 |
78 ----- | |
79 | |
80 **Example** | |
81 | |
82 - input gd_snp:: | |
83 | |
84 Contig161_chr1_4641264_4641879 115 C T 73.5 chr1 4641382 C 6 0 2 45 8 0 2 51 15 0 2 72 5 0 2 42 6 0 2 45 10 0 2 57 Y 54 0.323 0 | |
85 Contig48_chr1_10150253_10151311 11 A G 94.3 chr1 10150264 A 1 0 2 30 1 0 2 30 1 0 2 30 3 0 2 36 1 0 2 30 1 0 2 30 Y 22 +99. 0 | |
86 Contig20_chr1_21313469_21313570 66 C T 54.0 chr1 21313534 C 4 0 2 39 4 0 2 39 5 0 2 42 4 0 2 39 4 0 2 39 5 0 2 42 N 1 +99. 0 | |
87 etc. | |
88 | |
89 - input individuals:: | |
90 | |
91 9 PB1 | |
92 13 PB2 | |
93 17 PB3 | |
94 | |
95 - output:: | |
96 | |
97 Contig161_chr1_4641264_4641879 115 C T 73.5 chr1 4641382 C 6 0 2 45 8 0 2 51 15 0 2 72 5 0 2 42 6 0 2 45 10 0 2 57 Y 54 0.323 0 29 0 2 72 | |
98 Contig48_chr1_10150253_10151311 11 A G 94.3 chr1 10150264 A 1 0 2 30 1 0 2 30 1 0 2 30 3 0 2 36 1 0 2 30 1 0 2 30 Y 22 +99. 0 3 0 2 30 | |
99 Contig20_chr1_21313469_21313570 66 C T 54.0 chr1 21313534 C 4 0 2 39 4 0 2 39 5 0 2 42 4 0 2 39 4 0 2 39 5 0 2 42 N 1 +99. 0 13 0 2 42 | |
100 etc. | |
101 | |
102 </help> | |
103 </tool> |