Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # problems plotting trancripts on same line
- ensembl_transcript_id_A <- "ENST00000561401"
- ensembl_transcript_id_B <- "ENST00000560818"
- mart <- biomaRt::useMart(
- biomart = "ENSEMBL_MART_ENSEMBL",
- dataset = "hsapiens_gene_ensembl",
- host = "dec2013.archive.ensembl.org")
- biomartBoth <- Gviz::BiomartGeneRegionTrack(
- filters = list(
- ensembl_transcript_id = c(ensembl_transcript_id_B,
- ensembl_transcript_id_A)),
- biomart = mart)
- # Create axis track
- axisTrack <- Gviz::GenomeAxisTrack()
- # works as expected:
- Gviz::plotTracks(
- c(biomartBoth, axisTrack),
- from = biomartBoth@start,
- to = biomartBoth@end,
- chromosome = rep("chr15", 2),
- showId = TRUE,
- just.group = "below"
- )
- # plots the transcript on different lines:
- Gviz::plotTracks(
- c(biomartBoth, axisTrack),
- from = biomartBoth@start,
- to = biomartBoth@end,
- chromosome = rep("chr15", 2),
- showId = TRUE,
- just.group = "below",
- reverseStrand = TRUE
- )
- # if I turn showId off, it works as expected again:
- Gviz::plotTracks(
- c(biomartBoth, axisTrack),
- from = biomartBoth@start,
- to = biomartBoth@end,
- chromosome = rep("chr15", 2),
- showId = FALSE,
- just.group = "below",
- reverseStrand = TRUE
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement