Hi,
I'm using GVIZ with a custom built GFF3 file and am getting some curious artifacts in my output plot.
The main issue is the false incorporation of an exon into a multi-exon unit (right side of image). Here the red hatched box shows the exon which should stand alone at the position indicated by the blue box.
A second smaller issue (seen on the left) is that a thin horizontal line is drawn (not clear to me why) and the exon which should be placed at that location is vertically displaced (now at the bottom of the screen).
Both issues go away if I zoom in to specific loci but return when I zoom out (by changing the mapping co-ordinates) which suggests to me it is a stacking error rather than anything to do with the underlying GFF3 file (which looks normal in IGV).
I would appreciate any advice that can be offered on this
modelsfor<-makeTxDbFromGFF("annotation/virus_v8.1_forward.gff3")
rtrackmodelsfor <- GeneRegionTrack(modelsfor, genome = "virus", chromosome = myChr, name = "Gene Model", col="black", fill="grey", stacking="squish", shape="smallArrow", background.title = "transparent", options(ucscChromosomeNames=FALSE))
plotTracks(list(rtrackmodelsfor,gtrack), from = myStart, to = myEnd, type="hist", col.histogram=NA, cex.title=1, cex.axis=1, title.width=1.2)
Hi, Could you please send me your GFF file, or at least a relevant part of it? Thanks, Robert
As it happens I have managed to solve the problem. The curiosity is that the error was solved simply by renaming a gene (and it's associated mRNA) from pics -> vex.
Interestingly, I could replicate this error (or variations thereof) by changing any of my gene names to anything starting with 'pi...'.
This seems like a very curious error.
I cannot look into it unless you generate a reproducible example with that error (or share the GFF file)
While the first problem is resolved - here is a second one using this simple GFF3
##gff-version 3
##sequence-region Ad5 1 35938
Ad5 RefSeq gene 4057 5836 . - . ID=gene.IVa2;Name=gene.IVa2 Ad5 RefSeq mRNA 4057 5836 . - . ID=mRNA.IVa2;Parent=gene.IVa2;Name=IVa2;class=late Ad5 RefSeq exon 5706 5836 . - . ID=exon1.IVa2;Parent=mRNA.IVa2 Ad5 RefSeq exon 4057 5427 . - . ID=exon2.IVa2;Parent=mRNA.IVa2 Ad5 RefSeq CDS 5706 5718 . - 0 ID=IVa2;Parent=exon1.IVa2;Name=IVa2;product=IVa2;proteinid=AP000201.1 Ad5 RefSeq CDS 4091 5427 . - 2 ID=IVa2;Parent=exon2.IVa2;Name=IVa2;product=IVa2;proteinid=AP000201.1
Specifically the problem is that the CDS is shown to occupy the entire second exon in the resulting image whereas it should only occupy a small portion (as specified by the GFF3). If you change to myEnd = 10000 then the problem goes away and the exon / CDS structures are shown correctly.
Can you shed any light on why this is happening? It seemingly only effects the 5' end of transcripts...
Wondering if anyone has a handle on this yet? it's a very curious issue...
The reason for this behaviour is following:
Gviz
checks the resolution of the plotting device and tries to collapse features for which there might not be enough space/resolution in the resulting plot. It collapses them based on a hierarchy. Maybe it is set to strictly, I will try to relaxed it.Did you have any joy with relaxing the parameters? Alternatively, do you know a way I can change the resolution in the plotting device to prevent this happening ?