quast icon indicating copy to clipboard operation
quast copied to clipboard

Function not implemented: '/usr/local/lib/python3.10/site-packages/quast_libs/gridss'

Open zpagomez opened this issue 3 years ago • 3 comments

I am running quast Version: 5.2.0 but I get this error: Function not implemented: '/usr/local/lib/python3.10/site-packages/quast_libs/gridss'

This is my quast.log file /usr/local/bin/quast.py //depot/mycospace/data/pgomezza/sphaerellopsis//6assembly_spades_firstRound/scaffolds.fasta --threads 20 --split-scaffolds --output-dir /depot/mycospace/data/pgomezza/sphaerellopsis//7quast_spades_firstAssembly --fungus --gene-finding --conserved-genes-finding --est-ref-size 26418069 --pe1 /depot/mycospace/data/pgomezza/sphaerellopsis//4reads_after_contaminants/Sphaerellopsis_cleaned_afterContaminants.1.fq --pe2 /depot/mycospace/data/pgomezza/sphaerellopsis//4reads_after_contaminants/Sphaerellopsis_cleaned_afterContaminants.2.fq

Version: 5.2.0

System information: OS: Linux-4.18.0-372.32.1.el8_6.x86_64-x86_64-with-glibc2.28 (linux_64) Python version: 3.10.5 CPUs number: 128

Started: 2023-02-06 14:49:22

Logging to /depot/mycospace/data/pgomezza/sphaerellopsis/7quast_spades_firstAssembly/quast.log

CWD: /depot/mycospace/data/pgomezza/sphaerellopsis/7quast_spades_firstAssembly Main parameters: MODE: default, threads: 20, eukaryotic: true, split scaffolds: true, min contig length: 500,
min alignment length: 65, min alignment IDY: 95.0, ambiguity: one, min local misassembly length: 200,
min extensive misassembly length: 1000

Contigs: Pre-processing... //depot/mycospace/data/pgomezza/sphaerellopsis//6assembly_spades_firstRound/scaffolds.fasta ==> scaffolds breaking scaffolds into contigs: 1059 scaffolds (scaffolds) were broken into 1092 contigs (scaffolds_broken)

2023-02-06 14:49:24 Running Reads analyzer...

[Errno 38] Function not implemented: '/usr/local/lib/python3.10/site-packages/quast_libs/gridss' Traceback (most recent call last): File "/usr/local/bin/quast.py", line 309, in return_code = main(sys.argv[1:]) File "/usr/local/bin/quast.py", line 118, in main bed_fpath, cov_fpath, physical_cov_fpath = reads_analyzer.do(ref_fpath, contigs_fpaths, File "/usr/local/lib/python3.10/site-packages/quast_libs/reads_analyzer.py", line 934, in do download_gridss(logger, qconfig.bed) File "/usr/local/lib/python3.10/site-packages/quast_libs/ra_utils/misc.py", line 96, in download_gridss gridss_dirpath = get_dir_for_download('gridss', 'GRIDSS', [gridss_fname], logger, only_clean=only_clean) File "/usr/local/lib/python3.10/site-packages/quast_libs/qutils.py", line 960, in get_dir_for_download os.makedirs(tool_dirpath) File "/usr/local/lib/python3.10/os.py", line 225, in makedirs mkdir(name, mode) OSError: [Errno 38] Function not implemented: '/usr/local/lib/python3.10/site-packages/quast_libs/gridss'

zpagomez avatar Feb 06 '23 19:02 zpagomez

We are seeing this in Galaxy as well, although in our case, Quast runs inside of a Singularity container, and the contents are read-only (despite this we still receive errno 38), same traceback:

Traceback (most recent call last):
  File "/usr/local/bin/quast", line 309, in <module>
    return_code = main(sys.argv[1:])
  File "/usr/local/bin/quast", line 118, in main
    bed_fpath, cov_fpath, physical_cov_fpath = reads_analyzer.do(ref_fpath, contigs_fpaths,
  File "/usr/local/opt/quast-5.2.0/quast_libs/reads_analyzer.py", line 934, in do
    download_gridss(logger, qconfig.bed)
  File "/usr/local/opt/quast-5.2.0/quast_libs/ra_utils/misc.py", line 96, in download_gridss
    gridss_dirpath = get_dir_for_download('gridss', 'GRIDSS', [gridss_fname], logger, only_clean=only_clean)
  File "/usr/local/opt/quast-5.2.0/quast_libs/qutils.py", line 960, in get_dir_for_download
    os.makedirs(tool_dirpath)
  File "/usr/local/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
OSError: [Errno 38] Function not implemented: '/usr/local/lib/python3.9/site-packages/quast_libs/gridss'

In the case of a container install such as this, if we precreated the dir, would that be enough? Passing --no-sv (which we probably should start doing anyway) does not suppress the error, although from digging into the code a bit, it looks like it should prevent any attempt to download as long as the dir exists?

natefoo avatar Mar 28 '23 19:03 natefoo

Any solution? I still get this error. I'm also using a singularity image of quast.

`Building DAG of jobs... Your conda installation is not configured to use strict channel priorities. This is however crucial for having robust and correct environments (for details, see https://conda-forge.org/docs/user/tipsandtricks.html). Please consider to configure strict priorities by executing 'conda config --set channel_priority strict'. Using shell: /usr/bin/bash Provided cores: 96 Rules claiming more threads will be scaled down. Provided resources: mem_mb=50000, disk_mb=0 Select jobs to execute...

[Thu Feb 13 16:42:03 2025] rule metaquast_prokaryotes: input: cache/01-metagenome-assembly/chytrid-contigs/assembly.fasta, /home/qi47rin/colab/isabell-klawonn/raw/m64046_250130_135130.hifi_reads.fastq.gz, cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam output: cache/04-qc-flye-assembly/metaquast_prokaryotes/report.html jobid: 0 reason: Missing output files: cache/04-qc-flye-assembly/metaquast_prokaryotes/report.html threads: 48 resources: mem_mb=50000, disk_mb=0, tmpdir=/vast/qi47rin/tmp, partition=standard,long, qos=normal, time=3-00:00:00

    export OMP_NUM_THREADS=48;
    metaquast.py             --output-dir cache/04-qc-flye-assembly/metaquast_prokaryotes             --threads 48             --pacbio /home/qi47rin/colab/isabell-klawonn/raw/m64046_250130_135130.hifi_reads.fastq.gz             --bam cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam             --report-all-metrics             --gene-finding             --rna-finding             --use-all-alignments             cache/01-metagenome-assembly/chytrid-contigs/assembly.fasta
    

Activating conda environment: cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_ /vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/bin/metaquast.py --output-dir cache/04-qc-flye-assembly/metaquast_prokaryotes --threads 48 --pacbio /home/qi47rin/colab/isabell-klawonn/raw/m64046_250130_135130.hifi_reads.fastq.gz --bam cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam --report-all-metrics --gene-finding --rna-finding --use-all-alignments cache/01-metagenome-assembly/chytrid-contigs/assembly.fasta

Version: 5.3.0

System information: OS: Linux-4.18.0-425.13.1.el8_7.x86_64-x86_64-with-glibc2.28 (linux_64) Python version: 3.12.8 CPUs number: 96

Started: 2025-02-13 16:42:06

Logging to /vast/qi47rin/colab/isabell-klawonn/cache/04-qc-flye-assembly/metaquast_prokaryotes/metaquast.log NOTICE: Output directory already exists and looks like a QUAST output dir. Existing results can be reused (e.g. previously generated alignments)!

Contigs: Pre-processing... cache/01-metagenome-assembly/chytrid-contigs/assembly.fasta ==> assembly

No references are provided, starting to search for reference genomes in SILVA 16S rRNA database and to download them from NCBI...

2025-02-13 16:42:11

Downloading SILVA 16S ribosomal RNA gene database (version 138.1)...

ERROR! Failed downloading SILVA 16S rRNA gene database (http://www.arb-silva.de/fileadmin/silva_databases/release_138.1/Exports/SILVA_138.1_SSURef_NR99_tax_silva.fasta.gz)! The search for reference genomes cannot be performed. Try to download it manually, put under /vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/quast_libs/silva/ and restart your command. Reference genomes are not found.

NOTICE: No references are provided, starting regular QUAST with MetaGeneMark gene finder /vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/bin/quast.py --threads 48 --pacbio /home/qi47rin/colab/isabell-klawonn/raw/m64046_250130_135130.hifi_reads.fastq.gz --bam cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam --report-all-metrics --gene-finding --rna-finding --use-all-alignments --mgm --min-identity 90.0 cache/01-metagenome-assembly/chytrid-contigs/assembly.fasta -o /vast/qi47rin/colab/isabell-klawonn/cache/04-qc-flye-assembly/metaquast_prokaryotes --labels assembly

Version: 5.3.0

System information: OS: Linux-4.18.0-425.13.1.el8_7.x86_64-x86_64-with-glibc2.28 (linux_64) Python version: 3.12.8 CPUs number: 96

Started: 2025-02-13 16:42:11

Logging to /vast/qi47rin/colab/isabell-klawonn/cache/04-qc-flye-assembly/metaquast_prokaryotes/quast.log NOTICE: Output directory already exists and looks like a QUAST output dir. Existing results can be reused (e.g. previously generated alignments)!

CWD: /vast/qi47rin/colab/isabell-klawonn Main parameters: MODE: meta, threads: 48, min contig length: 500, min alignment length: 65, min alignment IDY: 90.0,
ambiguity: one, use all alignments: true, min local misassembly length: 200, min extensive misassembly length: 1000

Contigs: Pre-processing... cache/01-metagenome-assembly/chytrid-contigs/assembly.fasta ==> assembly

2025-02-13 16:42:15 Running Reads analyzer... Downloading gridss (file: gridss-1.4.1.jar)...

ERROR! Failed downloading gridss (url: https://raw.githubusercontent.com/ablab/quast/master/external_tools/gridss/gridss-1.4.1.jar), QUAST functionality will be limited! Exception caught: HTTP Error 502: Bad Gateway You can try to download the file manually, place it in /vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/quast_libs/gridss/gridss-1.4.1.jar and restart QUAST WARNING: Failed to download binary distribution from https://github.com/ablab/quast/tree/master/external_tools/gridss. QUAST SV module will be able to search trivial deletions only. You can try to download it manually, save the jar archive under /vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/quast_libs/gridss, and restart QUAST. Logging to files /vast/qi47rin/colab/isabell-klawonn/cache/04-qc-flye-assembly/metaquast_prokaryotes/reads_stats/reads_stats.log and /vast/qi47rin/colab/isabell-klawonn/cache/04-qc-flye-assembly/metaquast_prokaryotes/reads_stats/reads_stats.err... WARNING: Numbers of sequences (chromosomes, contigs, etc) in /vast/qi47rin/colab/isabell-klawonn/cache/04-qc-flye-assembly/metaquast_prokaryotes/quast_corrected_input/assembly.fasta and the corresponding alignment file cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam do not match. QUAST will try to realign reads to /vast/qi47rin/colab/isabell-klawonn/cache/04-qc-flye-assembly/metaquast_prokaryotes/quast_corrected_input/assembly.fasta. One possible reason for the inconsistency is that short contigs are skipped during the QUAST pre-processing step. To disable this, use --min-contig 0 (the default value is 500 bp). Pre-processing reads... Running BWA...

[Errno 2] No such file or directory: 'cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam' joblib.externals.loky.process_executor.RemoteTraceback: """ Traceback (most recent call last): File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/lib/python3.12/shutil.py", line 847, in move os.rename(src, real_dst) FileNotFoundError: [Errno 2] No such file or directory: '/vast/qi47rin/colab/isabell-klawonn/cache/04-qc-flye-assembly/metaquast_prokaryotes/reads_stats/temp_output/m64046_250130_135130.sort.pacbio.bam' -> 'cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/joblib/utils.py", line 72, in call return self.func(**kwargs) ^^^^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/lib/python3.12/site-packages/joblib/parallel.py", line 598, in call return [func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/quast_libs/reads_analyzer.py", line 545, in align_single_file shutil.move(tmp_bam_fpath, bam_fpath) File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/shutil.py", line 867, in move copy_function(src, real_dst) File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/shutil.py", line 475, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/shutil.py", line 262, in copyfile with open(dst, 'wb') as fdst: ^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam' """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/bin/metaquast.py", line 428, in return_code = main(sys.argv[1:]) ^^^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/bin/metaquast.py", line 219, in main start_quast_main(quast_py_args, assemblies=assemblies, output_dirpath=output_dirpath, run_regular_quast=True) File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/bin/metaquast.py", line 73, in start_quast_main return_code = quast.main(args) ^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/bin/quast.py", line 119, in main bed_fpath, cov_fpath, physical_cov_fpath = reads_analyzer.do(ref_fpath, contigs_fpaths, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/quast_libs/reads_analyzer.py", line 952, in do bed_fpath, cov_fpath, physical_cov_fpath = run_processing_reads(contigs_fpaths, ref_fpath, meta_ref_fpaths, ref_labels_by_chromosomes, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/quast_libs/reads_analyzer.py", line 383, in run_processing_reads correct_chr_names, sam_fpaths, bam_fpaths = run_parallel(align_single_file, parallel_align_args, n_jobs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/quast_libs/qutils.py", line 1091, in run_parallel results_tuples = Parallel(**parallel_args)(delayed(fn)(*args) for args in fn_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/lib/python3.12/site-packages/joblib/parallel.py", line 2007, in call return output if self.return_generator else list(output) ^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_/lib/python3.12/site-packages/joblib/parallel.py", line 1650, in _get_outputs yield from self.retrieve() File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/lib/python3.12/site-packages/joblib/parallel.py", line 1754, in _retrieve self.raise_error_fast() File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/lib/python3.12/site-packages/joblib/parallel.py", line 1789, in raise_error_fast error_job.get_result(self.timeout) File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/lib/python3.12/site-packages/joblib/parallel.py", line 745, in get_result return self.return_or_raise() ^^^^^^^^^^^^^^^^^^^^^^^ File "/vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb/lib/python3.12/site-packages/joblib/parallel.py", line 763, in _return_or_raise raise self._result FileNotFoundError: [Errno 2] No such file or directory: 'cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam' ERROR! exception caught!

In case you have troubles running QUAST, you can write to [email protected] or report an issue on our GitHub repository https://github.com/ablab/quast/issues Please provide us with quast.log file from the output directory. [Thu Feb 13 16:47:28 2025] Error in rule metaquast_prokaryotes: jobid: 0 output: cache/04-qc-flye-assembly/metaquast_prokaryotes/report.html conda-env: /vast/qi47rin/colab/isabell-klawonn/cache/00-conda-env/1fc492e94faee48ca4ccdf0a72d504eb_ shell:

    export OMP_NUM_THREADS=48;
    metaquast.py             --output-dir cache/04-qc-flye-assembly/metaquast_prokaryotes             --threads 48             --pacbio /home/qi47rin/colab/isabell-klawonn/raw/m64046_250130_135130.hifi_reads.fastq.gz             --bam cache/04-qc-flye-assembly/samtools_bam/m64046_250130_135130.sort.bam             --report-all-metrics             --gene-finding             --rna-finding             --use-all-alignments             cache/01-metagenome-assembly/chytrid-contigs/assembly.fasta
    
    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time. Exiting because a job execution failed. Look above for error message`

ailtonpcf avatar Feb 13 '25 16:02 ailtonpcf

Also ran into this issue, even with the --no-sv flag.

We have quast installed in a conda env inside a singularity container, and my workaround was to add this to the def file %post section after creating the conda env:

. /opt/conda/etc/profile.d/conda.sh
conda activate MYENV
quast-download-gridss

hgibling avatar Nov 14 '25 21:11 hgibling