This is a test version of Biostars. For the public version, visit https://www.biostars.org.
extract small heatmap from big one deeptools

Hello everyone,

I have a question. I had a heatmap with deeptools and I wanted to extract that small heatmap with the genes that have more signal (as shown in the image). Can someone help me?

Thank you in advance

http://pixady.com/image/jeo/

deeptools chip-seq

Please use ADD COMMENT/ADD REPLY when responding to existing posts to keep threads logically organized.

Are you losing money by the minute here :-) It has been less than 30 min since you posted the original question.

2 answers

Run it again with the parameter --outFileSortedRegions myfile.bed . The genes you want should be in the first cluster that comes up (I assume you have run it with a --kmeans 4 ? )

then i can extract the list of genes from the bed file and run again the computeMatrix then plotheatmap ?

Thank you

Sure ..should work this way

but the bed contain all genes not only those with high signal, for me i need to extract only those with high signal to do again onther computeMatrix and plotHeatmap

if you run again the plotHeatmap function with the parameters --kmeans 4 --outFileSortedRegions mynewfile.bed then your new bed file "mynewfile.bed" that is generated will be split into 4 different clusters. The genes you want are in the first cluster

You have a couple options. Firstly, you could save the sorted output from computeMatrix, gunzip it, take the top N lines, fix the header and then gzip it again (computeMatrix outputs a bit gzipped text file, where the first line is a header defining things like the matrix size and where samples are).

Perhaps a better options would be to use kmeans in plotHeatmap, pull out the BED regions for the preferred cluster and then run computeMatrix on that.

Log in to answer this question.