Hi, I'm trying to run metatdenovo using metaviral ...
# metatdenovo
j
Hi, I'm trying to run metatdenovo using metaviral spades to assemble my virus metagenome, and the pipeline was terminated from this error:
Copy code
Aug-06 22:17:49.540 [TaskFinalizer-1] DEBUG nextflow.processor.TaskProcessor - Handling unexpected condition for
  task: name=NFCORE_METATDENOVO:METATDENOVO:SPADES (spades); work-dir=/cfs/klemming/projects/supr/snic2020-16-49/nobackup/projects/bay_2024/P34657_101/work/74/88ae0269a7d1aba81ffab59e85c218
  error [nextflow.exception.ProcessFailedException]: Process `NFCORE_METATDENOVO:METATDENOVO:SPADES (spades)` terminated with an error exit status (250)
Aug-06 22:17:49.889 [TaskFinalizer-1] ERROR nextflow.processor.TaskProcessor - Error executing process > 'NFCORE_METATDENOVO:METATDENOVO:SPADES (spades)'

Caused by:
  Process `NFCORE_METATDENOVO:METATDENOVO:SPADES (spades)` terminated with an error exit status (250)


Command executed:

  spades.py \
      --metaviral \
      --threads 64 \
      --memory 110 \
       \
      --dataset spades.yaml \
      -o ./
  mv spades.log spades.spades.log

  if [ -f scaffolds.fasta ]; then
      mv scaffolds.fasta spades.scaffolds.fa
      gzip -n spades.scaffolds.fa
  fi
  if [ -f contigs.fasta ]; then
      mv contigs.fasta spades.contigs.fa
      gzip -n spades.contigs.fa
  fi
  if [ -f transcripts.fasta ]; then
      mv transcripts.fasta spades.transcripts.fa
      gzip -n spades.contigs.fa
  fi
  if [ -f transcripts.fasta ]; then
      mv transcripts.fasta spades.transcripts.fa
      gzip -n spades.transcripts.fa
  fi
  if [ -f assembly_graph_with_scaffolds.gfa ]; then
      mv assembly_graph_with_scaffolds.gfa spades.assembly.gfa
      gzip -n spades.assembly.gfa
  fi

  if [ -f gene_clusters.fasta ]; then
      mv gene_clusters.fasta spades.gene_clusters.fa
      gzip -n spades.gene_clusters.fa
  fi

  if [ -f warnings.log ]; then
      mv warnings.log spades.warnings.log
  fi

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_METATDENOVO:METATDENOVO:SPADES":
      spades: $(spades.py --version 2>&1 | sed -n 's/^.*SPAdes genome assembler v//p')
  END_VERSIONS

Command exit status:
  250

Command output:
  mimalloc: warning: thread 0x7f0b5922f6c0: mimalloc: warning: thread 0x7f0a6b18a6c0: mimalloc: warning: thread 0x7f0ab456e6c0: unable to allocate aligned OS memory directly, fall back to over-allocation (1312817152 bytes, address: 0x7efc65c00000, alignment: 67108864, commit: 1)
I'm using the
nextflow.config
as you mentioned above:
Copy code
process {
    withName: MEGAHIT_INTERLEAVED {
        cpus   = { 48 }
        memory = { 440.GB }
        time   = { 4.d }
    }
    withName: TRIMGALORE {
        cpus   = { 64 }
        memory = { 55.GB }
        time   = { 1.d }
    }
    withName: SPADES {
        cpus   = { 64 }
        memory = { 110.GB }
        time   = { 4.d }
    }
    withName: BBMAP_BBNORM {
        cpus   = { 8 }
        memory = { 110.GB }
        time   = { 3.d }
    }
    withName: BBMAP_INDEX {
        cpus   = { 64 }
        memory = { 110.GB }
        time   = { 3.d }
    }
    withName: BBMAP_ALIGN {
        cpus   = { 64 }
        memory = { 110.GB }
        time   = { 3.d }
    }
    withName: TRANSDECODER {
        cpus   = { 64 }
        memory = { 110.GB }
        time   = { 3.d }
    }
    withName: TRANSRATE {
        errorStrategy = 'ignore'
    }
    withLabel: process_high {
        cpus   = { 64 }
        memory = { 110.GB }
        time   = { 3.d }
    }
    withLabel: process_medium {
        cpus   = { 64 }
        memory = { 55.GB }
        time   = { 1.d }
    }
    withLabel: process_low {
        cpus   = { 32 }
        memory = { 28.GB }
        time   = { 12.h }
    }
}
d
You clearly need more memory than the 110 GiB you first tried. My next step would be to double that. To get that through the queue, try reducing the time to, say, 2 days.
Another option would be to try Megahit instead.
j
I will try those options and keep you updated. Thanks.
@Daniel Lundin It works well by specifying:
Copy code
withName: SPADES {
        cpus   = { 64 }
        memory = { 220.GB }
        time   = { 2.d }
    }
I needed to add
errorStrategy = 'ignore'
to
BBMAP_ALIGN
for it to continue, as spades likes to yield multiple results under the same node name. Other than that, it worked perfectly. Thanks for your help.
d
Right. Would you mind making an issue for that at GitHub: https://github.com/nf-core/metatdenovo/issues? Give as much detail as you can so we can replicate the problem.
j
Sure. I haven’t tried making an issue in GitHub yet, so it might take a while. But I will do it definitely.
d
No worries, it's easy: Just tell what you found.
👍 1