broadinstitute / CellBender

CellBender is a software package for eliminating technical artifacts from high-throughput single-cell RNA sequencing (scRNA-seq) data.
https://cellbender.rtfd.io
BSD 3-Clause "New" or "Revised" License
297 stars 54 forks source link

Windows no output PDF no output HTML report #287

Open sjfleming opened 1 year ago

sjfleming commented 1 year ago

A cellbender v0.3.0 run on Windows failed to produce a PDF and failed to produce an HTML report.

In this case it seems the error is

cellbender:remove-background: Unable to save all plots.
cellbender:remove-background: Traceback (most recent call last):
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\site-packages\cellbender\remove_background\run.py", line 176, in save_output_plots
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\site-packages\matplotlib\figure.py", line 3058, in savefig
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\site-packages\matplotlib\backend_bases.py", line 2259, in print_figure
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\site-packages\matplotlib\backend_bases.py", line 2184, in _get_output_canvas
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\site-packages\matplotlib\backend_bases.py", line 144, in get_registered_canvas_class
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'matplotlib.backends.backend_pdf'

This error may also be the source of the trouble with the output HTML report, but that error is not reported. All we see is

cellbender:remove-background: Unable to create report.
cellbender:remove-background: Traceback (most recent call last):
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\site-packages\cellbender\remove_background\run.py", line 351, in compute_output_denoised_counts_reports_metrics
    output=html_report_file,
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\site-packages\cellbender\remove_background\report.py", line 82, in run_notebook_make_html
    title=('CellBender: ' + os.path.basename(output).replace('_report.html', '')),
  File "C:\Users\laure\anaconda3\envs\cellbender\lib\site-packages\cellbender\remove_background\report.py", line 59, in _postprocess_html
    with open(file, mode='r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\laure\\cellbender_RNAseq\\LM40\\cellbender_output_report.html'
sjfleming commented 1 year ago

May be addressable in this way: https://github.com/Nuitka/Nuitka/issues/827#issuecomment-683553345