Gviz: BiomartGeneRegionTrack filters=??
3
0
Entering edit mode
@ahlberggustav-8979
Last seen 8.3 years ago
United States

Hi,

I would like to use BiomartGeneRegionTrack to plot some transcript in a region.  In that region I only wanted one specific gene so I tried to use the filters option. The documentation to the function references to the getBM() function. 
If I would use getBM i would have written something like: 

filters = "hgnc_symbol",values = geneName

This is not the same BiomartGeneRegionTrack, since you cannot add any value to your filter, i.e do any type of filtering. 

Does anyone know how this would work?

Thanks,

gviz • 2.7k views
ADD COMMENT
1
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
Switzerland

Page 45 of the package vignette should be helpful here:

The filter argument to the BiomartGeneRegionTrack constructor can be used to pass on arbitratry additional filters to the Biomart query. We could for instance limit the returned gene models to RefSeq models only. Please see the documentation in the biomaRt package for details.

> biomTrack <- BiomartGeneRegionTrack(genome = "hg19",
+      chromosome = chr, start = 20000000, end = 21000000,
+      name = "ENSEMBL", filter = list(with_ox_refseq_mrna = TRUE))
> plotTracks(biomTrack, col.line = NULL, col = NULL,
+     stackHeight = 0.3)

The filter argument is a regular list, where the list item name is mapped to a filter name, and the list item value is used as the filter value. However, reading on to the next paragraph, you will find this piece of information:

Sometimes it can be more convenient to get a model for a particular gene rather than defining a genomic range. One could use the filter mechanisms as described before for this purpose, however the BiomartGeneRegionTrack implements a more generic way. By providing the gene symbol as the symbol argument, the track will be initialized around the locus for this gene, if it can be found. Alternatively, one can provide the Ensembl trancript or gene id via the transcript or gene arguments, or an Entrez id via the entrez argument. In all of these cases the constructor will also fetch models for other genes that overlap the same region. If that is not desired one needs to provide an explicit Biomart filter.

> biomTrack <- BiomartGeneRegionTrack(genome = "hg19",
+     name = "ENSEMBL", symbol = "ABCB5")
> plotTracks(biomTrack)
ADD COMMENT
0
Entering edit mode

I would like to plot canonical transcripts using BiomartGeneRegionTrack in a certain region.

I tried 

    filters=list(canonical_transcript = TRUE)

but it gives me an error.

Any suggestions how to fix this?

ADD REPLY
0
Entering edit mode
@ahlberggustav-8979
Last seen 8.3 years ago
United States

Great thanks, 
Got it now. 
The last example did not work though. 

biomTrack <- BiomartGeneRegionTrack(genome = "hg19",
+     name = "ENSEMBL", symbol = "ABCB5")

Error in BiomartGeneRegionTrack(genome = "hg19", name = "ENSEMBL", symbol = "ABCB5") : 
  Need to specify a start and end for creating a BiomartGeneRegionTrack.

 

So I got what I wanted by:
BiomartGeneRegionTrack(genome = "hg19", filters=list(hgnc_symbol="ABCB5" ),chromosome = chr, start = start, end = end)

 

 

ADD COMMENT
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
Switzerland

I assume that your Gviz version is outdated. The example works in version Gviz_1.13.7

Keeping your R and Bioconductor versions up to date is advisable. Otherwise you will miss out on new features.

Florian

ADD COMMENT

Login before adding your answer.

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