GVIZ stacking error
1
0
Entering edit mode
d.depledge • 0
@ddepledge-11508
Last seen 5.2 years ago

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 • 1.5k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
Robert Ivanek ▴ 750
@robert-ivanek-5892
Last seen 12 months ago
Switzerland

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

ADD COMMENT
0
Entering edit mode

That works a treat! Thank you for your help on this.

ADD REPLY

Login before adding your answer.

Traffic: 649 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6