SignatureAnalyzer icon indicating copy to clipboard operation
SignatureAnalyzer copied to clipboard

Heatmap error: ValueError: zero-size array to reduction operation minimum which has no identity

Open bknisbac opened this issue 6 years ago • 1 comments

After issue #4 was fixed, the ARD completes successfully but get a similar error at the Heatmap drawing phase:

  • Saving report plots to /path/to/output/dir Traceback (most recent call last): File "/home/bknisbac/anaconda3/bin/siganalyzer", line 11, in load_entry_point('siganalyzer', 'console_scripts', 'siganalyzer')() File "/home/bknisbac/github/getzlab-SignatureAnalyzer/siganalyzer/main.py", line 193, in main **vars(args) File "/home/bknisbac/github/getzlab-SignatureAnalyzer/siganalyzer/signatureanalyzer.py", line 387, in run_matrix _ = marker_heatmap(X, signatures, H.sort_values('max_id').max_id) File "/home/bknisbac/github/getzlab-SignatureAnalyzer/siganalyzer/plotting/_rna.py", line 58, in marker_heatmap sns.heatmap(sample_markers, ax=ax, cmap=cmap, rasterized=True, cbar_ax=cbar_ax) File "/home/bknisbac/anaconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 517, in heatmap yticklabels, mask) File "/home/bknisbac/anaconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 167, in init cmap, center, robust) File "/home/bknisbac/anaconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 206, in _determine_cmap_params vmin = np.percentile(calc_data, 2) if robust else calc_data.min() File "/home/bknisbac/anaconda3/lib/python3.7/site-packages/numpy/core/_methods.py", line 32, in _amin return umr_minimum(a, axis, None, out, keepdims, initial) ValueError: zero-size array to reduction operation minimum which has no identity

Justin and Shankara have my input matrix to reproduce this. Thanks, Binyamin

bknisbac avatar Oct 27 '19 04:10 bknisbac

Issue found when only one signature maps to all samples. Could add a more helpful error message if this occurs.

shankara-a avatar Nov 12 '19 03:11 shankara-a