Gviz GeneRegionTrack draw only one gene in the range
1
0
Entering edit mode
tangming2005 ▴ 190
@tangming2005-6754
Last seen 5 months ago
United States

Hi there,

I want to draw only one gene model in one genomic range ( some genes have overlapping ranges).

How can I do it using GeneRegionTrack in the Gviz package?

I read the tutorial, 

" 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)

How can I specify the filter here?

Thanks,

Ming Tang

 

Gviz • 3.2k views
ADD COMMENT
2
Entering edit mode
Robert Ivanek ▴ 730
@robert-ivanek-5892
Last seen 4 months ago
Switzerland

Please have a look on the documentation of the getBM function from biomaRt package how to specify the filters. Here is an example how you can list all available filters for human genome:

library(biomaRt)
mart <- useMart("ensembl")
mart <- useDataset("hsapiens_gene_ensembl",mart)
listFilters(mart)

The one you are probably interested in is the following:

listFilters(mart)[70,]

So the call in Gviz can look like this:

library(Gviz)
biomTrack <- BiomartGeneRegionTrack(genome = "hg19", name = "ENSEMBL", symbol = "ABCB5", transcriptAnnotation = "symbol", filters=list(hgnc_symbol="ABCB5"))
plotTracks(biomTrack)

 

ADD COMMENT
0
Entering edit mode

Thanks for your answer. It solved my question. Now I want only one specific transcript, but it gave an error. I checked that 

with_ens_hs_transcript is a valid filter.

biomTrack <- BiomartGeneRegionTrack(genome = "hg19", name = "ENSEMBL", symbol = "KIT",
+                                     filters=list(with_ens_hs_transcript="ENST00000288135"))
Error in getBM(as.vector(featureMap), filters = names(filterValues), values = filterValues,  : 
  Invalid filters(s): with_ens_hs_transcript 
Please use the function 'listFilters' to get valid filter names
ADD REPLY
1
Entering edit mode

I am not a biomaRt expert but I would say that the filter "with_ens_hs_transcript" is used to restrict the output only to items with Ensembl Human Transcript IDs but you cannot use it to filter for specific transcript it. For that you need to use filter called "ensembl_transcript_id". Something like this might work for you:

biomTrack <- BiomartGeneRegionTrack(genome = "hg19", name = "ENSEMBL", symbol = "KIT", filters=list(ensembl_transcript_id="ENST00000288135"))
ADD REPLY
0
Entering edit mode

Yes, you are right. Thank you very much!

ADD REPLY

Login before adding your answer.

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