Entering edit mode
stianlagstad
▴
90
@stianlagstad-9723
Last seen 5.7 years ago
Is it possible to get fewer ticks on the GenomeAxisTrack? Example:
library(Gviz)
library(biomaRt)
# Create mart
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 = "ENST00000420055"),
biomart = mart)
# Create axis track
axisTrack <- Gviz::GenomeAxisTrack()
Gviz::displayPars(axisTrack) <- list(
add53 = TRUE,
add35 = TRUE,
labelPos = "below",
cex = 1,
col = "black", # line color
fontcolor = "black",
lwd = 1,
littleTicks = TRUE
)
# Plot
Gviz::plotTracks(
list(biomartTrack, axisTrack))

I do want to place the ticks below the axis, but I want fewer of them. As you can see it doesn't look good with this many.

Thanks again for helping a beginner out - Gviz is great! I'll work around it with a smaller font size.