comparison specify.xml @ 13:fdb4240fb565

Uploaded Miller Lab Devshed version a51c894f5bed
author miller-lab
date Fri, 28 Sep 2012 11:34:31 -0400
parents
children 248b06e86022
comparison
equal deleted inserted replaced
12:4b6590dd7250 13:fdb4240fb565
1 <tool id="gd_specify" name="Specify Individuals" version="1.0.0">
2 <description>: Define a collection of individuals 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="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 <param name="outname" type="text" size="20" label="Label for this collection">
23 <validator type="empty_field" message="You must enter a label."/>
24 #used to be "Individuals from ${input.hid}"
25 </param>
26 </inputs>
27
28 <outputs>
29 <data name="output" format="gd_indivs" label="${outname}" />
30 </outputs>
31
32 <tests>
33 <test>
34 <param name="input" value="test_in/sample.gd_snp" ftype="gd_snp" />
35 <param name="individuals" value="PB1,PB2" />
36 <output name="output" file="test_in/a.gd_indivs" />
37 </test>
38 </tests>
39
40 <help>
41
42 **Dataset formats**
43
44 The input dataset is in gd_snp_ format;
45 the output is in gd_indivs_ format. (`Dataset missing?`_)
46
47 .. _gd_snp: ./static/formatHelp.html#gd_snp
48 .. _gd_indivs: ./static/formatHelp.html#gd_indivs
49 .. _Dataset missing?: ./static/formatHelp.html
50
51 -----
52
53 **What it does**
54
55 This tool makes a list of selected entities (the sets of four columns
56 representing individuals or groups) from a gd_snp dataset. It does not copy
57 the SNP data; it just records which entities should be considered as belonging
58 to some collection or population. The label you specify is used to name the
59 output dataset in your history. This list can then be used to instruct other
60 tools to work on just part of the original gd_snp dataset.
61
62 -----
63
64 **Example**
65
66 - input::
67
68 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
69 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
70 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
71 etc.
72
73 - input metadata::
74
75 #{"column_names":["scaf","pos","A","B","qual","ref","rpos","rnuc",
76 #"1A","1B","1G","1Q","2A","2B","2G","2Q","3A","3B","3G","3Q","4A","4B","4G","4Q","5A","5B","5G","5Q","6A","6B","6G","6Q",
77 #"pair","dist","prim","rflp"],"dbkey":"canFam2","individuals":[["PB1",9],["PB2",13],["PB3",17],["PB4",21],["PB6",25],["PB8",29]],
78 #"pos":2,"rPos":7,"ref":6,"scaffold":1,"species":"bear"}
79
80 - output when individuals PB1, PB2, and PB3 are selected::
81
82 9 PB1
83 13 PB2
84 17 PB3
85
86 </help>
87 </tool>