comparison tools/rgenetics/rgfakePhe.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9071e359b9a3
1 <tool id="fakePhe1" name="Null phenotypes">
2 <description>for testing</description>
3 <command interpreter="python">rgfakePhe.py '$infile1.extra_files_path/$infile1.metadata.base_name'
4 "$title1" '$ppheout' '$ppheout.files_path' '$script_file'
5 </command>
6 <inputs>
7 <page>
8 <param name="infile1"
9 type="data" format="pbed,lped"
10 label="Pedigree from Dataset" />
11 <param name="title1" type="text"
12 value="My null phenos" size="60"
13 label="Title for outputs"/>
14 <param name="dbkey" type="hidden" value='hg18' />
15 </page>
16 <page>
17 <repeat name="fakePhe" title="Phenotypes to simulate under the Null">
18 <param name="pName" type="text" label="Phenotype Name">
19 </param>
20 <conditional name="series">
21 <param name="phetype" type="select" label="Phenotype Distribution">
22 <option value="rnorm" selected="true">Random Normal variate</option>
23 <option value="unif">Random Uniform variate</option>
24 <option value="rgamma">Random Gamma variate</option>
25 <option value="weibull">Random Weibull variate</option>
26 <option value="exponential">Random exponential variate</option>
27 <option value="poisson">Random Poisson variate</option>
28 <option value="cat">Random categorical choice</option>
29 </param>
30 <when value="poisson">
31 <param name="lamb" type="integer" value="2" label="Lambda (mean and variance)" />
32 </when>
33 <when value="rnorm">
34 <param name="Mean" type="float" value="0.0" label="Mean" />
35 <param name="SD" type="float" label="SD" value="1.0"/>
36 </when>
37 <when value="exponential">
38 <param name="Mean" type="float" value="1.0" label="Mean" help="lambda for the exponential will be 1.0/Mean" />=
39 </when>
40 <when value="rgamma">
41 <param name="Alpha" type="float" value="10" label="Alpha">
42 </param>
43 <param name="Beta" type="float" label="Beta" value="1.0">
44 </param>
45 </when>
46 <when value="weibull">
47 <param name="Alpha" type="float" value="10" label="Alpha">
48 </param>
49 <param name="Beta" type="float" label="Beta" value="1.0">
50 </param>
51 </when>
52 <when value="unif">
53 <param name="low" type="float" value="0.0" label="Lowest uniform value">
54 </param>
55 <param name="hi" type="float" label="Highest uniform value" value="1.0"
56 help="A uniform value will be generated from the range specified (low to high) - eg 0.0 to 1.0">
57 </param>
58 </when>
59 <when value="cat">
60 <param name="values" type="text" value="A,B,C" label="Comma separated values to choose from"
61 help = "Each of the comma separated values will have an equal probability of being chosen - eg 'A1,A2,B1,B2'">
62 </param>
63 </when>
64 </conditional>
65 </repeat>
66 </page>
67 </inputs>
68 <outputs>
69 <data format="pphe" name="ppheout" metadata_source="infile1" />
70 </outputs>
71 <configfiles>
72 <configfile name="script_file">
73 #for $n, $f in enumerate($fakePhe)
74 #if $f.series.phetype=='rnorm'
75 {'pN':'$f.pName','pT':'rnorm','pP':"{'Mean':'$f.series.Mean', 'SD':'$f.series.SD'}"}
76 #elif $f.series.phetype=='rgamma'
77 {'pN':'$f.pName','pT':'rgamma','pP':"{'Alpha':'$f.series.Alpha', 'Beta':'$f.series.Beta'}"}
78 #elif $f.series.phetype=='poisson'
79 {'pN':'$f.pName','pT':'poisson','pP':"{'lamb':'$f.series.lamb',}"}
80 #elif $f.series.phetype=='exponential'
81 {'pN':'$f.pName','pT':'exponential','pP':"{'Mean':'$f.series.Mean',}"}
82 #elif $f.series.phetype=='weibull'
83 {'pN':'$f.pName','pT':'weibull','pP':"{'Alpha':'$f.series.Alpha', 'Beta':'$f.series.Beta'}"}
84 #elif $f.series.phetype=='cat'
85 {'pN':'$f.pName','pT':'$f.series.phetype','pP':"{'values':'$f.series.values'}"}
86 #elif $f.series.phetype=='unif'
87 {'pN':'$f.pName','pT':'$f.series.phetype','pP':"{'low':'$f.series.low','hi':'$f.series.hi'}"}
88 #end if
89 #end for
90 </configfile>
91 </configfiles>
92 <help>
93 .. class:: infomark
94
95 This tool allows you to generate an arbitrary (sort of)
96 synthetic phenotype file with measurements drawn from normal,
97 gamma, weibull, exponential, uniform or categorical distributions. These are for testing under
98 the null hypothesis of no association - the values are random but
99 from user specified distributions.
100
101 Two output files will appear - one for FBAT and the other for Plink since unfortunately,
102 they have slightly differing requirements for the header row.
103
104 -----
105
106 .. class:: warningmark
107
108 This tool is very experimental
109
110 -----
111
112 - **Pedigree** is a library pedigree file - the id's will be used in the synthetic null phenotypes
113 - **Title** is a name to give to the output phenotype file
114
115 On the next page, you can add an unlimited number of various kinds of phenotypes including choices for
116 categorical ones or distributions with specific parameters
117
118 Just keep using the "Add new phenotype" button to add new specifications until you're done.
119 Use the Execute button to run the program and generate the null phenotype data.
120 The new files will be available on the drop down lists for appropriate tools - eg the
121 FBAT format one will be available if you run the FBAT modelling tool.
122
123 **Attribution**
124 Originally designed and written for the Rgenetics
125 series of Galaxy tools, and
126 copyright Ross Lazarus 2007 (ross period lazarus at gmail period com)
127 Licensed under the terms of the LGPL
128 as documented http://www.gnu.org/licenses/lgpl.html
129
130 </help>
131 </tool>