annotate specify.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 248b06e86022
children 8997f2ca8c7a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
1 <tool id="gd_specify" name="Specify Individuals" version="1.1.0">
13
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
2 <description>: Define a collection of individuals from a gd_snp dataset</description>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
3
24
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
4 <command interpreter="python">
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
5 specify.py "$input" "$output"
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
6 #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
7 #set $individual_arg = 'individual:%s:%s' % ($individual_col, $individual)
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
8 "$individual_arg"
13
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
9 #end for
24
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
10 #if str($individuals).strip() != 'None'
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
11 #for $individual in str($individuals).split(',')
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
12 #set $individual_idx = $input.dataset.metadata.individual_names.index($individual)
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
13 #set $individual_col = str( $input.dataset.metadata.individual_columns[$individual_idx] )
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
14 #set $cb_arg = 'checkbox:%s:%s' % ($individual_col, $individual)
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
15 "$cb_arg"
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
16 #end for
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
17 #end if
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
18 #if str($string).strip() != ''
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
19 #set str_arg = 'string:%s' % ( __import__('base64').b64encode( str($string) ) )
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
20 "$str_arg"
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
21 #end if
13
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
22 </command>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
23
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
24 <inputs>
24
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
25 <param name="input" type="data" format="gd_snp,gd_genotype" label="SNP or Genotype dataset"/>
13
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
26 <param name="individuals" type="select" display="checkboxes" multiple="true" label="Individuals to include">
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
27 <options>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
28 <filter type="data_meta" ref="input" key="individual_names" />
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
29 </options>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
30 </param>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
31 <param name="outname" type="text" size="20" label="Label for this collection">
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
32 <validator type="empty_field" message="You must enter a label."/>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
33 #used to be "Individuals from ${input.hid}"
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
34 </param>
24
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
35 <param name="string" type="text" size="40" label="Individuals to include">
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
36 <sanitizer>
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
37 <valid initial="string.printable"/>
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
38 </sanitizer>
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
39 </param>
13
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
40 </inputs>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
41
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
42 <outputs>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
43 <data name="output" format="gd_indivs" label="${outname}" />
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
44 </outputs>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
45
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
46 <tests>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
47 <test>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
48 <param name="input" value="test_in/sample.gd_snp" ftype="gd_snp" />
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
49 <param name="individuals" value="PB1,PB2" />
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
50 <output name="output" file="test_in/a.gd_indivs" />
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
51 </test>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
52 </tests>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
53
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
54 <help>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
55
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
56 **Dataset formats**
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
57
24
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
58 The input dataset is in gd_snp_ or gd_genotype_ format;
13
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
59 the output is in gd_indivs_ format. (`Dataset missing?`_)
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
60
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
61 .. _gd_snp: ./static/formatHelp.html#gd_snp
24
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
62 .. _gd_genotype: ./static/formatHelp.html#gd_genotype
13
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
63 .. _gd_indivs: ./static/formatHelp.html#gd_indivs
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
64 .. _Dataset missing?: ./static/formatHelp.html
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
65
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
66 -----
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
67
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
68 **What it does**
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
69
24
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
70 This tool makes a list of selected entities, i.e., the sets of four
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
71 columns representing individuals or groups from a gd_snp dataset, or
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
72 sets of single columns in a gd_genotype file. It does not copy the
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
73 data; it just records which entities should be considered as belonging
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
74 to some collection or population. The label you specify is used to
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
75 name the output dataset in your history. This list can then be used
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
76 to instruct other tools to work on just part of the original gd_snp or
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
77 gd_genotype dataset. The entities can be specified with the checklist
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
78 and/or by pasting their names (possibly with extraneous characters, as
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
79 in a portion of the Newick-format output of the Phylogenetic Tree tool)
248b06e86022 Added gd_genotype datatype. Modified tools to support new datatype.
Richard Burhans <burhans@bx.psu.edu>
parents: 13
diff changeset
80 into the box provided at the bottom of the page.
13
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
81
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
82 -----
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
83
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
84 **Example**
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
85
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
86 - input::
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
87
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
88 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
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
89 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
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
90 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
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
91 etc.
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
92
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
93 - input metadata::
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
94
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
95 #{"column_names":["scaf","pos","A","B","qual","ref","rpos","rnuc",
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
96 #"1A","1B","1G","1Q","2A","2B","2G","2Q","3A","3B","3G","3Q","4A","4B","4G","4Q","5A","5B","5G","5Q","6A","6B","6G","6Q",
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
97 #"pair","dist","prim","rflp"],"dbkey":"canFam2","individuals":[["PB1",9],["PB2",13],["PB3",17],["PB4",21],["PB6",25],["PB8",29]],
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
98 #"pos":2,"rPos":7,"ref":6,"scaffold":1,"species":"bear"}
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
99
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
100 - output when individuals PB1, PB2, and PB3 are selected::
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
101
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
102 9 PB1
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
103 13 PB2
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
104 17 PB3
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
105
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
106 </help>
fdb4240fb565 Uploaded Miller Lab Devshed version a51c894f5bed
miller-lab
parents:
diff changeset
107 </tool>