Entering edit mode
stianlagstad
▴
90
@stianlagstad-9723
Last seen 4.8 years ago
Can I set the position of the name of the chromosome when using an IdeogramTrack?
This code:
transcriptID <- "ENST00000421310" chromosome <- "chr6" genome = "hg19" mart <- biomaRt::useMart( biomart = "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host = "dec2013.archive.ensembl.org") # Create transcript track biomartTrack <- Gviz::BiomartGeneRegionTrack( filters = list( ensembl_transcript_id = transcriptID), biomart = mart) biomartTrack <- as(biomartTrack, "GeneRegionTrack") # Set display paramters Gviz::displayPars(biomartTrack) <- list( showId = TRUE, showTitle = FALSE, just.group = "above", cex.group = 2, fontcolor.group = "black" ) # Create ideogram track idTrack <- Gviz::IdeogramTrack( genome = genome, chromosome = chromosome) # Set display paramters Gviz::displayPars(idTrack) <- list( showId = TRUE, fontcolor = "black", fontsize = 25, just.group = "above") # Plot! Gviz::plotTracks( c(idTrack, biomartTrack), from = biomartTrack@start, to = biomartTrack@end, chromosome = chromosome)
Produces this plot:
- I would like the name of the chromosome to be placed above the chromosome, like the transcript name is placed above the transcript. just.group has no effect when used with the IdeogramTrack.
- I would also like it to have the same font size, which I haven't been able to do as the IdeogramTrack uses fontsize while the GeneRegionTrack uses cex.group.
Is it possible to make the chromosome and transcript names appear in the same fashion?