Search
Question: Gviz GeneRegionTrack draw only one gene in the range
0
gravatar for tangming2005
2.3 years ago by
tangming200590
United States
tangming200590 wrote:

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

 

ADD COMMENTlink modified 2.3 years ago by Robert Ivanek350 • written 2.3 years ago by tangming200590
2
gravatar for Robert Ivanek
2.3 years ago by
Robert Ivanek350
Switzerland
Robert Ivanek350 wrote:

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 COMMENTlink written 2.3 years ago by Robert Ivanek350

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 REPLYlink modified 2.3 years ago • written 2.3 years ago by tangming200590
1

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 REPLYlink written 2.3 years ago by Robert Ivanek350

Yes, you are right. Thank you very much!

ADD REPLYlink written 2.3 years ago by tangming200590
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 2.2.0
Traffic: 157 users visited in the last hour