How to add a custom chromosome labels in qqman R package?
2
0
Entering edit mode
2.0 years ago
rimgubaev ▴ 270

Hello everyone? I wonder if someone knows how to change the chromosome labels at qqman package? I am making a manhattan plot using manhattan function which adds numeric chromosome codes to the x-axis like this:

enter image description here

However, the species under study has 2 subgenomes (A and C) so the chromosome codes should look like that: A1, A2... and C1, C2... And the manhattan x-axis would be like that:

enter image description here

I didn't find the solution for such a problem, so please, help.

qqman GWAS manhattan plot chromosome labels • 2.3k views
ADD COMMENT
3
Entering edit mode
2.0 years ago
rimgubaev ▴ 270

Looks like the answer was much closer. I just neded to add an chrlabs option and add a vector of new names! Thank you guys! The command would look like these:

manhattan(results.df, chr="Chr", bp="Pos", p="p", snp = "Marker", chrlabs = new.names)

Where new.names is a character vector of size equal to the number of the chromosomes.

ADD COMMENT
2
Entering edit mode
2.0 years ago
bernatgel ★ 3.2k

Hi,

I don't know how to do that with qqman, but if you are willing to try another package, you can do that with karyoploteR.

You can use kpPlotManhattan on a custom genome for your species and it will use whatever chromosome names you specify. It's quite easy to customize and very flexible regarding their look and feel: you can highlight specific regions in different ways, overlay different plots (even multiple manhattans as in you second image, can remove the ideograms, etc...

enter image description here

ADD COMMENT

Login before adding your answer.

Traffic: 1578 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