Gviz and gene annotation tracks (error on a chromosome level Tracklist)
1
0
Entering edit mode
just • 0
@just-9837
Last seen 7.7 years ago

Hey guys,

my idea is to plot custom annotation of the regions (microRNAs and promoters) as well as Ensembl annotations of the protein-coding genes. I did the following:

# annotation for microRNA

mir_track <- AnnotationTrack(microrna_range, id="miR-150", genome="GRCh37", name="miR-150",
                             showFeatureId=F, cex.title=1, fill="grey81", size=5,
                             lwd.border.title=5, background.title="grey",lineheight=3,
                             col.title="black", fontcolor="white", cex=5)

> mir_track 
AnnotationTrack 'miR-150'
| genome: GRCh37
| active chromosome: chr19
| annotation features: 1

 

#annotation for promoter

promoter_track <- AnnotationTrack(promoter_grange, id="promoter", genome="GRCh37", name="promoter",
                                  showFeatureId=FALSE, cex.title=1, fill="firebrick3", size=5,
                                  lwd.border.title=5, background.title="grey",
                                  col.title="black", fontcolor="white", stacking="squish") #), rot.title=0)

AnnotationTrack 'promoter'
| genome: GRCh37
| active chromosome: chr19
| annotation features: 1

 

axTrack <- GenomeAxisTrack(littleTicks = TRUE, size=1)

idxTrack <- IdeogramTrack(genome = "hg19", chromosome = "chr19", size=1.5)

 

# ensembl protein-coding genes annotation

library(EnsDb.Hsapiens.v75)
edb <- EnsDb.Hsapiens.v75

gr <- getGeneRegionTrackForGviz(edb, filter = GenebiotypeFilter("protein_coding"), chromosome="chr19", start=start,
                                end=end)

ensembl_genes <- GeneRegionTrack(gr, name="Ensembl genes", fill = "#8282d2", background.title = "brown", 
                                 background.panel = "white", showId =T, geneSymbols=T,
                                 cex.title=1.5)

 

While plotting Im getting the error (although all my tracks are set to chr19).

plotTracks(list(mir_track, promoter_track, ensembl_genes))
Warning message:
In plotTracks(list(mir_track, promoter_track, ensembl_genes)) :
  The track chromosomes in 'trackList' differ. Setting all tracks to chromosome 'chr19'

 

Any ideas what I can do? Thanks for the help!

 

 

 

gviz • 1.8k views
ADD COMMENT
0
Entering edit mode
Johannes Rainer ★ 2.1k
@johannes-rainer-6987
Last seen 4 weeks ago
Italy

Problem could be that Ensembl uses different chromosome names than UCSC does, i.e. chromosome 19 is named chr19 in UCSC and 19 in Ensembl.

You could try to set

seqlevelsStyle(edb) <- "UCSC"

right after edb <- EnsDb.Hsapiens.v75 . That way you tell ensembldb to translate internal Ensembl based chromosome naming to UCSC naming. Check also http://www.bioconductor.org/packages/release/bioc/vignettes/ensembldb/inst/doc/ensembldb.html for examples to use ensembldb with Gviz

Note: Ensembl 75 uses GRCh37 genome build, if you're working with GRCh38 (the most recent genome build) you should use e.g. the EnsDb.Hsapiens.v79 package (or you can easily create your own packages; it's described in the vignette).

cheers, jo

ADD COMMENT

Login before adding your answer.

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