Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output files #5

Open
Wang-Jing-NZ opened this issue Dec 15, 2024 · 1 comment
Open

No output files #5

Wang-Jing-NZ opened this issue Dec 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Wang-Jing-NZ
Copy link

We got this error message:
[2024-12-11 05:57:12] WARNING: Folder <melon/barcode14.fastq> exists. Files will be overwritten.
[2024-12-11 05:57:12] INFO: Estimating genome copies ...
[2024-12-11 06:01:00] INFO: ... found 182.625 copies of genomes (bacteria: 182.625; archaea: 0).
[2024-12-11 06:01:00] INFO: Assigning taxonomy ...
[2024-12-11 06:03:05] INFO: Reassigning taxonomy ...
Traceback (most recent call last):
File "/opt/conda/envs/melon/bin/melon", line 10, in
sys.exit(cli())
^^^^^
File "/opt/conda/envs/melon/lib/python3.12/site-packages/melon/cli.py", line 132, in cli
run(opt)
File "/opt/conda/envs/melon/lib/python3.12/site-packages/melon/cli.py", line 186, in run
GenomeProfiler(file, opt.db, opt.output, opt.threads).run(
File "/opt/conda/envs/melon/lib/python3.12/site-packages/melon/melon.py", line 292, in run
self.run_em(max_iterations=max_iterations, epsilon=epsilon)
File "/opt/conda/envs/melon/lib/python3.12/site-packages/melon/melon.py", line 231, in run_em
assignments.append(np.where(p_read == p_read.max())[0].tolist())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Calling nonzero on 0d arrays is not allowed. Use np.atleast_1d(scalar).nonzero() instead. If the context of this error is of the form arr[nonzero(cond)], just use arr[cond].

Guess the array is empty but the code isn't able to handle it?
Can you look into this? Many thanks.

@xinehc
Copy link
Owner

xinehc commented Dec 16, 2024

Hi,

This error likely occurs due to a bug triggered by pure isolates of certain uncommon/unambiguous species and NumPy>=1.17.

This patch (e07636d) should fix the issue. Thank you for reporting this bug and let me know if you still encounter the error.

@xinehc xinehc added the bug Something isn't working label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants