nickjcroucher / gubbins

Rapid phylogenetic analysis of large samples of recombinant bacterial whole genome sequences using Gubbins
http://nickjcroucher.github.io/gubbins/
GNU General Public License v2.0
159 stars 49 forks source link

generate_ska_alignment: error: unrecognized arguments: --input input.list #370

Closed qianxin-kxy closed 1 year ago

qianxin-kxy commented 1 year ago

Has anyone encountered this problem? Gubbins has been updated and the problem still exists

(gubbins) [kxy@zju ~]$ run_gubbins.py --version 3.2.1

(gubbins) [kxy@zju gubbins]$ generate_ska_alignment.py --reference /data/users/kxy/kxytry/ACICU.fna --input input.list --out out.aln --threads 100 usage: generate_ska_alignment [-h] --reference REFERENCE [--fasta FASTA] [--fastq FASTQ] --out OUT [--k K] [--threads THREADS] [--no-cleanup] generate_ska_alignment: error: unrecognized arguments: --input input.list

nickjcroucher commented 1 year ago

This is a mismatch between Gubbins and documentation versions - the latest Gubbins version (3.3.0) uses this type of command with ska2 (see https://github.com/bacpop/ska.rust):

generate_ska_alignment.py --reference seq_X.fa --input input.list --out out.aln

Gubbins versions <3.3.0 uses a different command structure and original ska:

generate_ska_alignment.py --reference seq_X.fa --fasta fasta_files.list --fastq fastq_files.list --out out.aln

Hopefully you can update to the latest version of Gubbins.

qianxin-kxy commented 1 year ago

Thank you very much for your prompt reply. I used the following code to update, but the update was not successful. I don't know where the problem occurred

(gubbins) [kxy@zju ~]$ conda install gubbins=3.3.0 Collecting package metadata (current_repodata.json): done Solving environment: / Warning: >10 possible package resolutions (only showing differing packages):

Package Plan

environment location: /data/users/kxy/miniconda3/envs/gubbins

added / updated specs:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
libcblas-3.9.0             |16_linux64_openblas          13 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
liblapack-3.9.0            |16_linux64_openblas          13 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libopenblas-0.3.21         |pthreads_h78a6416_3        10.1 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
------------------------------------------------------------
                                       Total:        10.1 MB

The following packages will be DOWNGRADED:

libcblas -->
liblapack -->
libopenblas -->

Proceed ([y]/n)? y

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done (gubbins) [kxy@zju ~]$ run_gubbins.py --version 3.2.1

nickjcroucher commented 1 year ago

It seems I need to manually update the bioconda recipe - you'll need to install the repo manually using the instructions on https://github.com/nickjcroucher/gubbins, apologies.

qianxin-kxy commented 1 year ago

I see. I'll try installing it manually. Thank you again sincerely

qianxin-kxy commented 1 year ago

It seems I need to manually update the bioconda recipe - you'll need to install the repo manually using the instructions on https://github.com/nickjcroucher/gubbins, apologies.

I'm really sorry, the problem has not been resolved yet.First of all, would you like to confirm if the manual installation you mentioned is done through the following code?

“ conda create -c bioconda -n gubbins_git gubbins python=3.9 conda activate gubbins_git conda install -c conda-forge libtool autoconf-archive automake pkg-config check pytest conda remove --force gubbins git clone https://github.com/nickjcroucher/gubbins cd gubbins autoreconf -i chmod +x configure ./configure --prefix=$CONDA_PREFIX make sudo make install cd python python3 -m pip install . ”

**If so, since I do not have root privileges, is there a way to install the latest version of software without requiring sudo code?

Finally, I tried the above code and only removed "sudo" and successfully installed gubbins-3.3.0. I encountered the following error and I don't know how to handle it**

(gubbins_git) [kxy@zju python]$ python3 -m pip install . Processing /data/users/kxy/miniconda3/envs/gubbins_git/gubbins/python Preparing metadata (setup.py) ... done Requirement already satisfied: biopython>=1.59 in /data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/site-packages (from gubbins==3.3.0) (1.81) Requirement already satisfied: dendropy>=4.0.2 in /data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/site-packages (from gubbins==3.3.0) (4.6.0) Requirement already satisfied: multiprocess>=0.70 in /data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/site-packages (from gubbins==3.3.0) (0.70.14) Requirement already satisfied: scipy>=1.5.3 in /data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/site-packages (from gubbins==3.3.0) (1.10.1) Requirement already satisfied: numpy>=1.19 in /data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/site-packages (from gubbins==3.3.0) (1.23.5) Requirement already satisfied: setuptools in /data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/site-packages (from dendropy>=4.0.2->gubbins==3.3.0) (67.7.2) Requirement already satisfied: dill>=0.3.6 in /data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/site-packages (from multiprocess>=0.70->gubbins==3.3.0) (0.3.6) Building wheels for collected packages: gubbins Building wheel for gubbins (setup.py) ... done Created wheel for gubbins: filename=gubbins-3.3.0-py3-none-any.whl size=71818 sha256=1c199fe3354e267daf13ebc49761440327647ddd03f920dd83a32f737c60b89e Stored in directory: /tmp/pip-ephem-wheel-cache-xwop5zig/wheels/d6/de/ad/d59ba88ce7e28347e6bd4dd503eb708c14046144e5dbdec3b6 Successfully built gubbins Installing collected packages: gubbins Attempting uninstall: gubbins Found existing installation: gubbins 3.3.0 Uninstalling gubbins-3.3.0: Successfully uninstalled gubbins-3.3.0 Successfully installed gubbins-3.3.0 (gubbins_git) [kxy@zju python]$ (gubbins_git) [kxy@zju python]$ cd /data/users/kxy/kxytry/assembleddata/analysis/gubbins **(gubbins_git) [kxy@zju gubbins]$ generate_ska_alignment.py --reference /data/users/kxy/kxytry/ACICU.fna --input input.list --out out.aln --threads 100

Unrecognised subcommand: build Traceback (most recent call last): File "/data/users/kxy/miniconda3/envs/gubbins_git/bin/generate_ska_alignment.py", line 97, in subprocess.check_output('ska build -o ' + args.out + ' -k ' + str(args.k) + \ File "/data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'ska build -o out.aln -k 17 -f input.list --threads 100' returned non-zero exit status 1.**

qianxin-kxy commented 1 year ago

This is a mismatch between Gubbins and documentation versions - the latest Gubbins version (3.3.0) uses this type of command with ska2 (see https://github.com/bacpop/ska.rust):

generate_ska_alignment.py --reference seq_X.fa --input input.list --out out.aln

Gubbins versions <3.3.0 uses a different command structure and original ska:

generate_ska_alignment.py --reference seq_X.fa --fasta fasta_files.list --fastq fastq_files.list --out out.aln

Hopefully you can update to the latest version of Gubbins.

In addition, after running the following code using version 3.2.1 of Gubbins, there were still errors, and my “fast.list” file is located in the Gubbins folder. I don't know where the problem occurred

(gubbins) [kongxiaoyang@zju gubbins]$ generate_ska_alignment.py --reference /data/users/kongxiaoyang/kxytry/ACICU.fna --fasta fasta.list --out out.aln --threads 100 Traceback (most recent call last): File "/data/users/kongxiaoyang/miniconda3/envs/gubbins/bin/generate_ska_alignment.py", line 103, in with open(args.fasta,'r') as fasta_list: FileNotFoundError: [Errno 2] No such file or directory: 'fasta.list'

nickjcroucher commented 1 year ago

With version 3.3.0 of Gubbins, you should conda remove --force ska then conda install ska2 to replace ska with ska2

qianxin-kxy commented 1 year ago

With version 3.3.0 of Gubbins, you should conda remove --force ska then conda install ska2 to replace ska with ska2

After following your instructions, I encountered a new issue, would you tell me what to do next? I am really a code novice

(gubbins_git) [kxy@zju gubbins]$ generate_ska_alignment.py --reference /data/users/kxy/kxytry/ACICU.fna --input fasta.list --out out.aln --threads 100 SKA: Split K-mer Analysis (the alignment-free aligner) thread 'main' panicked at 'Unable to open file_list: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/io_utils.rs:112:39 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace Traceback (most recent call last): File "/data/users/kxy/miniconda3/envs/gubbins_git/bin/generate_ska_alignment.py", line 97, in subprocess.check_output('ska build -o ' + args.out + ' -k ' + str(args.k) + \ File "/data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/data/users/kxy/miniconda3/envs/gubbins_git/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'ska build -o out.aln -k 17 -f fasta.list --threads 100' returned non-zero exit status 101.

nickjcroucher commented 1 year ago

This is the same issue as above:

FileNotFoundError: [Errno 2] No such file or directory: 'fasta.list'

Is now:

thread 'main' panicked at 'Unable to open file_list: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/io_utils.rs:112:39

The file fasta.list isn't where you are directing the script to find it - this isn't a Gubbins issue I'm afraid.

Also, do you have ~100 CPUs to run that many threads?

qianxin-kxy commented 1 year ago

This is the same issue as above:

FileNotFoundError: [Errno 2] No such file or directory: 'fasta.list'

Is now:

thread 'main' panicked at 'Unable to open file_list: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/io_utils.rs:112:39

The file fasta.list isn't where you are directing the script to find it - this isn't a Gubbins issue I'm afraid.

Also, do you have ~100 CPUs to run that many threads?

Thank you for your reply, I made a very foolish mistake because when naming the "fast.list" file earlier, there was an extra space after the "list", After I removed the spaces, the problem was resolved。

In addition, the server we rent has a capacity of 100 CPUS