Hi there, I am coming from <#C043FMKUNLB> channel...
# sarek
r
Hi there, I am coming from #C043FMKUNLB channel. I ran sarek with
test_full
few days ago and it worked perfectly:
nextflow run nf-core/sarek -r 3.8.1 -profile singularity,test_full --outdir /mnt/HDD2/sarek_test/output/ -resume
Copy code
[...]
-[nf-core/sarek] Pipeline completed successfully-

Completed at: 13-Feb-2026 21:58:44
Duration    : 4h 52m 59s
CPU hours   : 96.3 (42,1% cached)
Succeeded   : 214
Cached      : 48
Then I tried to run it with our data by starting with one patient with paired-end fastq files (already demultiplexed and merged). I recycled the
base.config
found in your git and add the
umi_read_structure
and
umi_in_read_header
to force fgbio step. Also
GRCh37
as reference genome instead of GRCh38. However I am stuck at
bwa-mem
step (which was not the case without UMI information):
nextflow run nf-core/sarek -profile singularity --input /mnt/HDD2/sarek_inhouse/samplesheet_mapping_NGShem.csv --outdir /mnt/HDD2/sarek_inhouse/2026-02-04_SRP_NGShem/ -c /mnt/HDD2/sarek_inhouse/base.config -r 3.8.0
Copy code
[...]
Execution cancelled -- Finishing pending tasks before exit
-[nf-core/sarek] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_SAREK: SAREK :FASTQ_PREPROCESS_GATK:FASTQ_CREATE_UMI_CONSENSUS_FGBIO:ALIGN_UMI:BWAMEM1_MEM (C2508328-star-lane_1)'

Caused by:
  No signature of method: nextflow.processor.TaskPath.get() is applicable for argument types: (Integer) values: [0]
  Possible solutions: getAt(int), grep(), getAt(java.lang.String), grep(java.lang.Object), head(int), wait() -- Check script '/home/localadmin/.nextflow/assets/nf-core/sarek/modules/nf-core/bwa/mem/main.nf' at line: 29

Source block:
  def args = task.ext.args ?: ''
  def args2 = task.ext.args2 ?: ''
  def prefix = task.ext.prefix ?: "${meta.id}"
  def samtools_command = sort_bam ? 'sort' : 'view'
  def extension = args2.contains("--output-fmt sam")   ? "sam" :
                  args2.contains("--output-fmt cram")  ? "cram":
                  sort_bam && args2.contains("-O cram")? "cram":
                  !sort_bam && args2.contains("-C")    ? "cram":
                  "bam"
  def reference = fasta && extension=="cram"  ? "--reference ${fasta}" : ""
  if (!fasta && extension=="cram") error "Fasta reference is required for CRAM output"
  """
  INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'`
  
  bwa mem \\
      $args \\
      -t $task.cpus \\
      \$INDEX \\
      $reads \\
      | samtools $samtools_command $args2 ${reference} --threads $task.cpus -o ${prefix}.${extension} -
  
  cat <<-END_VERSIONS > versions.yml
  "${task.process}":
      bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//')
      samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
  END_VERSIONS
  """

Container:
  /mnt/HDD2/sarek_inhouse/work/singularity/community-cr-prod.seqera.io-docker-registry-v2-blobs-sha256-bf-bf7890f8d4e38a7586581cb7fa13401b7af1582f21d94eef969df4cea852b6da-data.img

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

 -- Check '.nextflow.log' file for details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: <https://nf-co.re/docs/usage/troubleshooting>

 -- Check '.nextflow.log' file for details
WARN: Failed to render execution report -- see the log file for details
WARN: Failed to render execution timeline -- see the log file for details
If I understand well the error is due to an non-existent prefix value:
~/.nextflow/assets/nf-core/sarek/modules/nf-core/bwa/mem/main.nf
def prefix = task.ext.prefix ?: "${meta.id}"
Do you know how to define prefix? I thought it was taken from the patient +/- combination lane from the sample sheet. I tried to force a value on
-c .config
file under
params
or
process
but as I am a beginner on nextflow I may miss something. However the prefix exists when I check the command:
singularity run --bind /mnt/HDD2/sarek_inhouse/ /mnt/HDD2/sarek_inhouse/work/singularity/community-cr-prod.seqera.io-docker-registry-v2-blobs-sha256-bf-bf7890f8d4e38a7586581cb7fa13401b7af1582f21d94eef969df4cea852b6da-data.img
Copy code
Singularity> cd /mnt/HDD2/sarek_inhouse/work/b0/44a5b97d596779ab2b496505aca785/
Singularity> cat .command.sh
#!/bin/bash -euo pipefail
samtools \
    bam2fq \
    -T RX \
    -@ 2 \
    C2508328-star-lane_1.bam | gzip --no-name > C2508328-star-lane_1_interleaved.fq.gz
Copy code
cat <<-END_VERSIONS > versions.yml
"NFCORE_SAREK:sarek:FASTQ_PREPROCESS_GATK:FASTQ_CREATE_UMI_CONSENSUS_FGBIO:BAM2FASTQ":
    samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*$//')
END_VERSIONS
Here the sample sheet:
cat samplesheet_mapping_NGShem.csv
Copy code
patient,sex,status,sample,lane,fastq_1,fastq_2
C2508328-star,NA,1,C2508328-star,lane_1,/mnt/SHARE_NGSDATA/IPA_NHE/260204_VH01811_146_AAHJLJCM5/Analysis/1/Data/fastq/C2508328-star_S1_R1_001.fastq.gz,/mnt/SHARE_NGSDATA/IPA_NHE/260204_VH01811_146_AAHJLJCM5/Analysis/1/Data/fastq/C2508328-star_S1_R2_001.fastq.gz
I also joined the log file and base.config. The nextflow version used is 25.10.3 and the sarek version used is 3.8.0. I tried to find this error on slack search bar but I was not able to found something similar. Hope you have enough information to give me some hints. Thanks for your time and help. Best, Vimel
s
Just to note that I made some suggestions in the #C043FMKUNLB question, so anyone looking to answer it may be already answered 😉
👍🏾 1
r
Thanks! Basically I was using an old config file with
-c
, I removed this option and use
-params-file
to specify parameters.
-c
is used only for nextflow option. Also use the last updated sarek version. Sarek run without problems with my data, and I can find the bam file in
works/
directory which is a great new! However the annotated vcf is not here, probably because I did not specified the tools to use for the variant calling and annotation steps. Also if I want a bam file in my output directory instead of work I guess I am supposed to use
"save_mapped": true
in params file. I run with
-resume
but I am not able to debug the error I get. Here the command:
nextflow run nf-core/sarek -profile singularity --input /mnt/HDD2/sarek_inhouse/samplesheet_mapping_NGShem.csv --outdir /mnt/HDD2/sarek_inhouse/2026-02-04_SRP_NGShem/ -r 3.8.1 -with-report -with-trace -with-timeline -with-dag -params-file ipa_params.json -resume
The sample sheet (with one tumor sample specified with status 1):
cat samplesheet_mapping_NGShem.csv
Copy code
patient,sex,status,sample,lane,fastq_1,fastq_2
C2508328-star,NA,1,C2508328-star,L1,/mnt/SHARE_NGSDATA/IPA_NHE/260204_VH01811_146_AAHJLJCM5/Analysis/1/Data/fastq/C2508328-star_S1_R1_001.fastq.gz,/mnt/SHARE_NGSDATA/IPA_NHE/260204_VH01811_146_AAHJLJCM5/Analysis/1/Data/fastq/C2508328-star_S1_R2_001.fastq.gz
The params file:
cat ipa_params.json
Copy code
{
  "igenomes_ignore": true,
  "genome": "GATK.GRCh37",
  "markdup_java_options": "-Xmx20g",
  "umi_read_structure": "5M2S+T 5M2S+T",
  "tools": "mutect2,mpileup,vep",
  "annotation-cache": "/mnt/ARC/IPA/CBIOMOL_ARCH/References/vep/",
  "dbsnp": "/mnt/HDD2/sarek_inhouse/bgzip_input/dbsnp_138.b37.vcf.gz",
  "intervals": "/mnt/ARC/IPA/CBIOMOL_ARCH/MISEQ_bioinfo/Heme.panel/Annotation/HemePanel.padded.Nochr.v4.bed",
  "known_indels": "/mnt/HDD2/sarek_inhouse/bgzip_input/1000G_phase1.indels.b37.vcf.gz",
  "known_snps": "/mnt/HDD2/sarek_inhouse/bgzip_input/1000G_phase1.snps.high_confidence.b37.vcf.gz",
  "pon": "/mnt/HDD2/sarek_inhouse/bgzip_input/MuTect2_PON.vcf.gz",
  "max_cpus": 24,
  "max_memory": "128 GB"
}
And the specific error and the log joined:
Copy code
nextflow.exception.WorkflowScriptErrorException: The sample-sheet only contains normal-samples, but the following tools, which were requested with "--tools", expect at least one tumor-sample : mutect2
I looked for this error on slack research bar. In a 24/09/2025 topic, it seems it was a question of sarek version. As your advice, I am using the last one
-r 3.8.1
. So I am wondering how to fix that and currently have no idea. Is there somewhere a params file with all possible argument? It could be useful. Best, Vimel
a
Hiya. For sarek 3.9.0dev, I had the same tumour/mutect error when I changed something completely unrelated yesterday - . (in the UMI workflow). Seemed to be caused by my changes to that upstream workflow not working properly...and terminating there (all fine when UMI workflow corrected). Assuming the mutect error was a knock-on effect ...but obviously not very informative/helpful...for me at least.
r
I made changes in the params file (hg38 reference genome, good vep location, freebayes, mpileup and manta). It is currently running without Mutect2 only, otherwise I have the same error. I think there is a problem with Mutect2 which cannot handle a sample sheet with only a tumor only? Or something more complex but linked to Mutect2
I also run with GRCh37, this time mutect2 as tools did not print bug message but there is no variant calling output files. Is it possible to run sarek with fastq as input in sample sheet and without step (mapping by default) in params file: but have the results of prepare recalibration, recalibrate, variant calling and annotate? Currently it is seems it is not possible or I miss something in my params file. I have an output bam but located in work/ dir. I could give a try by creating a new sample sheet with bam as input to perform the variant calling but I will have to perform this 2 steps for all analyses.