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

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:

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:

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

qqman GWAS manhattan plot chromosome labels • 3.4k views
3
Entering edit mode
3.0 years ago
rimgubaev ▴ 310

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.

2
Entering edit mode
3.0 years ago
bernatgel ★ 3.3k

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...