Skip to content

Samtools index automatic copy/link is not functional with cross-device links #349

@hexylena

Description

@hexylena
$ cat call-renameIndex-2-...-0/command   

bash -c '
# Make sure outputBamPath does not exist.
if [ ! -f ./ILX/ILX.bam.bai ]
then
    mkdir -p "$(dirname ./ILX/ILX.bam.bai)"
    ln /mnt/miniwdl_task_container/work/_miniwdl_inputs/0/ILX.bam ./ILX/ILX.bam.bai || cp /mnt/miniwdl_task_container/work/_miniwdl_inputs/0/ILX.bam ./ILX/ILX.bam.bai
fi
samtools index \
--threads 0 \
./ILX/ILX.bam.bai ./ILX/ILX.bam.bai
'

I manually took the set -e out, thinking that would fix it (it should, ne?) but the job still errors. Clearly this was done intentionally to solve exactly the issue I face but, there's something not working or somewhere a

$ cat call-renameIndex-2-...-0/stderr.txt 
ln: ./ILX/ILX.bam.bai: Invalid cross-device link
samtools index: use -M to enable indexing more than one alignment file

I'm not sure why this still fails, maybe later I'll find time to investigate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions