Question: GVIZ stacking error
0
gravatar for d.depledge
27 days ago by
d.depledge0
d.depledge0 wrote:

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)

output plot

gviz • 77 views
ADD COMMENTlink written 27 days ago by d.depledge0

Hi, Could you please send me your GFF file, or at least a relevant part of it? Thanks, Robert

ADD REPLYlink written 26 days ago by Robert Ivanek640

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.

ADD REPLYlink written 26 days ago by d.depledge0

I cannot look into it unless you generate a reproducible example with that error (or share the GFF file)

ADD REPLYlink modified 19 days ago • written 26 days ago by Robert Ivanek640

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

myChr = "Ad5"
myStart = 1
myEnd = 35938
modelsrev<-makeTxDbFromGFF("annotation/problem.gff3")

rtrackmodelsrev <- GeneRegionTrack(modelsrev, genome = "Adenovirus", chromosome = myChr, name = "Gene Model", col="black", fill="grey", stacking="squish", shape="smallArrow", background.title = "transparent",options(ucscChromosomeNames=FALSE)) #squish #dense

plotTracks(list(gtrack,rtrackmodelsrev), from = myStart, to = myEnd, sizes=c(0.1,0.09), type="hist", col.histogram=NA, cex.title=1, cex.axis=1, title.width=1.2)

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...

ADD REPLYlink written 26 days ago by d.depledge0

Wondering if anyone has a handle on this yet? it's a very curious issue...

ADD REPLYlink written 20 days ago by d.depledge0

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.

ADD REPLYlink modified 19 days ago • written 19 days ago by Robert Ivanek640

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 ?

ADD REPLYlink written 13 days ago by d.depledge0

The workaround would be to use collapse=FALSE as a parameter for AnnotationTrack or plotTracks function.

ADD REPLYlink written 19 hours ago by Robert Ivanek640
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 171 users visited in the last hour