annotate tools/rgenetics/rgManQQ.xml @ 1:cdcb0ce84a1b

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