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