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