PoisonAlien / trackplot

Generate IGV style locus tracks from bigWig files in R
133 stars 16 forks source link

Negative value scale #6

Closed dgoekbuget closed 2 years ago

dgoekbuget commented 3 years ago

Hi, Thanks for providing this great tool again (just cited it in my recent submission). I am currently working with differential bigwig signal files (e.g. treatment vs ctr signal) and was wondering how to allow the scale to show negative values as well? Thanks for letting me know.

PoisonAlien commented 2 years ago

Hi, Sorry for the late response. Y-axis lower limit is hard-coded to 0. I have not encountered any bigWig files with negative values. Would you mind sharing a sample file?

dfernandezperez commented 2 years ago

A bigwig containing a log ratio between 2 bigwig files (like treatment/control) would have negative values. I don't use it very often but I have used it in the past.

dgoekbuget commented 2 years ago

Hi, thanks for answering. As @dfernandezperez stated, for example the output of bamCompare (deeptools suite) would provide such bigWig files. Here you can find a bw file example from Ok-seq data (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM3290342), which shows the ratio of Watson vs Crick strand read density. Inversion points are considered origins of replication.

PoisonAlien commented 2 years ago

Hello!

Thank you both. I have updated the script and it should automatically detect the y-axis limits. If you prefer, use y_max and y_min for custom ranges. Please let me know if this works.