Problems drawing cytobands with karyoploteR
1
1
Entering edit mode
5.7 years ago
uxiavb ▴ 10

I am working with karyoploteR to represent DEG. I am working with the pombe genome, so I created a custom genome with karyoploteR. But when I try to add the centromeres as cytobands, only the centromeres are represented. Here below is the code I used:

custom.genome <-toGRanges(data.frame(chr=c("I", "II", "III"), start=c(1,1,1), end=c(5579133,4539804,2452883)))
custom.cent <- toGRanges(data.frame(chr=c("I", "II", "III"), start=c(3753687,1602264,1070904), end=c(3789421,1644747,1137003), name=c("cent", "cent", "cent"), gieStain = c("stalk", "stalk", "stalk")))

When I don't use the centromeres information I get the chromosomes:

kp <- plotKaryotype(genome=custom.genome)

Commercial Photography

But when I used the centromeres information, only the centromeres are represented:

kp <- plotKaryotype(genome=custom.genome, cytobands = custom.cent)

Commercial Photography

I am not really sure why it is not working. I was following a package tutorial. Thank you beforehand, Alicia

RNA-Seq R Bioconductor • 2.3k views
ADD COMMENT
2
Entering edit mode

Very nice formatting question, with examples and figures, well done !

I guess that you found a bug in karyoploteR, when the custome.genome display is removed when you add custom.cytobands

I suggest you to open a new issue to bernatgel github : https://github.com/bernatgel/karyoploteR/issues

ADD REPLY
0
Entering edit mode
15 months ago
bernatgel ★ 3.4k

I know it's 4 years later... but just in case someone bumps into this:

This is not a bug in karyoploteR but the expected behavior. If available, the cytobands are not plotted on top of the chromosomes but are used to plot the chromosomes themselves. Actually, if no cytobands are available, karyoploteR internally creates a fake cytobands object with a single gray cytoband per chromosome.

The correct way to add the centromeres would have been to create a cytoband for arm p, the add the centromere, and then a second cytoband for the q arm of each chromosome. Another option to achieve the same effect would have been to plot the chromosomes with no centromeres and then use kpRect of kpPlotRegion to paint the centromeres on the ideogram using data.panel="ideogram". You can find more info in the Data Panels section of the karyoploteR tutorial.

ADD COMMENT

Login before adding your answer.

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