wdecoster / NanoPlot

Plotting scripts for long read sequencing data
http://nanoplot.bioinf.be
MIT License
432 stars 47 forks source link

Nanoplot 1.32.1 has crashed... #209

Closed Thomieh73 closed 4 years ago

Thomieh73 commented 4 years ago

Hi,

I have installed Nanoplot on our cluster running linux inside a clean conda environment called nanoplot:

conda install -c bioconda nanoplot=1.32.1

I then tried to test it using a summary field produced by the latest guppy basecaller, using 16S rRNA amplicon reads

NanoPlot -t 4 --summary sequencing_summary.txt --maxlength 3000 --plots hex dot --title Sequencing_Summary -o Sequencing.summary-plots-log-transformed

And then I have a crash report:

/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/_collections_abc.py:702: MatplotlibDeprecationWarning: The global colormaps dictionary is no longer considered public API.
  return len(self._mapping)
/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/_collections_abc.py:720: MatplotlibDeprecationWarning: The global colormaps dictionary is no longer considered public API.
  yield from self._mapping
/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)

If you read this then NanoPlot 1.32.1 has crashed :-(
Please try updating NanoPlot and see if that helps...

If not, please report this issue at https://github.com/wdecoster/NanoPlot/issues
If you could include the log file that would be really helpful.
Thanks!

Traceback (most recent call last):
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/bin/NanoPlot", line 10, in <module>
    sys.exit(main())
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/nanoplot/NanoPlot.py", line 101, in main
    plots = make_plots(datadf, settings)
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/nanoplot/NanoPlot.py", line 169, in make_plots
    plot_settings=plot_settings)
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/nanoplotter/nanoplotter_main.py", line 135, in scatter
    height=10)
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/seaborn/_decorators.py", line 46, in inner_f
    return f(**kwargs)
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/seaborn/axisgrid.py", line 2124, in jointplot
    grid.plot_joint(plt.hexbin, **joint_kws)
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/seaborn/axisgrid.py", line 1694, in plot_joint
    func(self.x, self.y, **kwargs)
 File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2673, in hexbin
    **({"data": data} if data is not None else {}), **kwargs)
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/matplotlib/__init__.py", line 1438, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/matplotlib/axes/_axes.py", line 4853, in hexbin
    collection.update(kwargs)
  File "/cluster/projects/nn9305k/src/miniconda/envs/nanoplot/lib/python3.7/site-packages/matplotlib/artist.py", line 996, in update
    raise AttributeError(f"{type(self).__name__!r} object "

I wonder how I can prevent this error. From the error output it looks like it is all the packages that are inside the environment... I find that odd...

Thomieh73 commented 4 years ago

In order for me to keep going I tried an alternative installation using pip inside conda.

conda create -n nanoplot_pip python=3.7 pip

inside the activated environment:

pip install NanoPlot

That worked okay.

Next I tried the same command to analyze my sequence_summary.txt file:

 NanoPlot -t 4 --summary sequencing_summary.txt --maxlength 3000 --plots hex dot --title Sequencing_Summary -o Sequencing.summary-plots-log-transformed

That gives the following output:

/cluster/projects/nn9305k/src/miniconda/envs/nanoplot_pip/lib/python3.7/site-packages/nanomath/nanomath.py:132: DeprecationWarning: Call to deprecated function errs_tab.
  def ave_qual(quals, qround=False, tab=errs_tab(128)):

That is not a serious error, and NanoPlot created a logfile which did not contain any errors. So this set-up works. I now see in the log that I have installed version 1.33.0 from NanoPLot.

Will that version be pushed to bioconda at somepoint? Maybe that works as well.

wdecoster commented 4 years ago

The DeprecationWarning from nanomath is indeed nothing serious, and it's good to see that the pip installation works for you. I'm not sure, but I think your first error with the conda installation might be related to https://github.com/wdecoster/NanoPlot/issues/201

I should update the conda version, I hope to have some time for that soon.

Thomieh73 commented 4 years ago

Yes, you diagnosis of my first error indeed seem to be connected to #201.

For now I am fine and Nanoplot works in my pipeline. If you want you can close this issue.

wdecoster commented 4 years ago

I'll leave it open as a reminder that I have to update the bioconda recipes

wdecoster commented 4 years ago

Updating NanoPlot in bioconda first requires kaleido to be added to conda-forge, which appears to be complicated. See: https://github.com/bioconda/bioconda-recipes/pull/24347

Thomieh73 commented 4 years ago

Hi, My error with Kalisto got solved after updating Nanoplot to the newest version with pip.

wdecoster commented 4 years ago

Thanks for the feedback!

iferres commented 4 years ago

Hi @wdecoster, the latest conda version of Nanoplot is 1.32.1. Do you know when will be available the 1.33.1? Thanks!

wdecoster commented 4 years ago

I don't know, because it depends on kaleido getting added to conda-forge. There is already a pull request for NanoPlot, but that will stay open (and tests failing) as long as kaleido is not available.