Tasks
Actions
Resume
To resume this run, resubmit with same or fixed code. You can also change other parameters but that will affect caching behavior.
-resume 6f2537f7-ee86-4c06-981a-640edfc8ce88 -name mipeters-sarek-optitype-subsample10k-glpk-697d0768
Error Report
Error executing process > 'NFCORE_SAREK:SAREK:CRAM_HLATYPING_ALL:CRAM_FILTER_HLA (1029_BBCQ-N1-BDNA-1_2375WFLT3_s21)'
Caused by:
Process `NFCORE_SAREK:SAREK:CRAM_HLATYPING_ALL:CRAM_FILTER_HLA (1029_BBCQ-N1-BDNA-1_2375WFLT3_s21)` terminated with an error exit status (2)
Command executed:
# Detect input type and set up appropriate pipeline
# CRAM requires samtools conversion first; BAM can be read directly by sambamba
if [[ "1029_BBCQ-N1-BDNA-1_2375WFLT3_s21.recalibrated.bam" == *.cram ]]; then
INPUT_CMD="samtools view -h -b --reference Homo_sapiens_assembly38.fasta 1029_BBCQ-N1-BDNA-1_2375WFLT3_s21.recalibrated.bam"
else
INPUT_CMD="cat 1029_BBCQ-N1-BDNA-1_2375WFLT3_s21.recalibrated.bam"
fi
MAX_READS=10000
# Filter reads and sort by name
eval $INPUT_CMD | \
sambamba view \
-f bam -h \
-t 18 \
-F "unmapped or mate_is_unmapped or (ref_name == 'chr6' and position > 29844528 and position < 33100696) or ref_name =~ /^HLA|chr6.*alt/" \
/dev/stdin | \
sambamba sort \
-n \
-t 18 \
-o filtered.bam \
/dev/stdin
# Count read pairs and optionally subsample
TOTAL_READS=$(samtools view -c filtered.bam)
TOTAL_PAIRS=$((TOTAL_READS / 2))
echo "HLA filter: $TOTAL_PAIRS read pairs extracted"
if [[ $MAX_READS -gt 0 && $TOTAL_PAIRS -gt $MAX_READS ]]; then
# Calculate subsample fraction (add 5% buffer to account for sampling variance)
FRAC=$(awk "BEGIN {printf "%.4f", ($MAX_READS * 1.05) / $TOTAL_PAIRS}")
echo "Subsampling to ~$MAX_READS pairs (fraction: $FRAC)"
samtools view -s 42.$FRAC -b filtered.bam | \
samtools fastq \
-@ 18 \
-1 1029_BBCQ-N1-BDNA-1_2375WFLT3_s21_R1.fq.gz \
-2 1029_BBCQ-N1-BDNA-1_2375WFLT3_s21_R2.fq.gz \
-0 /dev/null \
-s /dev/null \
-
else
# No subsampling needed
samtools fastq \
-@ 18 \
-1 1029_BBCQ-N1-BDNA-1_2375WFLT3_s21_R1.fq.gz \
-2 1029_BBCQ-N1-BDNA-1_2375WFLT3_s21_R2.fq.gz \
-0 /dev/null \
-s /dev/null \
filtered.bam
fi
rm -f filtered.bam
cat <<-END_VERSIONS > versions.yml
"NFCORE_SAREK:SAREK:CRAM_HLATYPING_ALL:CRAM_FILTER_HLA":
sambamba: $(sambamba --version 2>&1 | head -1 | awk '{print $2}')
samtools: $(samtools --version | head -1 | awk '{print $2}')
END_VERSIONS
Command exit status:
2
Command output:
HLA filter: 1278131 read pairs extracted
Command error:
sambamba 1.0.1
by Artem Tarasov and Pjotr Prins (C) 2012-2023
LDC 1.39.0 / DMD v2.109.1 / LLVM17.0.6 / bootstrap LDC - the LLVM D compiler (1.39.0)
sambamba 1.0.1
by Artem Tarasov and Pjotr Prins (C) 2012-2023
LDC 1.39.0 / DMD v2.109.1 / LLVM17.0.6 / bootstrap LDC - the LLVM D compiler (1.39.0)
awk: line 1: syntax error at or near %
Work dir:
s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/b6/03b184e6f0e77b703ed3815225de95
Container:
community.wave.seqera.io/library/sambamba_samtools:0966924e22545fbe
Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line
Workflow
- Language / Cluster
- Nextflow / pltf-dev
- Session ID
- 6f2537f7-ee86-4c06-981a-640edfc8ce88
- Source
- /code/main.nf
- Work Dir
- s3://natera-rnd-pltf-dev-nextflow-scratch-01/work
- Submitted By
- mipeters
- Resumed
- No
Cost and Runtime
- Status
- failed
- Cost
- $0.38
- Outputs
- 1.6 GB
- Started
- Jan 30, 2026 11:34 AM
- Completed
- Jan 30, 2026 11:48 AM
- Duration
- 14m 24s
- Post-workflow Transfer
- 1s
- Exit Status
- 2
- Peak Tasks / CPU / Mem
- 13 / 52 / 224.0 GB