lawremi / ggbio

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

Circos track ranges misaligned relative to ideogram? #121

Open vkartha opened 4 years ago

vkartha commented 4 years ago

Plotting a few sample coordinates, appears they are plotting out of range of the chromosomal boundaries. I double checked to ensure none of these coordinates are outside of the boundary

myGranges GRanges object with 494 ranges and 0 metadata columns: seqnames ranges strand

[1] 1 1051630 * [2] 1 1093015 * [3] 1 1167437 * [4] 1 1310799 * [5] 1 1334844 * ... ... ... ... [490] 1 247565685 * [491] 1 247571686 * [492] 1 247581287 * [493] 1 247609442 * [494] 1 249123244 * ------- seqinfo: 23 sequences from an unspecified genome; no seqlengths max(end(myGranges)) [1] 249123244 hg19sub GRanges object with 22 ranges and 0 metadata columns: seqnames ranges strand [1] 1 1-249250621 * ... ... As you can see, none of the end coordinates of my custom ranges are outside the bounds of the chromosome, yet I see lines appeareing to the left of chr1 (relative to the ideogram):

Here is the function call to generate the plot: p <- ggbio() + circle(myGranges, geom = "rect", color = "darkorange",size=0.1) + circle(hg19sub, geom = "ideo", fill = "gray70") + circle(hg19sub, geom = "text", aes(label = seqnames), vjust = 0, size = 3)

Screenshot of output: image

Only showing chr1, it gets worse in terms of moving out of boundaries if I include more hits

I tried this with the test data (mut.gr) shown in the package vignette, and that wasn't the case, so not sure what's going on

amyruthvandiver commented 3 years ago

Did you ever find a resolution to this? I am having similar issues.