fls-bioinformatics-core / auto_process_ngs

Scripts and utilities for automatic processing & management of Illumina NGS sequencing data.
Other
9 stars 7 forks source link

Fix bug in QC pipeline if working dir is on different device to QC dir #925

Closed pjbriggs closed 9 months ago

pjbriggs commented 9 months ago

Fixes a bug in the QC pipeline (qc/pipeline) when the working directory is on a different filesystem device to the final output QC directory.

This specifically affects the GetBAMFiles task, which uses os.rename to move files from the working area to the QC directory; in this case the move fails with OSError: [Errno 18] invalid cross-device link.

The fix is to use shutil.move instead (see https://stackoverflow.com/a/43967659/579925).