Skip to content

Somatic tumor-normal run with indexcov fails at SAMTOOLS_REINDEX_BAM due to tuple mismatch #2251

Description

@lucafagnocchi

Description of the bug

Hi nf-core/sarek team,

I am running a paired tumor-normal somatic analysis with nf-core/sarek 3.9.0. The pipeline fails when indexcov is included in --tools. The failure occurs in the somatic indexcov branch at:

NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_SOMATIC_ALL:BAM_VARIANT_CALLING_INDEXCOV:SAMTOOLS_REINDEX_BAM

The error is:

Input tuple does not match tuple declaration in process
`NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_SOMATIC_ALL:BAM_VARIANT_CALLING_INDEXCOV:SAMTOOLS_REINDEX_BAM`

The offending value is a paired tumor-normal tuple containing the pair metadata plus both the normal and tumor CRAM/CRAI files:

[
  [
    id: xxx-T_vs_xxx-N,
    normal_id: xxx-N,
    patient: xxx,
    sex: XY,
    tumor_id: xxx-T,
    contamination: null
  ],
  /.../xxx-N.recal.cram,
  /.../xxx.recal.cram.crai,
  /.../xxx-T.recal.cram,
  /.../xxx-T.recal.cram.crai
]

This looks like the somatic paired CRAM tuple is being passed directly into SAMTOOLS_REINDEX_BAM, but the process declaration expects a different tuple shape.

Command used and terminal output

nextflow run nf-core/sarek \
  -r 3.9.0 \
  -profile alliance_canada \
  -c sarek_nibi_somatic_nextflow_RESUME_FIX.config \
  -params-file sarek_nibi_somatic_params.yml \
  --input samplesheet.somatic.xxx-T_vs_N.csv \
  --outdir /path/to/output/somatic \
  --genome GATK.GRCh38 \
  --fasta /path/to/Homo_sapiens_assembly38.masked_nonACGT_to_N.fasta \
  --fasta_fai /path/to/Homo_sapiens_assembly38.masked_nonACGT_to_N.fasta.fai \
  --dict /path/to/Homo_sapiens_assembly38.masked_nonACGT_to_N.dict \
  --tools freebayes,mutect2,muse,strelka,manta,tiddit,indexcov,ascat,cnvkit,controlfreec,msisensorpro,ngscheckmate,snpeff,vep,merge \
  --only_paired_variant_calling \
  --filter_vcfs \
  --normalize_vcfs \
  --snv_consensus_calling \
  --consensus_min_count 2 \
  --save_reference

Relevant files

Relevant log output

DEBUG nextflow.processor.TaskProcessor - Handling unexpected condition for
  task: name=NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_SOMATIC_ALL:BAM_VARIANT_CALLING_INDEXCOV:SAMTOOLS_REINDEX_BAM (1); work-dir=null

error [nextflow.exception.ProcessUnrecoverableException]:
Input tuple does not match tuple declaration in process
`NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_SOMATIC_ALL:BAM_VARIANT_CALLING_INDEXCOV:SAMTOOLS_REINDEX_BAM`

offending value:
[
  [
    id:xxx-T_vs_xxx-N,
    normal_id:xxx-N,
    patient:xxx,
    sex:XY,
    tumor_id:xxx-T,
    contamination:null
  ],
  /.../xxx-N.recal.cram,
  /.../xxx-N.recal.cram.crai,
  /.../xxx-T.recal.cram,
  /.../xxx-T.recal.cram.crai
]

System information

Pipeline: nf-core/sarek
Version: 3.9.0
Nextflow: 26.04.4
Profile: alliance_canada
Cluster: DRAC/Nibi
Executor: Slurm
Container engine reported by Nextflow: singularity/apptainer via Alliance Canada profile
Analysis type: paired tumor-normal somatic
Input type: FASTQ samplesheet with matched normal and tumor
Reference: GATK.GRCh38, with local masked FASTA/FAI/dict overrides

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions