nanoporetech / dorado

Oxford Nanopore's Basecaller
https://nanoporetech.com/
Other
452 stars 53 forks source link

dorado barecalling: model config.toml file issue #318

Closed Larysha closed 10 months ago

Larysha commented 11 months ago

dorado barecalling: model config.toml file issue

!/bin/bash

dorado="/mnt/c/Users/Rish/dorado/bin/dorado.exe" model="/mnt/c/Users/Rish/dorado/bin/dna_r9.4.1_e8_sup@v3.6" ${dorado} basecaller ${model} --device cuda:all ./pod5-files/ > sup_calls.bam

and get the same error: [2023-08-02 14:24:50.605] [info] > Creating basecall pipeline [2023-08-02 14:24:50.643] [error] toml::parse: file open error -> /mnt/c/Users/Rish/dorado/bin/dna_r9.4.1_e8_sup@v3.6/config.toml

my file paths are correct and the config.toml is in the /mnt/c/Users/Rish/dorado/bin/dna_r9.4.1_e8_sup@v3.6 directory with full permissions - does anyone know why this error occurs ?

Originally posted by @Larysha in https://github.com/nanoporetech/dorado/issues/241#issuecomment-1662122633

tijyojwad commented 11 months ago

Hi @Larysha

Looks like you're on windows but using a unix like shell? Can you cat ${model} to see if the contents are visible?

Larysha commented 11 months ago

Hi @tijyojwad - yes I'm using WSL, if I cat ${model} I get: cat: /mnt/c/Users/Rish/dorado/bin/dna_r9.4.1_e8_sup@v3.6/: Is a directory

tijyojwad commented 11 months ago

Oops I meant to ask for cat ${model}/config.toml - just wanted to make sure your config is readable. And just to test, can you download and run another model (e.g. dna_r9.4.1_e8_sup@v3.3) ?

Larysha commented 11 months ago

sure, when I cat ${model}/config.toml the contents of the file are printed (I can add them to this commend if you would like to see them?) and when I test with different models (I tried dna_r9.4.1_e8_sup@v3.3 and dna_r9.4.1_e8_hac@v3.3) I get the same error message.

tijyojwad commented 11 months ago

Hmm only thing I can think of is somehow the path isn't being properly parsed (could be escape character issues, etc).

Are you able to manually run dorado outside the script?

/mnt/c/Users/Rish/dorado/bin/dorado.exe basecaller /mnt/c/Users/Rish/dorado/bin/dna_r9.4.1_e8_sup\@v3.6/ ./pod5-files/ --device "cuda:all" > sup_calls.bam

(note I escape the @ symbol in the cmd above

tijyojwad commented 11 months ago

Hi @Larysha - did your config file issue get resolved?

Larysha commented 11 months ago

Hi @tijyojwad, no unfortunately not - even if I run it manually/ outside the script as you suggested I still get the same error. Could it be a problem with my Cuda Toolkit or Nvidia drivers? It is the only place I can think of where I may have made an error with the installation..

tijyojwad commented 11 months ago

The parsing of config files should not have anything to do with CUDA. You can always use -x "cpu" to run basecalling on CPU and remove CUDA from the equation.

I got hold of a machine with WSL and was able to run basecalling with v0.3.4 (machine doesn't have GPU so I used cpu) dorado-wsl

Larysha commented 10 months ago

Hi @tijyojwad - this is a late reply but I got it running (just uninstalled and reinstalled the linux version into my /usr/bin instead of adding the Windows version to $PATH). All working now. Appreciate your help!