comparison prepare_population_structure.xml @ 14:8ae67e9fb6ff

Uploaded Miller Lab Devshed version a51c894f5bed again [possible toolshed.g2 bug]
author miller-lab
date Fri, 28 Sep 2012 11:35:56 -0400
parents
children f04f40a36cc8
comparison
equal deleted inserted replaced
13:fdb4240fb565 14:8ae67e9fb6ff
1 <tool id="gd_prepare_population_structure" name="Prepare Input" version="1.0.0">
2 <description>: Filter and convert to the format needed for these tools</description>
3
4 <command interpreter="python">
5 prepare_population_structure.py "$input" "$min_reads" "$min_qual" "$min_spacing" "$output" "$output.files_path"
6 #if $individuals.choice == '0'
7 "all_individuals"
8 #else if $individuals.choice == '1'
9 #for $population in $individuals.populations
10 #set $pop_arg = 'population:%s:%s' % (str($population.p_input), str($population.p_input.name))
11 "$pop_arg"
12 #end for
13 #end if
14 #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
15 #set $arg = 'individual:%s:%s' % ($individual_col, $individual)
16 "$arg"
17 #end for
18 </command>
19
20 <inputs>
21 <param name="input" type="data" format="gd_snp" label="SNP dataset" />
22 <param name="min_reads" type="integer" min="0" value="0" label="Minimum reads covering a SNP, per individual" />
23 <param name="min_qual" type="integer" min="0" value="0" label="Minimum quality value, per individual" />
24 <param name="min_spacing" type="integer" min="0" value="0" label="Minimum spacing between SNPs on the same scaffold" />
25 <conditional name="individuals">
26 <param name="choice" type="select" label="Individuals">
27 <option value="0" selected="true">All</option>
28 <option value="1">Choose</option>
29 </param>
30 <when value="0" />
31 <when value="1">
32 <repeat name="populations" title="Population" min="1">
33 <param name="p_input" type="data" format="gd_indivs" label="Individuals" />
34 </repeat>
35 </when>
36 </conditional>
37 </inputs>
38
39 <outputs>
40 <data name="output" format="gd_ped">
41 <actions>
42 <action type="metadata" name="base_name" default="admix" />
43 </actions>
44 </data>
45 </outputs>
46
47 <tests>
48 <test>
49 <param name="input" value="test_in/sample.gd_snp" ftype="gd_snp" />
50 <param name="min_reads" value="3" />
51 <param name="min_qual" value="30" />
52 <param name="min_spacing" value="0" />
53 <param name="choice" value="0" />
54 <output name="output" file="test_out/prepare_population_structure/prepare_population_structure.html" ftype="html" compare="diff" lines_diff="2">
55 <extra_files type="file" name="admix.map" value="test_out/prepare_population_structure/admix.map" />
56 <extra_files type="file" name="admix.ped" value="test_out/prepare_population_structure/admix.ped" />
57 </output>
58 </test>
59 </tests>
60
61 <help>
62
63 **Dataset formats**
64
65 The input datasets are in gd_snp_ and gd_indivs_ formats. It is important
66 for the Individuals datasets to have unique names; rename them if
67 necessary to make them unique. These names are used by the later tools in
68 the graphical displays.
69 The output dataset is gd_ped_. (`Dataset missing?`_)
70
71 .. _gd_snp: ./static/formatHelp.html#gd_snp
72 .. _gd_indivs: ./static/formatHelp.html#gd_indivs
73 .. _gd_ped: ./static/formatHelp.html#gd_ped
74 .. _Dataset missing?: ./static/formatHelp.html
75
76 -----
77
78 **What it does**
79
80 The tool converts a gd_snp dataset into two tables, called "admix.map" and
81 "admix.ped", needed for estimating the population structure. The user
82 can read or download those files, or simply pass this tool's output on to
83 other programs. The user imposes conditions on which SNPs to consider,
84 such as the minimum coverage and/or quality value for every individual,
85 or the distance to the closest SNP in the same contig (as named in the
86 first column of the SNP table). A useful piece of information produced
87 by the tool is the number of SNPs meeting those conditions, which can
88 be found by clicking on the eye icon in the history panel after the program
89 runs.
90
91 -----
92
93 **Example**
94
95 - input::
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
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
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
100 etc.
101
102 - output map file::
103
104 1 snp1 0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