LooseLab / readfish

CLI tool for flexible and fast adaptive sampling on ONT sequencers
https://looselab.github.io/readfish/
GNU General Public License v3.0
167 stars 31 forks source link

deepnanoblitz: from ru.validate import main - ImportError: cannot import name 'main' from ru.validate #192

Closed justinshaffer closed 11 months ago

justinshaffer commented 2 years ago

Thanks for the deepnanoblitz port! Super interested to try it out...

I've run into an error validating my TOML file for a test run immediately after following the install instructions for installing readfish-deepnanoblitz here: https://looselab.github.io/2020/12/02/readfish-cpu.html

I'm running this on an iMac (2019) with OS 10.14.6; with a 3 GHz Intel Core i5 processor; 32 GB 2667 MHz DDR4 memory; and a Radeon Pro 560X 4 GB graphics card.

I used the following wheel file from the link above, and renamed to match my systems OS: deepnano2-0.1-cp37-cp37m-macosx_10_14_x86_64.whl

Here is the code I ran:

# Install readfish-deepnanoblitz

conda create -n readfish-deepnanoblitz python==3.7
conda activate readfish-deepnanoblitz

# Download Python 3.7 version for MacOS here:
# https://looselab.github.io/2020/12/02/readfish-cpu.html

pip install --upgrade pip wheel

pip install /Users/wetlab/Downloads/deepnano2-0.1-cp37-cp37m-macosx_10_14_x86_64.whl

pip install git+https://github.com/nanoporetech/read_until_api@v3.0.0
pip install git+https://github.com/LooseLab/readfish@caller_refactor

pip install ont_pyguppy_client_lib==6.0.

ru_validate /Users/wetlab/Documents/code/readfish_deepnanoblitz_test_conf.toml

After running the last line, I received the following error:

File "/path/to/ru_validate", line 5, in <module>
from ru.validate import main
ImportError: cannot import name 'main' from 'ru.validate' (/path/to/ru/validate.py)

Here is the contents of the TOML file I'm using:

[caller settings]
network_type = "48"
threads = 4

[conditions]
reference = "/Users/wetlab/Documents/databases/minimap2/human-phix-db.mmi"

[conditions.0]
name = "Filter human"
control = false
min_chunks = 0
max_chunks = inf
targets = "/Users/wetlab/Documents/databases/readfish/human-phix-db.txt"
single_on = unblock
multi_on = unblock
single_off = proceed
multi_off = proceed
no_seq = unblock
no_map = proceed

Thanks in advance for any insight.

alexomics commented 2 years ago

Justin, very sorry for the slow reply!

If you run readfish validate that is the command that you need. ru_validate is an old entry point that I forgot to remove 😅 readfish should all be accessed using readfish ... where the ... is a sub-command.

Please let me know if you run into any other issues.

justinshaffer commented 2 years ago

Thank you. That seemed to get the command running. However, there also appears to be an issue with the formatting of my TOML file (described above in my original post). Here is the error:

Invalid group name 'caller settings'. Try quoting it. (line 1 column 1 char 0)

However, upon inserting quotes as such:

'[caller settings]'
...

... generates the following error:

Key name found without value. Reached end of line. (line 1 column 20 char 19)

Do you know what the source of the issue could be? As a reminder I'm following the format instructions for the TOML here: https://github.com/LooseLab/readfish/blob/caller_refactor/TOML.md#deepnano-blitz

Thanks in advance.

justinshaffer commented 2 years ago

Just wanted to see if some one could address this, please?

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 11 months ago

This issue was closed because there has been no response for 5 days after becoming stale.