0

I am new to R and I have been using chromoMap library in R to visualize annotation plots and visualizing the feature-associated data. It's a great library and produces great charts. However, I was not able to find any option for changing the x-axis label from length (bp) to anything else. Because of this, I am not able to use any of the produced charts. It sounds like a small issue, but it totally affects the usability of this great package. I followed this tutorial link and produced the below chart. In my chart and all the samples, the x-axis label is fixed and this is my problem and I am looking for a way to just change it.

library(chromoMap)
chr_file_1 = "chr_file_without_centromere.txt"
anno_file_1 = "annotation_pos.txt"
chromoMap(chr_file_1,anno_file_1)

enter image description here

I am wondering if anybody has the same experience ?? This package produces output as a htmlwidget object and therefore I could not change the x-axis lable. Is there any way to modify a htmlwidget object? or Any way to change this bp to something else??

neilfws
  • 32,751
  • 5
  • 50
  • 63
Hamid_UMB
  • 317
  • 4
  • 16
  • It's not going to be easy, since the x-axis label is [hard-coded in the underlying Javascript](https://github.com/cran/chromoMap/blob/master/inst/htmlwidgets/lib/chromoMap-3.0/chromoMap-3.0.js). – neilfws May 31 '21 at 03:43
  • @neilfws thank you for your comments. If I change the javascript file and compile it again, it would work? – Hamid_UMB May 31 '21 at 13:32
  • I would think you would have to download the package as a zip file, edit the .js file and then install from the zip. Another option might be to locate and edit the .js file after installation. – neilfws Jun 02 '21 at 08:44
  • Just to add: of course, you would need to re-edit the .js file if the package is ever updated. – neilfws Jun 02 '21 at 22:22

0 Answers0