I'm trying to create a probe map, by using R Gviz package. I'm trying to map the probes to the gene IKZF1. However, the final plot displays all the 22 transcripts of the gene. I'm trying to map the probes to the gene at the dna level, displaying just a track of the genes and its exons. But it appears that the plot maps the probes to several transcripts of the gene. I'm using Gviz package of R to do the same. For plotting the gene, I used these commands,
chr <- "chr7"
TxDb<-TxDb.Hsapiens.UCSC.hg38.knownGene
grtrack <- GeneRegionTrack(TxDb, chromosome="chr", start = 50304124, end = 50405101, shape= "arrow")
Can anybody please let me how I can plot just the gene with its exons instead of all the transcripts.
I've attached an example (from a publication) of the plot I'm trying to create.
1 answer
I think the simplest solution is to recreate your gene and manual create it using AnnotationTrack and groupAnnotation. You might be able to play around with stacking = "dense" or collapseTranscripts = TRUE in your plotTracks call but I haven't messed around with it to know if it works with Gene Region Tracks.
Log in to answer this question.