Question about BiomartGeneRegionTrack
0
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 5.8 years ago
Switzerland
What you are trying to do is not that straight forward. What do you want to do with overlapping exons from different transcript models? Do you just want to merge them? And how treat UTRs that are overlapping with coding exons in other transcripts, as it is the case for your THADA gene? In principle the tracks in the Gviz package are just GRanges objects, so you could modify them using existing tools. You may want to treat the separate genes individually, so splitting the GRanges object into a GRangesList should help. I don't think that there is anything useful that could be done with the UTR information, so I'd skip it completely and just treat all exons as coding exons. The following untested code might do what you want to archive: gen="hg19" chr="2" start=43625705 end= 43826133 biomTrack <- BiomartGeneRegionTrack(genome = gen, chromosome = chr, start = start, end = end, name = "ENSEMBL") plotTracks(biomTrack, showId=TRUE) feature(biomTrack) <- "protein_coding" r <- split(ranges(biomTrack), gene(biomTrack)) rNew <- endoapply(r, function(x){ rx <- reduce(x, with.mapping=TRUE) mcols(rx) <- mcols(x)[sapply(rx$mapping, head, 1),] rx$transcript <- rx$gene rx }) ranges(biomTrack) <- unlist(rNew) plotTracks(biomTrack, showId=TRUE) Florian From: Tiphaine Martin <tiphaine.martin@kcl.ac.uk<mailto:tiphaine.martin@kcl.ac.uk>> Date: Friday, February 21, 2014 5:19 PM To: Florian Hahne <florian.hahne@novartis.com<mailto:florian.hahne@novartis.com>> Cc: "bioconductor@r-project.org<mailto:bioconductor@r-project.org>" <bioconductor@r-project.org<mailto:bioconductor@r-project.org>> Subject: Question about BiomartGeneRegionTrack end = end, name = "ENSEMBL",stacking="squish") [[alternative HTML version deleted]]
Gviz Gviz • 1.1k views
ADD COMMENT

Login before adding your answer.

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