I’m currently in the process of adapting a Snakemake pipeline to a docker like container image using podman.
or:
Unfortunately, I encountered an error right at the first rule, as follows:
Building DAG of jobs...
Using shell: /bin/bash
Provided cores: 1 (use --cores to define parallelism)
Rules claiming more threads will be scaled down.
Job stats:
job count
--------------------- -------
CNA_call 2
QDNAseq_binReadCounts 2
QDNAseq_normalize 2
QDNAseq_segment 2
bwa_aln 1
deWave 2
generate_stats 1
lightBox 8
mark_duplicates 1
qcbam 1
qcfastq 1
samtools_sort 1
service 1
summary 2
total 27
Select jobs to execute...
[Thu May 2 15:11:44 2024]
rule bwa_aln:
input: /mnt/shared/analysis/fastq/210316-NKI_100_S37_R1_001.fastq.gz
output: /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.sai, /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.samse.sam
log: /mnt/shared/resultsReport_docker_01/log/bwa/210316-NKI_100_S37_R1_001.log
jobid: 5
reason: Missing output files: /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.sai, /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.samse.sam
wildcards: sample=210316-NKI_100_S37_R1_001
resources: tmpdir=/tmp
[Thu May 2 15:11:44 2024]
Error in rule bwa_aln:
jobid: 5
input: /mnt/shared/analysis/fastq/210316-NKI_100_S37_R1_001.fastq.gz
output: /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.sai, /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.samse.sam
log: /mnt/shared/resultsReport_docker_01/log/bwa/210316-NKI_100_S37_R1_001.log (check log file(s) for error details)
shell:
bwa aln -n 2 -t 1 -q 40 /mnt/shared/ref_fasta/hg19.fa /mnt/shared/analysis/fastq/210316-NKI_100_S37_R1_001.fastq.gz > /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.sai 2> /mnt/shared/resultsReport_docker_01/log/bwa/210316-NKI_100_S37_R1_001.log; bwa samse -f /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.samse.sam -r '@RGtID:210316-NKI_100_S37_R1_001tSM:210316-NKI_100_S37_R1_001' /mnt/shared/ref_fasta/hg19.fa /mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.sai /mnt/shared/analysis/fastq/210316-NKI_100_S37_R1_001.fastq.gz 2>> /mnt/shared/resultsReport_docker_01/log/bwa/210316-NKI_100_S37_R1_001.log
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
Removing output files of failed job bwa_aln since they might be corrupted:
/mnt/shared/resultsReport_docker_01/bam/210316-NKI_100_S37_R1_001.sai
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2024-05-02T151143.641727.snakemake.log
The command line used for the execution is as follows:
(jupyter) [jppmatos@hpc-pat01 docker_ver]$ podman run -v /home/jppmatos/test_QDNA_snake/docker_ver:/mnt/shared/:z docker.io/jpmatos/test:0.4.QDNAseq snakemake --cores 1 --configfile /mnt/shared/config.yaml
After conducting some research, it appears to be a permissions issue, which makes sense since I’m running Podman rootless.
I also executed the same Snakemake pipeline outside of the container image, and it ran smoothly (just to confirm if it the pipeline it self).
If further information is required, please do not hesitate to ask.
Thank you for your time and attention.
JPMatos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.