rki-mf1 / clean

A nextflow pipeline for decontamination of short reads, long reads and contigs
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

Concat contamination error on SLURM/Singularity #86

Closed hoelzer closed 7 months ago

hoelzer commented 7 months ago

Command

nextflow run hoelzer/clean -r v1.0.0--input_type nano --host sc2 --cleanup_work_dir --no_intermediate -profile slurm,singularity --input 'reads/*.fastq.gz' --output results-clean -resume

[9d/2bd81a] process > prepare_contamination:concat_contamination [100%] 1 of 1, failed: 1 ✘

Error executing process > 'prepare_contamination:concat_contamination'

Caused by:
  Process `prepare_contamination:concat_contamination` terminated with an error exit status (1)

Command executed:

  # Combine input files, rename duplicate sequences (by id) if found, and compress
  seqkit seq sc2.fa.gz | seqkit rename | bgzip -@ 1 -c > db.fa.gz
  samtools faidx db.fa.gz --fai-idx db.fa.fai

Command exit status:
  1

Command output:
  (empty)

Command error:
  samtools: /opt/conda/bin/../lib/libtinfow.so.6: no version information available (required by samtools)
  samtools: /opt/conda/bin/../lib/libncursesw.so.6: no version information available (required by samtools)
  samtools: /opt/conda/bin/../lib/libncursesw.so.6: no version information available (required by samtools)
  [faidx] Could not build fai index db.fa.fai

Not sure whats going on here... testing conda now instead of singularity

hoelzer commented 7 months ago

With conda:

[77/39eab1] process > prepare_contamination:concat_contamination [100%] 1 of 1, failed: 1 ✘
[-        ] process > clean:minimap2                             -
[-        ] process > clean:sort_bam                             -
[-        ] process > clean:index_bam                            -
[-        ] process > clean:idxstats_from_bam                    -
[-        ] process > clean:flagstats_from_bam                   -
[-        ] process > clean:split_bam                            -
[-        ] process > clean:index_bam2                           -
[-        ] process > clean:fastq_from_bam                       -
[-        ] process > qc:nanoplot                                -
[-        ] process > qc:format_nanoplot_report                  -
[-        ] process > qc:multiqc                                 -
Error executing process > 'prepare_contamination:concat_contamination'

Caused by:
  Process `prepare_contamination:concat_contamination` terminated with an error exit status (1)

Command executed:

  # Combine input files, rename duplicate sequences (by id) if found, and compress
  seqkit seq sc2.fa.gz | seqkit rename | bgzip -@ 1 -c > db.fa.gz
  samtools faidx db.fa.gz --fai-idx db.fa.fai

Command exit status:
  1

Command output:
  (empty)

Command error:
  [faidx] Could not build fai index db.fa.fai
hoelzer commented 7 months ago

Wait! I think I ran into this before.

The downloaded SC2 genome fasta is empty.

hoelzer commented 7 months ago

Joa, can not work when there is no sc2 autodownload : )

https://github.com/rki-mf1/clean/blob/main/modules/prepare_contamination.nf#L19

I am making a PR