annotate pgSnp2gd_snp.xml @ 1:57c5ac41f22c draft default tip

planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
author devteam
date Tue, 13 Oct 2015 12:27:32 -0400
parents d189d06d23cf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
1 <tool id="pgSnp2gd_snp" name="pgSnp to gd_snp" hidden="false" version="1.0.0">
1
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
2 <description>Convert from pgSnp to gd_snp</description>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
3 <command interpreter="perl">
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
4 <![CDATA[
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
5 #if $snptab.tab2 == "yes"
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
6 #if $snptab.needRef.colsOnly == "addColsOnly"
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
7 pgSnp2gd_snp.pl '$input1' -tab=${snptab.input2} -name=$indName -build=${input1.metadata.dbkey} -addColsOnly -chr=${input1.metadata.chromCol} > '$out_file1'
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
8 #else
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
9 pgSnp2gd_snp.pl '$input1' -tab=${snptab.input2} -name=$indName -build=${input1.metadata.dbkey} -ref=${snptab.needRef.ref} -chr=${input1.metadata.chromCol} > '$out_file1'
0
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
10 #end if
1
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
11 #else
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
12 pgSnp2gd_snp.pl '$input1' -name=$indName -build=${input1.metadata.dbkey} -ref=${snptab.ref} -chr=${input1.metadata.chromCol} > '$out_file1'
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
13 #end if
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
14 ]]>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
15 </command>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
16 <inputs>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
17 <param format="tab" name="input1" type="data" label="pgSnp dataset" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
18 <conditional name="snptab">
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
19 <param name="tab2" type="select" label="Append to gd_snp dataset in history">
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
20 <option value="yes">yes</option>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
21 <option value="no" selected="true">no</option>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
22 </param>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
23 <when value="yes">
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
24 <param format="gd_snp" name="input2" type="data" label="gd_snp dataset" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
25 <conditional name="needRef">
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
26 <param name="colsOnly" type="select" label="Skip new SNPs">
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
27 <option value="no" selected="true">no</option>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
28 <option value="addColsOnly">yes</option>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
29 </param>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
30 <when value="no">
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
31 <param name="ref" type="data_column" data_ref="input1" label="Column with reference allele" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
32 </when>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
33 <when value="addColsOnly" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
34 </conditional>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
35 </when>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
36 <when value="no">
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
37 <param name="ref" type="data_column" data_ref="input1" label="Column with reference allele" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
38 </when>
0
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
39 </conditional>
1
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
40 <param name="indName" type="text" label="Label for new individual/group" value="na" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
41 </inputs>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
42 <outputs>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
43 <data format="gd_snp" name="out_file1" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
44 </outputs>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
45 <tests>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
46 <test>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
47 <param name="input1" value="pgSnpTest.ref.txt" ftype="interval" dbkey="hg19" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
48 <param name="tab2" value="no" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
49 <param name="ref" value="8" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
50 <param name="indName" value="na" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
51 <output name="output" file="pgSnp2snp_output.txt" />
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
52 </test>
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
53 </tests>
0
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
54
1
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
55 <help>
0
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
56 **Dataset formats**
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
57
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
58 The input dataset is of Galaxy datatype interval_, with the additional columns
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
59 required for pgSnp_ format.
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
60 Any further columns beyond those defined for pgSnp will be ignored.
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
61 The output dataset is a gd_snp_ table. (`Dataset missing?`_)
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
62
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
63 .. _interval: ./static/formatHelp.html#interval
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
64 .. _pgSnp: ./static/formatHelp.html#pgSnp
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
65 .. _gd_snp: ./static/formatHelp.html#gd_snp
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
66 .. _Dataset missing?: ./static/formatHelp.html
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
67
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
68 -----
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
69
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
70 **What it does**
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
71
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
72 This tool converts a pgSnp dataset to gd_snp format, either starting a new
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
73 dataset or appending to an old one. When appending,
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
74 if any new SNPs appear only in the pgSnp file they can either be skipped entirely, or
1
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
75 backfilled with "-1" (meaning "unknown") for previous individuals/groups in the
0
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
76 input gd_snp dataset.
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
77 If any new SNPs are being added (either by creating a new table or by backfilling),
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
78 then an extra column with the reference allele must be supplied in the pgSnp dataset,
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
79 as shown in the example below.
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
80
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
81 -----
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
82
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
83 **Example**
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
84
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
85 - input pgSnp file, with reference allele added::
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
86
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
87 chr1 1888681 1888682 C/T 2 4,3 0.8893,0.8453 T
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
88 chr1 3118325 3118326 T 1 8 0.8796 C
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
89 chr1 3211457 3211458 A/C 2 17,10 0.8610,0.8576 A
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
90 etc.
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
91
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
92 - gd_snp output::
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
93
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
94 chr1 1888681 T C -1 3 4 1 0.8893
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
95 chr1 3118325 C T -1 0 8 0 0.8796
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
96 chr1 3211457 A C -1 17 10 1 0.8576
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
97 etc.
1
57c5ac41f22c planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 0
diff changeset
98 </help>
0
d189d06d23cf Imported from capsule None
devteam
parents:
diff changeset
99 </tool>