This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plotting CNV matrix as heatmap using python

I have a marix with chromosome location and copy number data which looks like this

 chr    start   cell_1  cell_2  cell_3
1   9997206 1.42    -0.25   -0.84
1   9997306 -0.47   -0.32   -0.34
1   9997406 -0.51   0.19    -2.06
1   9997506 0.23    -0.2    0.27
1   9997606 -0.41   -0.27   -2.02

I wish to plot this data as a heatmap using python.. I've tried to do this with 'seaborn' but that did not go very well.. I'd love to get some advice since I was not able to find good answers.

I guess I could do this in R or matlab, but since my upstream script is written in python I though to try my luck with python.

Thanks!

python heatmap cnv

Take a look at matplotlib directly, or plot_ly has some nice heatmap functionality.

1 answer

https://reneshbedre.github.io/blog/hmap.html

Log in to answer this question.