nextstrain / nextclade

Viral genome alignment, mutation calling, clade assignment, quality checks and phylogenetic placement

Home Page:https://clades.nextstrain.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

--input-dataset parameter

AJFeng opened this issue · comments

This command can be successfully run:
nextclade run --dataset-name="sars-cov-2" --output-all="./output" ${f}.fasta
while this one has the error (I downloaded the dataset locally in ./ref/sars-cov-2/wuhan-hu-1/orfs/ ):
nextclade run --input-dataset="./ref/sars-cov-2/wuhan-hu-1/orfs" --output-all="./output" ${f}.fasta
Error:
0: --input-dataset: path is invalid. Expected a directory path or a zip archive file path, but got: '"./ref/sars-cov-2/wuhan-hu-1/orfs"'

Location:
packages/nextclade-cli/src/dataset/dataset_download.rs:42

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

the ./ref/sars-cov-2/wuhan-hu-1/orfs folder was set as chmod -R 777

This one also has an error (I checked, the reference.fasta is with permission of rwxrwxrwx):
nextclade run --input-ref="./ref/sars-cov-2/wuhan-hu-1/orfs/reference.fasta" --output-all="./output" ${f}.fasta

Error:
0: When reading reference sequence
1: When opening file '"./ref/sars-cov-2/wuhan-hu-1/orfs/reference.fasta"'
2: No such file or directory (os error 2)

Location:
/workdir/packages/nextclade/src/io/file.rs:29

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

I also tried absolute path, same errors.

Hi @AJFeng,

Nextclade received "No such file or directory (os error 2)" error from the operating system and it means that the path you are providing is not a directory path or a file path. I don't think it's related to permissions at all. It is likely the path string is simply incorrect, or the directory that you think is there is not actually there.

Please double check that you really have directory "./ref/sars-cov-2/wuhan-hu-1/orfs" on your computer.

If you are using Docker containers, please make sure that you mount volumes correctly and that you adjust the paths according to the host-guest mapping.

If the problem is not resolved, then tell me:

  • What is your operating system?

  • How you installed Nextclade? (standalone binary, Docker, Conda)?

  • If you are in a Unix-like environment (e.g. Linux, macOS, or Windows WSL), please navigate to your working directory (where you tried to issue commands before), paste and execute these commands and paste their exact output back into a reply message:

    pwd
    
    ls -al
    
    ls -al "./ref/sars-cov-2/wuhan-hu-1/orfs"
    
    ls -al "./ref/sars-cov-2/wuhan-hu-1/orfs/reference.fasta"
    
    abspath "./ref/sars-cov-2/wuhan-hu-1/orfs"
    
    ls -al "<the absolute path you've tried>"
    

Problem solved.

operating system: CentOS 7
Nextclade installed by Conda
ls command show: BA.2? BA.2.86 wuhan-hu-1 XBB?

The dataset was downloaded using a script that included the following command:
nextclade dataset get --name='nextstrain/sars-cov-2/wuhan-hu-1/orfs' --output-dir='./ref/sars-cov-2/wuhan-hu-1/orfs'
I used MobaXterm to connect with ssh. The script was written in Windows MobaXterm, and then uploaded to CenterOS 7 via ssh, so there is a conflict between the Windows system and CenterOS 7 system transfer. After I ran 'dos2unix' of the script file, the problem was solved.

Thank you so much for helping to navigate the problem.