annotate modify_snp_table.xml @ 12:4b6590dd7250

Uploaded
author miller-lab
date Wed, 12 Sep 2012 17:10:26 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
1 <tool id="gd_modify_gd_snp" name="Modify gd_snp" version="1.0.0">
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
2 <description>modify a gd_snp dataset</description>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
3
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
4 <command interpreter="python">
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
5 modify_snp_table.py "$input" "$p1_input" "$output"
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
6 #if $limit_coverage.choice == "0"
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
7 "-1" "-1" "-1" "-1"
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
8 #else
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
9 "${limit_coverage.lo_coverage}" "${limit_coverage.hi_coverage}" "${limit_coverage.low_ind_cov}" "${limit_coverage.lo_quality}"
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
10 #end if
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
11 #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
12 #set $arg = '%s:%s' % ($individual_col, $individual)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
13 "$arg"
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
14 #end for
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
15 </command>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
16
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
17 <inputs>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
18 <param name="input" type="data" format="gd_snp" label="gd_snp dataset" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
19 <param name="p1_input" type="data" format="gd_indivs" label="Population individuals" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
20 <conditional name="limit_coverage">
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
21 <param name="choice" type="select" format="integer" label="Option">
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
22 <option value="0" selected="true">add columns to the gd_snp table</option>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
23 <option value="1">discard some SNPs</option>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
24 </param>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
25 <when value="0" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
26 <when value="1">
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
27 <param name="lo_coverage" type="integer" min="0" value="0" label="Lower bound on total coverage" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
28 <param name="hi_coverage" type="integer" min="0" value="1000" label="Upper bound on total coverage" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
29 <param name="low_ind_cov" type="integer" min="0" value="0" label="Lower bound on individual coverage" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
30 <param name="lo_quality" type="integer" min="0" value="0" label="Lower bound on individual quality values" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
31 </when>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
32 </conditional>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
33 </inputs>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
34
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
35 <outputs>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
36 <data name="output" format="gd_snp" metadata_source="input" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
37 </outputs>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
38
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
39 <tests>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
40 <test>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
41 <param name="input" value="test_in/sample.gd_snp" ftype="gd_snp" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
42 <param name="p1_input" value="test_in/a.gd_indivs" ftype="gd_indivs" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
43 <param name="choice" value="1" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
44 <param name="lo_coverage" value="0" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
45 <param name="hi_coverage" value="1000" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
46 <param name="low_ind_cov" value="3" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
47 <param name="lo_quality" value="30" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
48 <output name="output" file="test_out/modify_snp_table/modify.gd_snp" />
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
49 </test>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
50 </tests>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
51
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
52 <help>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
53 **Dataset formats**
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
54
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
55 The input datasets are gd_snp_ and gd_indivs_ formats.
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
56 The output dataset is in gd_snp_ format. (`Dataset missing?`_)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
57
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
58 .. _Dataset missing?: ./static/formatHelp.html
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
59 .. _gd_snp: ./static/formatHelp.html#gd_snp
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
60 .. _gd_indivs: ./static/formatHelp.html#gd_indivs
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
61
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
62 **What it does**
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
63
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
64 The user specifies that some of the individuals in the selected gd_snp_ table are
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
65 form a "population" that has been previously defined using the Galaxy tool to
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
66 select individuals from a gd_snp dataset. One option is for the program to append
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
67 four columns to the table, giving the total counts for the two alleles, the
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
68 "genotype" for the population and the maximum quality value, taken over all
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
69 individuals in the population. If all defined genotypes in the population
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
70 are 2 (agree with the reference), the population's genotype is 2; similarly
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
71 for 0; otherwise the genotype is 1 (unless all individuals have undefined
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
72 genotype, in which case it is -1. The other option is to remove rows from
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
73 the table for which the total coverage for the population is either too low
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
74 or too high, and/or if the individual coverage or quality value is too low.
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
75
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
76 .. _gd_snp: ./static/formatHelp.html#gd_snp
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
77
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
78 **Examples**
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
79
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
80 - input gd_snp::
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
81
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
82 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
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
83 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
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
84 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
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
85 etc.
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
86
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
87 - input individuals::
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
88
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
89 9 PB1
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
90 13 PB2
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
91 17 PB3
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
92
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
93 - output from appending columns::
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
94
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
95 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
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
96 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
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
97 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
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
98 etc.
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
99
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
100 - output from filter SNPs with minimum count of 3 for the individuals::
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
101
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
102 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
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
103 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
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
104 etc.
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
105
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
106 </help>
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
107 </tool>