Closed jvhaarst closed 5 years ago
As I do not know where it would make the most sense to change the action, I haven't tried a pull request. One could argue that creating quality plots without any quality info makes no sense, so checking in nanoget whether the qualities are all zeroes, and then dropping that column is one way to go. Another way would be to let nanoplotter just create the plots, but check there whether the y-limits are the same, and if so, change that so matplotlib doesn't error out.
Hmm based on the log file it seems the plotting gave a set of warnings - without errors/crashing the program? It may be that the plot doesn't really make sense though. What I think would be the way forward is that you convert the reads to fasta and use --fasta
as input for NanoPlot, in this scenario. Then no plots with quality scores are attempted.
Alternatively, there might be a way in nanoget to check if the qualities are all 0, but starting there that probably doesn't suffice: if the qualities are all 7 or something else we might have other problems.
Yeah, next time I'll extract FASTA from the BAM files, but I still think it would be better if these warnings didn't occur. The "problem" is that all the values are the same, so that df.quals,std() == 0. That in itself is a quick test, but I think a user would be surprised if they didn't get the quality graphs. The might be non-informative as all the values are the same, but they gave NanoPlot FASTQ for a reason. I'm happy with any decision, I'm already very happy that NanoPlot exists.
Yes, I agree that there should be a cleaner solution than all those warnings. By extension, bivariate plots with one axis for which all values are the same don't really make sense, so probably the appropriate place to solve this is nanoplotter. I'm not entirely convinced that the plot shouldn't be created at all. I'll see if I can find an appropriate solution. Thanks for your feedback - highly appreciated!
Thank you for highlighting this issue. It turns out that depending on the bivariate plot type selected (with --plot
) also real errors happened in this case. I have added a check in nanoplotter that will skip those bivariate plots if all values are the same.
This change is included in nanoplotter 1.5.0.
Happy to get any feedback!
I have converted a set of PacBio Sequel files to FASTQ, and as those do not contain quality info (they are all zeroes), the plotting of the quality plots crashes: