Gviz - Split a GeneRegionTrack by strand
0
0
Entering edit mode
@romainfenouil-9584
Last seen 8.2 years ago

Hello,

I am new to Gviz and I first want to thank you for the awesome work.

I am trying to get a track around a gene of interest using biomaRt (with the addition of a filter in order to only keep the gene of interest) like this :

annoTrack <- BiomartGeneRegionTrack(genome="hg19", name="ENSEMBL", symbol="ACTB" , filter=list(hgnc_symbol="ACTB"));

That seems to work and I am then able to plot 'annoTrack' correctly. I however have trouble understanding the description of annoTrack object :

> annoTrack
GeneRegionTrack 'ENSEMBL'
| genome: hg19
| active chromosome: chr7
| annotation features: 3176

It seems to contain information for all surrounding annotations, not only the one selected using biomaRt filter.

Question 1. I therefore can't understand the internal process of filtering, and whether it applies when fetching data from biomaRt database, or at plotting. Can you please tell me more about these 3176 annotation features ?

Question 2. I can't find in the documentation (maybe I didn't search properly) what detailed process is happening when using 'symbol' argument in the constructor 'BiomartGeneRegionTrack'. Does it fetch all annotations on the relevant chromosome ? Does it restrict it to an extended range around the annotation (I guess), and if yes, what is this range ?

 

Secondly, with no filtering, I fetch annotations around my gene of interest like this :

annoTrack <- BiomartGeneRegionTrack(genome="hg19", name="ENSEMBL", symbol="ACTB")

I then try to split this track in two different tracks, one with genes on positive strand and another one with genes on negative strand :

annoTrackListStrands <- split(annoTrack, factor(strand(annoTrack), levels=c("+", "-")))

It seems to create two different objects, containing different features :

>annoTrackListStrands
$`+`
GeneRegionTrack 'ENSEMBL'
| genome: hg19
| active chromosome: chr7
| annotation features: 1713

$`-`
GeneRegionTrack 'ENSEMBL'
| genome: hg19
| active chromosome: chr7
| annotation features: 1463

However when trying to plot these tracks, I end up with duplicated graphic tracks, that seem to contain all features from initial track :

plotTracks(c(annoTrackListStrands, GenomeAxisTrack()))

Question 3. I am therefore a bit confused by the relation between what information is contained in a GeneRegionTrack and what is used when using plotTracks.

Is there a simple way to split these tracks in different subgroups ?

 

Sorry about the long post but your package is very interesting and I would like to understand it better in order to use it correctly.

 

Best regards,

Romain.

gviz • 1.2k views
ADD COMMENT

Login before adding your answer.

Traffic: 543 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