1 | <tool id="rgManQQ1" name="Manhattan/QQ:" version="1.0.1"> |
---|
2 | <code file="rgManQQ_code.py"/> |
---|
3 | |
---|
4 | <description>Plots for WGA P values</description> |
---|
5 | |
---|
6 | <command interpreter="python"> |
---|
7 | rgManQQ.py '$i' "$name" '$out_html' '$out_html.files_path' '$chrom_col' '$offset_col' '$pval_col' '$grey' |
---|
8 | </command> |
---|
9 | |
---|
10 | <inputs> |
---|
11 | <page> |
---|
12 | <param name="i" type="data" label="Tabular data from your current history" |
---|
13 | format="tabular" refresh_on_change="true"/> |
---|
14 | </page> |
---|
15 | <page> |
---|
16 | <param name='name' type='text' size="132" value='Manhattan and QQ plots' label="Title for this job"/> |
---|
17 | <param name="pval_col" type='select' size="5" label = 'P value (0-1) column in input file' |
---|
18 | dynamic_options="get_phecols(i,False,'pval')" refresh_on_change="true" multiple="true" |
---|
19 | help="(Select multiple P value columns for multiple plots holding down the [Ctrl] key as you click)" /> |
---|
20 | <param name="chrom_col" type='select' label = 'Chromosome column in input file' |
---|
21 | help='Select "None" if chromosome not available or no Manhattan plot required' |
---|
22 | dynamic_options="get_phecols(i,True,'chr')" /> |
---|
23 | <param name="offset_col" type='select' label = 'Base pair offset column in input file' |
---|
24 | help='Select "None" if offset not available or no Manhattan plot required' |
---|
25 | dynamic_options="get_phecols(i,True,'offs')" /> |
---|
26 | <param name="grey" type="boolean" checked="false" truevalue="true" falsevalue="false" |
---|
27 | label="Grey scale for Manhattan plot (default is colour"/> |
---|
28 | </page> |
---|
29 | </inputs> |
---|
30 | |
---|
31 | <outputs> |
---|
32 | <data format="html" name="out_html" /> |
---|
33 | </outputs> |
---|
34 | <options refresh="True"/> |
---|
35 | |
---|
36 | <tests> |
---|
37 | <test> |
---|
38 | <param name='i' value='smallwgaP.xls' ftype='tabular' > |
---|
39 | </param> |
---|
40 | <param name='name' value='rgManQQtest1' /> |
---|
41 | <param name='pval_col' value='7' /> |
---|
42 | <param name='chrom_col' value='1' /> |
---|
43 | <param name='offset_col' value='2' /> |
---|
44 | <param name='grey' value='0' /> |
---|
45 | <output name='out_html' file='rgtestouts/rgManQQ/rgManQQtest1.html' ftype='html' lines_diff='40'> |
---|
46 | <extra_files type="file" name='Allelep_manhattan.png' value='rgtestouts/rgManQQ/Allelep_manhattan.png' compare="sim_size" |
---|
47 | delta = "10000"/> |
---|
48 | <extra_files type="file" name='Allelep_qqplot.png' value='rgtestouts/rgManQQ/Allelep_qqplot.png' compare="sim_size" |
---|
49 | delta = "10000" /> |
---|
50 | <extra_files type="file" name='rgManQQtest1.R' value='rgtestouts/rgManQQ/rgManQQtest1.R' compare="diff" lines_diff="160"/> |
---|
51 | </output> |
---|
52 | </test> |
---|
53 | </tests> |
---|
54 | <help> |
---|
55 | |
---|
56 | .. class:: infomark |
---|
57 | |
---|
58 | **Syntax** |
---|
59 | |
---|
60 | - **Tabular Data** is a tab delimited header file with chromosome, offset and p values to be plotted |
---|
61 | - **Chromosome Column** is the column in that data containing the chromosome as an integer |
---|
62 | - **Offset Column** contains the offset within the chromosome |
---|
63 | - **P Value Column** contains the (untransformed) p values at that locus - choose multiple columns if needed |
---|
64 | |
---|
65 | NOTE - plotting millions of p values may take tens of minutes depending on |
---|
66 | how busy the server is - be patient please. |
---|
67 | |
---|
68 | ----- |
---|
69 | |
---|
70 | .. class:: infomark |
---|
71 | |
---|
72 | **Summary** |
---|
73 | |
---|
74 | This tool will create a qq plot and a Manhattan plot for one or more GWA P value columns from a tabular |
---|
75 | dataset. For Manhattan plots, the data must include the chromosome (eg use 23,24,25 for x,y,mt...) and |
---|
76 | offset. Many analysis files contain the required fields but even without chromosome and offset, a qq plot |
---|
77 | can be created. |
---|
78 | |
---|
79 | ----- |
---|
80 | |
---|
81 | .. class:: infomark |
---|
82 | |
---|
83 | **Explanation** |
---|
84 | |
---|
85 | A "Manhattan" plot shows -log10 p values ordered by offset and by chromosome. Regions with interestingly |
---|
86 | improbable p values are above the red line which is drawn at the Bonferroni FWER control level (0.05/n |
---|
87 | where n is the number of tests - this is highly conservative for correlated SNPs typical of GWA) |
---|
88 | |
---|
89 | .. image:: ../static/images/Armitagep_manhattan.png |
---|
90 | |
---|
91 | A quantile-quantile (QQ) plot is a good way to see systematic departures from the null expectation of |
---|
92 | uniform p-values from a genomic analysis. If the QQ plot shows departure from the null (ie a uniform 0-1 |
---|
93 | distribution), you hope that this will be in the very smallest p-values suggesting that there might be some |
---|
94 | interesting results to look at. A log scale will help emphasise departures from the null at low p values |
---|
95 | more clear |
---|
96 | |
---|
97 | .. image:: ../static/images/Armitagep_qqplot.png |
---|
98 | |
---|
99 | ----- |
---|
100 | |
---|
101 | .. class:: infomark |
---|
102 | |
---|
103 | **Attribution** |
---|
104 | |
---|
105 | This is a Galaxy tool written by Ross Lazarus. It relies on |
---|
106 | ggplot2, an R package from hadley wickham and some |
---|
107 | R code for manhattan and qq plots using ggplot2, |
---|
108 | borrowed from Stephen Turner found at http://GettingGeneticsDone.blogspot.com/ |
---|
109 | |
---|
110 | copyright Ross Lazarus 2010 |
---|
111 | Licensed under the terms of the LGPL as documented http://www.gnu.org/licenses/lgpl.html |
---|
112 | but is about as useful as a chocolate teapot without R and Galaxy which all have a |
---|
113 | twisty maze of little licenses, all different. |
---|
114 | |
---|
115 | I'm no lawyer, but it looks like at least LGPL if you create derived works from this code. |
---|
116 | Good luck. |
---|
117 | |
---|
118 | </help> |
---|
119 | </tool> |
---|