hiruna72 / squigualiser

Visualise and analyse nanopore (ONT) raw signals
https://hiruna72.github.io/squigualiser/
MIT License
100 stars 1 forks source link

Problems with save_svg #56

Closed laulambr closed 3 months ago

laulambr commented 4 months ago

Hi!

After reading the preprint I wanted to try out some of your code Everything seems to run fine, except when I want to save them as svg files something fails. Below you can find the commands I have used Runs fine and give html file per read squigualiser plot --file ${REF} --slow5 ${SIGNAL_FILE} --alignment ${REALIGN_BAM_sorted} --output_dir ${OUTPUT_DIR} --region ${REGION}

When I add the --save_svg command to the same command squigualiser plot --file ${REF} --slow5 ${SIGNAL_FILE} --alignment ${REALIGN_BAM_sorted} --output_dir ${OUTPUT_DIR} --region ${REGION} --save_svg

This is the error message I get:

Traceback (most recent call last):
  File "/home/hcrc/Software/squigualiser/bin/squigualiser", line 8, in <module>
    sys.exit(main())
  File "/home/hcrc/Software/squigualiser/lib/python3.8/site-packages/src/__init__.py", line 56, in main
    args.func(args)
  File "/home/hcrc/Software/squigualiser/lib/python3.8/site-packages/src/plot.py", line 978, in run
    layout_.output_backend = "svg"
AttributeError: 'tuple' object has no attribute 'output_backend'

Is this a problem on my end? Or a small bug in the code?

hiruna72 commented 4 months ago

Hi @laulambr,

Thanks for finding this bug. Can you tell us the following,

  1. How did you install squigualiser (through pip/ through git cloning which branch)?
  2. What is the python version? python --version
  3. What is the bokeh library version? pip freeze
laulambr commented 4 months ago

Hi!

  1. I installed squigualiser-v0.6.0 via the precompiled tarballs

wget https://github.com/hiruna72/squigualiser/releases/download/v0.6.0/squigualiser-v0.6.0-linux-x86-64-binaries.tar.gz -O squigualiser.tar.gz

Here are the software versions currently installed on my system:

  1. Python 3.7.6
  2. bokeh==2.0.2
hiruna72 commented 4 months ago

Hi,

Thanks for the information.

I faced a different issue regarding pip installing selenium. I created a new release (https://github.com/hiruna72/squigualiser/releases/download/v0.6.1/squigualiser-v0.6.1-linux-x86-64-binaries.tar.gz).

wget https://github.com/hiruna72/squigualiser/releases/download/v0.6.1/squigualiser-v0.6.1-linux-x86-64-binaries.tar.gz -O squigualiser.tar.gz

Could you please check again?

Thank you.

laulambr commented 4 months ago

Hi, thank you!

I installed the new release; interestingly it appears to be halve fixed? In the previous release I faced a failure using that "--save_svg" flag regardless of running squigualiser plot orsquigualiser plot_pileup. For the latter, the error statement indeed mentioned something about selenium.

Installing and testing the updating release fixed the problem for squigualiser plot_pileup as it now generates an svg file as output (which I actually needed, so my problem is 'fixed'). However squigualiser plot still gives the same error output as before.

hiruna72 commented 3 months ago

Hello,

It was a silly bug which I have fixed on dev branch now https://github.com/hiruna72/squigualiser/commit/7ca03112c76f1a0d80127079516ef83c1569f848.

Thanks again for finding this.

If you want a precompiled binary including this fix, please let me know. Otherwise I will create a release later.