You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first position on the chromosome distance labeling at the bottom is 1, when it should be 0 Mb. The first base in my chromosomes file is 1 (1-based) (not 0-based). When I switch it to 0-based to try to fix it, a different issue comes up - the place where a 1 should be, becomes 1000 (the other positions are fine).
Sorry for taking this long to answer. This issue got under my radar.
@sihellem In your case, the most probable cause is that you have named your genome file ".bed". BED files use 0-based half-open (] ranges so when reading the file karyoploteR transforms them to closed [] ranges. With this, it interprets the first coordinate (1) as "just before my interval" and so the chromosome starts with 2. Simply changing the name of the file from .bed to .txt should do the trick, since any other file format is interpreted as closed ranges. Alternatively, you can define your genome directly in R with
my.genome <- toGRanges("scaffold_1:1-13392817")
@dansapozhnikov Regarding your first issue, it should be solved adding "add.units=TRUE" to the kpAddBaseNumbers call, since the first 1 is base 1 and the second one is base 1 million. With bases that should be clear.
Regrading your second issue, I've not seen this problem before and it's strange. Could you please send me the data producing this error and the code you are using so I can track the root of the problem?
Hi, I am seeing an issue here:
The first position on the chromosome distance labeling at the bottom is 1, when it should be 0 Mb. The first base in my chromosomes file is 1 (1-based) (not 0-based). When I switch it to 0-based to try to fix it, a different issue comes up - the place where a 1 should be, becomes 1000 (the other positions are fine).
kpAddBaseNumbers(kp, tick.dist = 1000000, tick.len = 10, tick.col="red", cex=1.1, minor.tick.dist = 100000, minor.tick.len = 5, minor.tick.col = "gray")
Thanks!
Dan
The text was updated successfully, but these errors were encountered: