lawremi / ggbio

Grid and ggplot2 based visualization for biological data
111 stars 24 forks source link

why layout_karyogram (mm9) with cytoband = TRUE failed #91

Closed ChevyXu closed 7 years ago

ChevyXu commented 7 years ago

Actually, it does't work when I try to use mm9 to construct a ideogram model. But when it turns to hg19 ,there was no error reported.

I download the mm10/hg19 information form biovizBase : ` library("biovizBase") mm10ideogramcyto <- getIdeogram(c("mm10"), cytoband = TRUE) mm10<-keepSeqlevels(mm10ideogramcyto, paste0("chr", c(1:19, "X", "Y")))

hg19ideogramcyto <- getIdeogram(c("hg19"), cytoband = TRUE) hg19<-keepSeqlevels(hg19ideogramcyto, paste0("chr", c(1:22, "X", "Y")))

library(ggbio) library(GenomicRanges)

Ideogram(hg19) Ideogram(mm10) `

hg19 get the chr1 automatically

hg19_chr1

but the mm10 get the error message

` Ideogram(mm10)

use chr1 automatically Error in eval(args.aes$y, data) : object 'y' not found `

could anybody help me with that error, or give some suggestions with mm10's purpose? Thanks

lawremi commented 7 years ago

I checked in a fix to devel. This happens because mice do not have a centromere in the center.

ChevyXu commented 7 years ago

Thanks, BTW, is there any methods that could draw the mm10ideogramcyto in ggbio ?

lawremi commented 7 years ago

Do you mean is there a workaround?