jokergoo / circlize

Circular visualization in R
http://jokergoo.github.io/circlize_book/book/
Other
959 stars 143 forks source link

Can plot genemiclabel outside the circos? #311

Closed ShixiangWang closed 2 years ago

ShixiangWang commented 2 years ago

I checked some issues, but not find a way for Ideogram. I generated an example to show this.

image

Code:

 species = "hg38"
 track_height = 0.2
 ideogram_height = 1
 circlize::circos.initializeWithIdeogram(
    species = species,
    #chromosome.index = chrs,
    track.height = circlize::convert_height(
      track_height,
      "mm"
    ), ideogram.height = circlize::convert_height(
      ideogram_height,
      "mm"
    )
  )

  data = generateRandomBed(100)
  data$label = NA
  data$label[1:10] = LETTERS[1:10]
  circlize::circos.genomicLabels(data, labels = data$label, side = "outside", niceFacing = TRUE)

  circlize::circos.genomicLabels(zz[circular > 0], labels = zz[circular > 0]$gene_id, side = "outside", niceFacing = TRUE)

Best,

Shixiang

ShixiangWang commented 2 years ago

I found how to solve this in circlize book :).