Plotting Cnv Association And Gwas Association In A Single Plot
2
2
Entering edit mode
13.3 years ago
Ryan D ★ 3.4k

I'm familiar with some ways to make Manhattan plots, the easiest and most flexible I've found is Stephen Turner's qqman, from Getting Genetics Done, located here.

Manhattans are useful for showing P-values for individual SNPs, but is there a simple way to include other types of genetic architecture in such a plot? Specifically I am interested in plotting (as bars or in a different color) CNVs that may overlap these SNPs and span 10s to 100s of kb. Best way to do this? Any programs that permit p-values for more than SNPs and yet permit a Manhattan-esque (that is genome-wide) presentation of results?

cnv gwas visualization • 5.6k views
ADD COMMENT
3
Entering edit mode
13.3 years ago
brentp 24k

I have a script that generates manhattan plots here.

The code is quite simple and I think it would be easy to add bars. You can just find the ax object in the code and use ax.axhspan() or ax.add_patch(plt.Rectangle()) to show the CNV's.

ADD COMMENT
0
Entering edit mode

Thanks. But I'm getting some error when I try to execute it.

[rx@brie ~] python manhattan-plot.py --cols 0,1,2 delete.txt File "manhattan-plot.py", line 26 achr = a[3:] if a.startswith("chr") else a ^ SyntaxError: invalid syntax

Any ideas?

ADD REPLY
0
Entering edit mode

Yes, use python2.7. :) or change it to if a.startswith("chr"): achr = a[3:] n else: achr = a

ADD REPLY
0
Entering edit mode

I have a file with chr, start, end, log2ratio from segmented tumor/normal copy number data. I notice you script takes in chr, position, and value only, do you suggest I take the midpoint between start and end of each segments as "position" ?

ADD REPLY
2
Entering edit mode
13.3 years ago
Neilfws 49k

Since these plots are essentially just quantitative data (Y) versus chromosomal coordinates (X), I'm guessing you could cook something up using GenomeGraphs.

ADD COMMENT
0
Entering edit mode

This looks like it might be useful, though it's not immediately clear to me from the manual that this would excel in generating Manhattan style plots.

ADD REPLY

Login before adding your answer.

Traffic: 2650 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6