Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kpAddBaseNumbers incorrect first tick label if tick.dist is set to <= 1Mbp #154

Open
JKing2000 opened this issue Aug 6, 2024 · 0 comments

Comments

@JKing2000
Copy link

JKing2000 commented Aug 6, 2024

Hi, when I set tick distance of kpAddBaseNumbers to 1Mbp or below, it seem to incorrectly label the first tick (by multiplying 1000 to it). Not sure if this is a bug or something's wrong in my code?

This is the code I used:

custom.genome <- toGRanges("/path/to/genomeLength.tsv")
filter <- scan("/path/to/filter.lst", character())

pp <- getDefaultPlotParams(plot.type=1)
pdf(width=32, height=64, file="/path/to/plot.pdf")
kp <- plotKaryotype(genome=custom.genome, chromosomes=filter, plot.type=1, plot.params=pp, cytobands = custom.genome)
kpDataBackground(kp)
kpAddBaseNumbers(kp, tick.dist = 1000000, tick.len = 10, tick.col="red", cex=1,
                 minor.tick.dist = 100000, minor.tick.len = 5, minor.tick.col = "gray")
dev.off()

below is a screen shot showing part of the final plot, as you can see the first tick is labelled as 1000 when it should be 1
test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant