wdecoster / NanoPlot

Plotting scripts for long read sequencing data

Home Page:http://nanoplot.bioinf.be

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NanoPlot 1.41.0 has crashed :-(

Ajuju0804 opened this issue · comments

Recently, I am running with NanoPlot 1.41.0 with the following command and I got these messages. But it work successfully few days ago.

**If you read this then NanoPlot 1.41.0 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 "/home/pla3836/miniconda3/bin/NanoPlot", line 8, in
sys.exit(main())
File "/home/pla3836/miniconda3/lib/python3.8/site-packages/nanoplot/NanoPlot.py", line 106, in main
plots = make_plots(datadf, settings)
File "/home/pla3836/miniconda3/lib/python3.8/site-packages/nanoplot/NanoPlot.py", line 162, in make_plots
nanoplotter.length_plots(
File "/home/pla3836/miniconda3/lib/python3.8/site-packages/nanoplotter/nanoplotter_main.py", line 433, in length_plots
array, bins=max(round(int(maxvalx) / 500), 10), weights=h_type["weight"]
ValueError: cannot convert float NaN to integer**

Also, I downgrade my seaborn version to 0.10.1 and upgrade matplotlib to 3.7.1 as well.
Then I also try to uninstall the NanoPlot and reinstall with pip instead of conda, but probelm remain.

Please help me!! Thanks

Hi,

Please give me some more information. Which type of input are you using?
Could you add the log file?

Thanks,
Wouter

My input is fasta file.

Here is the log file:

2023-05-25 08:16:06,248 NanoPlot 1.41.0 started with arguments Namespace(N50=True, alength=False, bam=None, barcoded=False, color='#4CB391', colormap='Greens', cram=None, downsample=None, dpi=100, drop_outliers=False, fasta=['/mnt/disks/test/230508-WGS-PLA/Unigene/S+3/predict-aa-cdhit.fa'], fastq=None, fastq_minimal=None, fastq_rich=None, feather=None, font_scale=1, format=['png'], hide_stats=False, huge=False, info_in_report=False, legacy=['kde'], listcolormaps=False, listcolors=False, loglength=False, maxlength=None, minlength=500, minqual=None, no_N50=False, no_static=False, no_supplementary=False, outdir='nano_out', path='nano_out/', percentqual=False, pickle=None, plots=['kde', 'dot'], prefix='', raw=False, readtype='1D', runtime_until=None, store=False, summary=None, threads=4, title=None, tsv_stats=False, ubam=None, verbose=False)
2023-05-25 08:16:06,248 Python version is: 3.8.16 (default, Mar 2 2023, 03:21:46) [GCC 11.2.0]
2023-05-25 08:16:06,292 Nanoget: Starting to collect statistics from a fasta file.
2023-05-25 08:16:06,352 Reduced DataFrame memory usage from 0.0048980712890625Mb to 0.0048980712890625Mb
2023-05-25 08:16:06,376 Nanoget: Gathered all metrics of 626 reads
2023-05-25 08:16:06,381 Calculated statistics
2023-05-25 08:16:06,382 Using sequenced read lengths for plotting.
2023-05-25 08:16:06,383 Hidding 626 reads shorter than 500bp in length plots.
2023-05-25 08:16:06,384 NanoPlot: Valid color #4CB391.
2023-05-25 08:16:06,384 NanoPlot: Valid colormap Greens.
2023-05-25 08:16:06,386 NanoPlot: Creating length plots for Read length.
2023-05-25 08:16:06,386 NanoPlot: Using 0 reads with read length N50 of 221bp and maximum of nanbp.
2023-05-25 08:16:06,386 cannot convert float NaN to integer
Traceback (most recent call last):
File "/home/pla3836/miniconda3/lib/python3.8/site-packages/nanoplot/NanoPlot.py", line 106, in main
plots = make_plots(datadf, settings)
File "/home/pla3836/miniconda3/lib/python3.8/site-packages/nanoplot/NanoPlot.py", line 162, in make_plots
nanoplotter.length_plots(
File "/home/pla3836/miniconda3/lib/python3.8/site-packages/nanoplotter/nanoplotter_main.py", line 433, in length_plots
array, bins=max(round(int(maxvalx) / 500), 10), weights=h_type["weight"]
ValueError: cannot convert float NaN to integer

So all your reads are shorter than 500bp, yet you remove all reads below that cutoff? I think NanoPlot could give a better error message when no reads are left after filtering, but if you look at the log file the cause is quite clear.

OK! Thank you. I will change the command and try again.