bwameth symlink bug
Nobody has claimed this yet.
- Dominant language
- Nextflow
- Stars
- 198
- Forks
- 181
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 1
Description
Description of the bug
Hello,
I have tried using the bwameth workflow but encountered an issues with the BWAMETH_ALIGN related with how it handles symlinks:
ln -sf \$(readlink ${fasta}) ${index}/${fasta}
My workaround was to modify main.nf of that process in my local copy of the pipeline. I replace the code above with this:
if [ ! -f ${index}/${fasta} ]; then
ln -sf \$(readlink ${fasta}) ${index}/${fasta}
fi
Since the genome was already present in the index folder, the script now sees the file and skips the ln command entirely. This allows the script to proceed straight to bwameth.py without ever trying to modify the staged directory, keeping the Linux kernel and Nextflow happy.
Command used and terminal output
I ran the following command:
nextflow run nf-core/methylseq -r 4.2.0 --input EM005_starterSheet.csv --fasta /NCBI/GRCh38/Sequence/WholeGenomeFasta/genome.fa --fasta_index /NCBI/GRCh38/Sequence/WholeGenomeFasta/genome.fa.fai --aligner bwameth --run_qualimap true -profile crukmi --outdir final_results
And had this output:
Error executing process > 'NFCORE_METHYLSEQ:METHYLSEQ:FASTQ_ALIGN_DEDUP_BWAMETH:BWAMETH_ALIGN (0462_L004)'
Caused by:
Process `NFCORE_METHYLSEQ:METHYLSEQ:FASTQ_ALIGN_DEDUP_BWAMETH:BWAMETH_ALIGN (0462_L004)` terminated with an error exit status (1)
Command executed:
export BWA_METH_SKIP_TIME_CHECKS=1
ln -sf $(readlink genome.fa) BwamethIndex/genome.fa
bwameth.py \
\
\
-t 48 \
--reference BwamethIndex/genome.fa \
0462_L004_1_val_1.fq.gz 0462_L004_2_val_2.fq.gz \
| samtools view -@ 48 -bhS -o 0462_L004.bam -
cat <<-END_VERSIONS > versions.yml
"NFCORE_METHYLSEQ:METHYLSEQ:FASTQ_ALIGN_DEDUP_BWAMETH:BWAMETH_ALIGN":
bwameth: $(bwameth.py --version | cut -f2 -d" ")
END_VERSIONS
Command exit status:
1
Command output:
(empty)
Command error:
INFO: Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred
INFO: Environment variable SINGULARITYENV_NXF_TASK_WORKDIR is set, but APPTAINERENV_NXF_TASK_WORKDIR is preferred
INFO: Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
ln: BwamethIndex/genome.fa: File exists
Work dir:
/scratch/wsspaces/achelu-methylseq-EM005/EM005/work/13/0f83ef7c27dced7ab5479f45162422
Container:
/lmod/nextflow_software/depot.galaxyproject.org-singularity-bwameth-0.2.9--pyh7e72e81_0.img
Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`
Relevant files
No response
System information
- Nextflow version: 25.04.4
- Hardware, executor and container engine details are in crukmi profile
- Methylseq version 4.2.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in main.nf at the BWAMETH_ALIGN process and inspect the command that stages genome.fa into BwamethIndex. Reproduce the supplied Nextflow command or run the generated task command from the reported work directory, then verify that an existing indexed genome no longer causes the File exists failure and that bwameth.py proceeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100