icbi-lab / infercnvpy

Infer copy number variation (CNV) from scRNA-seq data. Plays nicely with Scanpy.

Home Page:https://infercnvpy.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limit color scale heat map

ccruizm opened this issue · comments

Description of feature

Good day,

Thanks for implementing this in python. The speed is mindblowing. I would like to limit the color scale of the heatmap to enhance the areas with iCNV. However when using vmax and vmin I get and error (ValueError: Passing both norm and vmin/vmax/vcenter is not allowed.) do you have a way to do it, please?

Thanks again

So the issue is that I pass a custom norm to the matrixplot function:

norm = TwoSlopeNorm(0, vmin=np.nanmin(tmp_data), vmax=np.nanmax(tmp_data))

It would be easy to add a check to the function that only uses the TwoSlopeNorm if no vmax or vmin is set (happy to accept a PR), or allow to pass a custom norm to the function.

Hi, thanks for you work! Did you add the check? I really need it now.

I currently don't have time to look into this, feel free to submit a PR!