GangCaoLab / CoolBox

Jupyter notebook based genomic data visualization toolkit.
https://gangcaolab.github.io/CoolBox/index.html
GNU General Public License v3.0
224 stars 37 forks source link

how to plot different colors for bigwig files when y axis is less than 0 #100

Closed jiangshan529 closed 2 months ago

jiangshan529 commented 2 months ago

hi, currently, when I plot a bigwig track I can only choose one color. However, when I need to plot insulation bigwig tracks, I need to set two different color for values greater than 0 or smaller than 0. How to plot different color for one bigwig file? Thanks!

The current one I got is like this, I want values greater than 0 be blue. image

Nanguage commented 2 months ago

Hi, you can use the threshold_color parameter of the BigWig class, see https://gangcaolab.github.io/CoolBox/api.html#coolbox.core.track.BigWig

jiangshan529 commented 2 months ago

Hi, you can use the threshold_color parameter of the BigWig class, see https://gangcaolab.github.io/CoolBox/api.html#coolbox.core.track.BigWig

Thanks! Like this one: frame = XAxis() + \ BigWig(f"{DATADIR}/bigwig{RANGE_MARK}.bw") + \ Color("#ce00ce") + TrackHeight(5) + \ MinValue(0) + MaxValue(50),

How should I write threshold_color parameter, I mean especially for the upper case and little case. I have tried some, but they are not defined.

Nanguage commented 2 months ago

Like this: BigWig(xxx, threshold_color=xxx)

jiangshan529 commented 2 months ago

Thank you!

On Wed, Jun 12, 2024 at 7:04 AM weize @.***> wrote:

Like this: BigWig(xxx, threshold_color=xxx)

— Reply to this email directly, view it on GitHub https://github.com/GangCaoLab/CoolBox/issues/100#issuecomment-2162728155, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR5WZOU6WUXCOAJW5I2LV7DZHATL5AVCNFSM6AAAAABJCPSBO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRSG4ZDQMJVGU . You are receiving this because you authored the thread.Message ID: @.***>

jiangshan529 commented 3 weeks ago

Like this: BigWig(xxx, threshold_color=xxx)

hi, can I use coolbox to plot hic file off diagnol, like this: image

Nanguage commented 3 weeks ago

Yes, you can take a look to see if this is what you want. https://gangcaolab.github.io/CoolBox/_gallery/joint_view.html

jiangshan529 commented 2 weeks ago

Yes, you can take a look to see if this is what you want. https://gangcaolab.github.io/CoolBox/_gallery/joint_view.html hi, thanks! I have tried and I want to plot a region of x:y=4:1, but the plot is in default a squre, can I adjust the plot shape? other than changing in adobe illustrator. Thanks! image