SquiggleKit icon indicating copy to clipboard operation
SquiggleKit copied to clipboard

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Open vetmohit89 opened this issue 2 years ago • 4 comments

Hello,

I have generated data.tsv file from squigglePull.py using multi fast5 file. Now, I am trying to run squigglePlot.py but getting below error when I am using data.tsv file as input file.

Here is the input command I used: python SquigglePlot.py --signal data.tsv

The error message I am getting: Traceback (most recent call last): File "SquigglePlot.py", line 473, in main() File "SquigglePlot.py", line 214, in main if not sig: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Please help.

vetmohit89 avatar Dec 29 '22 05:12 vetmohit89

Hello,

I'm currently away until the 10th of Jan.

You should be able to use squiggle plot on the fast5 files directly. Squiggle pull is going to be deprecated very soon in favour of reading slow5 files.

I hope this helps until I get back.

James

Psy-Fer avatar Dec 29 '22 05:12 Psy-Fer

Thank you so much for prompt response. But I am not sure if we are giving all fast5 files as input file or individual file to run squigglePlot. I have 150 fast5 files from a single sample.

vetmohit89 avatar Dec 29 '22 06:12 vetmohit89

If you run the command something like this

python3 ./SquigglePlot.py -i data.fast5 --no_show --save test.png --save_path ./test

This will plot every read in the data.fast5 multi fast5 file.

If you have multiple single fast5 files in a path, you can run the same command like this

python3 ./SquigglePlot.py -p data/ --single --no_show --save test.png --save_path ./test

where --single will tell it to expect single fast5 files.

I have also fixed the sig.any() bug you are getting when using a signal file input that you are currently doing. So you can just do a git pull on the repo and try again with your current commands.

Let me know if this helps.

James

Psy-Fer avatar Jan 01 '23 04:01 Psy-Fer

Thank you so much for your help. It worked.

vetmohit89 avatar Jan 03 '23 03:01 vetmohit89