comparison select_individuals.xml @ 12:4b6590dd7250

Uploaded
author miller-lab
date Wed, 12 Sep 2012 17:10:26 -0400
parents
children
comparison
equal deleted inserted replaced
11:d4ec09e8079f 12:4b6590dd7250
1 <tool id="gd_select_individuals" name="Select individuals" version="1.0.0">
2 <description>from a gd_snp dataset</description>
3
4 <command interpreter="bash">
5 echo.bash "$input" "$output"
6 #for $individual in str($individuals).split(',')
7 #set $individual_idx = $input.dataset.metadata.individual_names.index($individual)
8 #set $individual_col = str( $input.dataset.metadata.individual_columns[$individual_idx] )
9 #set $arg = '\t'.join([$individual_col, $individual, ''])
10 "$arg"
11 #end for
12 </command>
13
14 <inputs>
15 <param name="input" type="data" format="gd_snp" label="gd_snp dataset"/>
16 <param name="individuals" type="select" display="checkboxes" multiple="true" label="Individuals to include">
17 <options>
18 <filter type="data_meta" ref="input" key="individual_names" />
19 </options>
20 <validator type="no_options" message="You must select at least one individual"/>
21 </param>
22 </inputs>
23
24 <outputs>
25 <data name="output" format="gd_indivs" label="Individuals from ${input.hid}" />
26 </outputs>
27
28 <tests>
29 <test>
30 <param name="input" value="test_in/sample.gd_snp" ftype="gd_snp" />
31 <param name="individuals" value="PB1,PB2" />
32 <output name="output" file="test_in/a.gd_indivs" />
33 </test>
34 </tests>
35
36 <help>
37 **Dataset formats**
38
39 The input dataset is in the gd_snp_ format.
40 The output dataset is in gd_indivs_ format. (`Dataset missing?`_)
41
42 .. _Dataset missing?: ./static/formatHelp.html
43 .. _gd_snp: ./static/formatHelp.html#gd_snp
44 .. _gd_indivs: ./static/formatHelp.html#gd_indivs
45
46 **What it does**
47
48 This selects a set of individuals or groups from a gd_snp dataset. This set
49 can then be used by other tools to work on just part of the gd_snp dataset.
50
51 **Examples**
52
53 - input::
54
55 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
56 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
57 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
58 etc.
59
60 - input metadata::
61
62 #{"column_names":["scaf","pos","A","B","qual","ref","rpos","rnuc","1A","1B","1G","1Q","2A","2B","2G","2Q","3A","3B","3G","3Q","4A","4B","4G","4Q","5A","5B","5G","5Q","6A","6B","6G","6Q","pair","dist",
63 #"prim","rflp"],"dbkey":"canFam2","individuals":[["PB1",9],["PB2",13],["PB3",17],["PB4",21],["PB6",25],["PB8",29]],"pos":2,"rPos":7,"ref":6,"scaffold":1,"species":"bear"}
64
65 - output when individuals PB1, PB2, and PB3 are selected::
66
67 9 PB1
68 13 PB2
69 17 PB3
70
71 </help>
72 </tool>