ivanek / Gviz

This is the Gviz development repository. Gviz plots data and annotation information along genomic coordinates.
https://bioconductor.org/packages/Gviz/
Artistic License 2.0
75 stars 10 forks source link

Error in grid.Call.graphics(C_xspline, x$x, x$y, x$shape, x$open, x$arrow, : non-finite control point in Xspline #92

Open emidalla opened 4 months ago

emidalla commented 4 months ago

Hello, I have been using for months Gviz v1.46.1 to plot CAGE-seq data.

Recently, I switched to a new dataset and, while running this line of code

plotTracks(list(axis_track, link_track_ds_CAGE, cluster_track_ds_CAGE, tx_track), from = start(plot_region_ds_CAGE), to = end(plot_region_ds_CAGE), chromosome = as.character(seqnames(plot_region_ds_CAGE)))

I got the following error:

Error in grid.Call.graphics(C_xspline, x$x, x$y, x$shape, x$open, x$arrow, : non-finite control point in Xspline
Traceback:

1. plotTracks(list(axis_track, link_track_ds_CAGE, cluster_track_ds_CAGE, 
 .     tx_track), from = start(plot_region_ds_CAGE), to = end(plot_region_ds_CAGE), 
 .     chromosome = as.character(seqnames(plot_region_ds_CAGE)))
2. drawGD(expandedTrackList[[i]], minBase = ranges["from"], maxBase = ranges["to"], 
 .     subset = FALSE)
3. drawGD(expandedTrackList[[i]], minBase = ranges["from"], maxBase = ranges["to"], 
 .     subset = FALSE)
4. .local(GdObject, ...)
5. grid.xspline(xs, ys, id.lengths = rep(3, length(outside.indexes)), 
 .     shape = -1, default.units = "native", gp = gpar(col = cols[outside.indexes], 
 .         lwd = lwds[outside.indexes]))
6. grid.draw(xsplineGrob(...))
7. grid.draw.grob(xsplineGrob(...))
8. recordGraphics(drawGrob(x), list(x = x), getNamespace("grid"))
9. drawGrob(x)
10. drawDetails(x, recording = FALSE)
11. drawDetails.xspline(x, recording = FALSE)
12. grid.Call.graphics(C_xspline, x$x, x$y, x$shape, x$open, x$arrow, 
  .     x$repEnds, xsplineIndex(x))

The only difference, between the two examined datasets, is represented by the 'link_track_ds_CAGE' and 'cluster_track_ds_CAGE' objects.

These are the two objects from the dataset that works:

link_track_ds_CAGE

An object of class "InteractionTrack"
Slot "giobject":
GenomicInteractions object with 6 interactions and 5 metadata columns:
      seqnames1   ranges1     seqnames2   ranges2 | orientation  distance
          <Rle> <IRanges>         <Rle> <IRanges> | <character> <integer>
  [1]      chr1 146297776 ---      chr1 146299106 |  downstream      1329
  [2]      chr1 146297868 ---      chr1 146299106 |  downstream      1237
  [3]      chr1 146298141 ---      chr1 146299106 |  downstream       964
  [4]      chr1 146298215 ---      chr1 146299106 |  downstream       890
  [5]      chr1 146298306 ---      chr1 146299106 |  downstream       799
  [6]      chr1 146299792 ---      chr1 146299106 |  downstream       685
       estimate   p.value    counts
      <numeric> <numeric> <integer>
  [1]  1.000000  0.333333         1
  [2]  0.816497  0.220671         1
  [3]  0.816497  0.220671         1
  [4]  0.816497  0.220671         1
  [5]  0.816497  0.220671         1
  [6]  0.816497  0.220671         1
  -------
  regions: 151377 ranges and 5 metadata columns
  seqinfo: 711 sequences (1 circular) from hg38 genome

Slot "variables":
$chromosome
...
[1] "Links"

Slot "imageMap":
NULL
Output is truncated.

cluster_track_ds_CAGE

GeneRegionTrack 'Clusters'
| genome: hg38
| active chromosome: chr1
| annotation features: 12

and these are from the dataset that returns the error:

link_track_ds_CAGE

An object of class "InteractionTrack"
Slot "giobject":
GenomicInteractions object with 8 interactions and 5 metadata columns:
      seqnames1   ranges1     seqnames2   ranges2 | orientation  distance
          <Rle> <IRanges>         <Rle> <IRanges> | <character> <integer>
  [1]      chrY  21163475 ---      chrY  21174990 |  downstream     11514
  [2]      chrY  21175778 ---      chrY  21174990 |    upstream       787
  [3]      chrY  21175849 ---      chrY  21174990 |    upstream       858
  [4]      chrY  21176286 ---      chrY  21174990 |    upstream      1295
  [5]      chrY  21219767 ---      chrY  21174990 |    upstream     44776
  [6]      chrY  21177423 ---      chrY  21174990 |  downstream      2432
  [7]      chrY  21217906 ---      chrY  21174990 |  downstream     42915
  [8]      chrY  21220087 ---      chrY  21174990 |  downstream     45096
       estimate   p.value    counts
      <numeric> <numeric> <integer>
  [1]         1         1         1
  [2]         1         1         1
  [3]         1         1         1
  [4]         1         1         1
  [5]         1         1         1
  [6]         1         1         1
  [7]         1         1         1
  [8]         1         1         1
  -------
  regions: 520654 ranges and 5 metadata columns
...
[1] "Links"

Slot "imageMap":
NULL
Output is truncated.

cluster_track_ds_CAGE

GeneRegionTrack 'Clusters'
| genome: hg38
| active chromosome: chrY
| annotation features: 11

I would be very grateful if you could help.

Best, Emiliano.