wdecoster / NanoPlot

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

NanoPlot crash when trying to create a hex plot #255

Closed adhamzul closed 3 years ago

adhamzul commented 3 years ago

Command used: $ NanoPlot -o nanoplot --readtype 1D --fastq BC05_raw.fastq --loglength --plots hex

NanoPlot's log file also attached.

NanoPlot_20210423_1046.log

wdecoster commented 3 years ago

Could you let me know how you installed NanoPlot? With conda or pip?

Could you have a look at which version you have installed of plotly? You can do that with python -c "import plotly ; print(plotly.__version__)"

Thanks, Wouter

adhamzul commented 3 years ago

Hello Wouter,

Thank you very much for the reply. I installed NanoPlot using pip. I forgot to mention that even running NanoPlot without the --plotsoption also crashed NanoPlot.

As for the the version of plotly, it is version 4.1.0.

For the time being, I tried completely removing the nanoplot package including all it's dependencies and reinstalled it through Anaconda. In doing so I got NanoPlot up and running again with plotly 4.14.3.

As for the plots, adding --plots hex or --plots pauvre does not return any plots whereas adding --plots kde returns a kde bivariate plot, but for some reason the quality axis is also log transformed.

Thank you in advance. Adham

wdecoster commented 3 years ago

Hi Adham,

Well, part of the problem was that the plotly version was a bit too old. But the other part is something we have to fix :-)

Can you show us what you meant with "the quality axis is also log transformed."?

Thanks, Wouter

adhamzul commented 3 years ago

Hi Wouter,

Yeah, my bad for not properly checking everything. Thank you very much!

Regarding what I meant with "the quality axis is also log transformed" is that, unlike the example bivariate plot shown on the NanoPlot Github page where the read length is log transformed while the Phred quality score stays the same, the results I get when I add the option --loglength, both the read length and the quality score is log transformed, making the y-axis (the average quality score axis) a bit difficult to read.

Seeing that I am now out of my office for the whole weekend, I will try and attach the bivariate plot that I was able to generate on Monday morning.

Thank you again, Adham

wdecoster commented 3 years ago

Hi Adham,

Also the outdated plotly is not your mistake :) Have a nice weekend, and please let us know about the strange things you see - we would be happy to fix those.

Thanks, Wouter

adhamzul commented 3 years ago

Good morning Wouter,

I hope you also had a nice weekend.

I'm sorry for the delay but I have attached two plots, one is the Length vs Quality Scatter Plot and the same plot that is log transformed.

As you can see, the log transformed plot has the y-axis (the average quality axis) also log transformed, making it just a tad bit hard to read.

As always, thank you very much for taking the time and my lab and I appreciate the work you are doing. Adham

LengthvsQualityScatterPlot_kde LengthvsQualityScatterPlot_loglength_kde

wdecoster commented 3 years ago

Aha! It seems we are logging the labels on the wrong axis, but the plot should still be correct. Sorry for that! We will fix it soon.

wdecoster commented 3 years ago

This should be fixed in NanoPlot v1.36.0, available through pip and probably soon through conda.

adhamzul commented 3 years ago

Hello Wouter,

Thank you very much for the quick replies! I'll try and update my NanoPlot.

Do keep up the great work!

Regards, Adham