Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-plotHeatmap using outFileNameMatrix #953

Closed
kopardev opened this issue May 22, 2020 · 5 comments
Closed

re-plotHeatmap using outFileNameMatrix #953

kopardev opened this issue May 22, 2020 · 5 comments

Comments

@kopardev
Copy link

Deeptools version 3.4.2
Python version 3.7.5

k=3
plotHeatmap \
--matrixFile regions_of_interest_wrt_iCre_D0.computeMatrix.gz \
--outFileName regions_of_interest_wrt_iCre_D0.heatmap.${k}.testing.pdf \
--outFileSortedRegions regions_of_interest_wrt_iCre_D0.heatmap.${k}.testing.sortedregions.txt \
--outFileNameMatrix regions_of_interest_wrt_iCre_D0.heatmap.${k}.testing.matrix.tab \
--kmeans $k \
--colorMap 'RdBu' \
--whatToShow 'plot, heatmap and colorbar' \
--zMin 0 --zMax 3

The above command runs fine and generates the promised output. I was wondering if it is possible to re-plotHeatmap with the outFileNameMatrix file. This will be convenient if I simply need a new version of the plot with new samplesLable or with a different colorMap.

@dpryan79
Copy link
Collaborator

Yes, you can replot using the file from outFileNameMatrix. Just use that as the --matrixFile parameter.

@kopardev
Copy link
Author

That does not work for me. I keep getting the following error:

Traceback (most recent call last):
  File "/usr/local/anaconda/bin/plotHeatmap", line 12, in <module>
    main(args)
  File "/usr/local/anaconda/lib/python3.7/site-packages/deeptools/plotHeatmap.py", line 788, in main
    hm.read_matrix_file(matrix_file)
  File "/usr/local/anaconda/lib/python3.7/site-packages/deeptools/heatmapper.py", line 779, in read_matrix_file
    chrom, start, end, name, score, strand = region[0:6]
ValueError: not enough values to unpack (expected 6, got 2)

@LeilyR
Copy link
Contributor

LeilyR commented Jul 10, 2020

I proposed a solution for your issue. Feel free to use it and see if it works for you. I am not so sure what the initial intention of the authors was in saving the matrix in the format they were saving it, so i would wait a little to hear from them before merging it to develop branch. Otherwise, plotHeatmap from plotHeatmap_output_matrix branch should work for you. Let me know if there was any problem.

@LeilyR LeilyR mentioned this issue Aug 21, 2020
@soleilll
Copy link

hello, i also have this error.
I tried to use the file from --outFileNameMatrix. I gziped the tab file and e-plotHeatmap with the outFileNameMatrix file, but i still get the same error.
So have you solved this problem?

@JorisBI63
Copy link

I have also the same error with plotHeatmap 3.5.0:

Traceback (most recent call last): File "/usr/local/anaconda/bin/plotHeatmap", line 12, in <module> main(args) File "/usr/local/anaconda/lib/python3.7/site-packages/deeptools/plotHeatmap.py", line 788, in main hm.read_matrix_file(matrix_file) File "/usr/local/anaconda/lib/python3.7/site-packages/deeptools/heatmapper.py", line 779, in read_matrix_file chrom, start, end, name, score, strand = region[0:6] ValueError: not enough values to unpack (expected 6, got 2)

I need to re-plot the matrix with other values, is there a solution for this problem ?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants