Closed komalsrathi closed 6 years ago
The first issue is that there's not enough rom on the screen to actually show you all the nucleotides. You can limit the amount of nucleotides with the nucleotideAmount
parameter - that'll let you experiment a bit and find the limit. Try setting it to 10
to start, and also set showAllNucleotides
to FALSE
.
plotFusionReads(fusion = fusion, showAllNucleotides = FALSE, nucleotideAmount = 10)
I reproduced the second issue this morning on a mac at work. For some reason it draws the arc outside of the actual plot. But it seems to be a mac-specific problem. I'm not able to reproduce the error with my home laptop running Ubuntu. This code:
library(chimeraviz)
if(!exists("defuse833ke"))
defuse833ke <- system.file(
"extdata",
"defuse_833ke_results.filtered.tsv",
package = "chimeraviz")
# Then load the fusion events
fusions <- importDefuse(defuse833ke, "hg19", 1)
fusion <- getFusionById(fusions, 5267)
if(!exists("edbSqliteFile"))
edbSqliteFile <- system.file(
"extdata",
"Homo_sapiens.GRCh37.74.sqlite",
package="chimeraviz")
# Then load it
edb <- ensembldb::EnsDb(edbSqliteFile)
if(!exists("fusion5267and11759reads"))
fusion5267and11759reads <- system.file(
"extdata",
"fusion5267and11759reads.bam",
package = "chimeraviz")
if(!exists("bamfile5267")) {
bamfile5267 <- system.file(
"extdata",
"5267readsAligned.bam",
package="chimeraviz")
}
plotFusion(
fusion = fusion,
bamfile = bamfile5267,
edb = edb,
nonUCSC = TRUE,
reduceTranscripts = TRUE)
Produces this plot for me:
Edit: Back on the mac, that same code produces this plot:
I'll look into this as soon as I can!
Just to show a sign of life: So far I'm clueless. In the plotFusion
function I use Gviz::coords()
to fetch the coordinates of where the exons are plotted in the picture. I use these to decide where to draw the red arc. For some reason the y coordinates those code lines returns on a mac are off. I don't know why yet. I don't really think it's a Gviz issue.
Relevant chimeraviz code from plotFusion.R
:
# Get coordinates for the exons in the plot
exonCoordinates1 <- Gviz::coords(res1$GeneRegionTrack)
exonCoordinates2 <- Gviz::coords(res2$GeneRegionTrack)
After getting some help on the bioc-devel list I got a bit further. The arc turns up where it's supposed to when I use another graphics device. Could you try that as well? I.e. try:
# Load data and example fusion event
defuse833ke <- system.file(
"extdata",
"defuse_833ke_results.filtered.tsv",
package="chimeraviz")
fusions <- importDefuse(defuse833ke, "hg19", 1)
fusion <- getFusionById(fusions, 5267)
# Load edb
edbSqliteFile <- system.file(
"extdata",
"Homo_sapiens.GRCh37.74.sqlite",
package="chimeraviz")
edb <- ensembldb::EnsDb(edbSqliteFile)
# bamfile with reads in the regions of this fusion event
bamfile5267 <- system.file(
"extdata",
"fusion5267and11759reads.bam",
package="chimeraviz")
# Temporary file to store the plot
pngFilename <- "testplot.png"
# Open device
png(pngFilename, width = 1000, height = 750)
# Plot!
plotFusion(
fusion = fusion,
bamfile = bamfile5267,
edb = edb,
nonUCSC = TRUE)
# Close device
dev.off()
and then see what testplot.png
looks like?
Yes this works for me -- thanks! I am testing the entire code now and will update you on it.
Thanks a lot!
Great! I'll look more into the default graphics driver on mac and try to figure out the issue. But I'll close this :)
Hi Stian,
I am facing a lot of graphics issue so for simplicity, I am just using your test code so it is easier for you to reproduce the problem:
At this point, this is the plot I am getting -
Why is it not showing the ATGC and showing colored bars instead?
Another plot that is not showing correctly:
Here the red arc is not showing properly that should connect the two exons of RCC1 and HENMT1.
Here is my sessionInfo: