CMplot icon indicating copy to clipboard operation
CMplot copied to clipboard

How can I change the Mb to Kb or bp?

Open Garen2994 opened this issue 6 years ago • 4 comments

Hello! I want to change current default unit (Mb) to Kb, but I don't know which parameter I should change?Hope your reply~Thanks!

Garen2994 avatar Sep 20 '19 04:09 Garen2994

Hi, Thanks for using CMplot, would you mind attaching a image here please? as I am not sure which type of plot you mentioned. Best, Lilin

YinLiLin avatar Sep 20 '19 05:09 YinLiLin

Hi,Lilin Sorry for my unclear expression.I mean I want to change the unit MB of x-axis to kb in this SNP-density plot (Sorry for my data is secret),because the density of this dataset is low. I read the manual and your source code, but I still can't find a parameter to override ,which can change the Mb of x-axis to Kb. Is that able to change? Would you mind give me some pointers please? Thanks for your reply! Best regards garen hou
image

Garen2994 avatar Sep 20 '19 05:09 Garen2994

Hi garen,

I have updated CMplot on GitHub, the unit of x-axis will be changed automatically depending on the max value of the chromosome position, that means if the max length of all chromosomes is less than 1Mb, CMplot will turn into Kb unit, but in this case, you should pay attention to assign a appropriate bin.size, for example 1e3 rather then 1e6. please source (see the manual) the online script of CMplot instead of library(CMplot), then have a try to see if it meets your requirements, please let me know if there is still a problem with your case.

Best, Lilin

YinLiLin avatar Sep 21 '19 11:09 YinLiLin

Thank u lin.I have already solved this problem! Thank u for designedly tweaking your code. Best wishes to you. garen

Garen2994 avatar Sep 22 '19 09:09 Garen2994