ShixiangWang / sigminer

🌲 An easy-to-use and scalable toolkit for genomic alteration signature (a.k.a. mutational signature) analysis and visualization in R https://shixiangwang.github.io/sigminer/reference/index.html
https://shixiangwang.github.io/sigminer/
Other
141 stars 18 forks source link

show_cn_distribution() y axis clarification #417

Closed rajeha closed 1 year ago

rajeha commented 1 year ago

Hi @ShixiangWang,

Thanks for all the quick responses to my questions on this package. Regarding the show_cn_distribution(mode='cd') function, would you please clarify the y-axis? What is the normalized count? Is it the number of copy number segments per chromosome? In that case, would it show more counts if a chromosome had several small CN segments as opposed to one large continuous segment?

Thanks again!

ShixiangWang commented 1 year ago

@rajeha This calculates the segment count (from your input) for each chromosome, then times it with 1e6/chromosome_size to scale to per MB. So the result value is comparable between chromosomes.

In summary, for each chromosome:

segments x (1 x 10^6) / (chromosome size)

Code implementation is at https://github.com/ShixiangWang/sigminer/blob/95958d14821f862c52e7141daba17c2ba20daf7d/R/show_cn_distribution.R#L118

ShixiangWang commented 1 year ago

If you would not like to do this, set scale_chr to FALSE to get raw counts.

https://shixiangwang.github.io/sigminer/reference/show_cn_distribution.html

rajeha commented 1 year ago

Got it, thanks!