fls-bioinformatics-core / auto_process_ngs

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

'publish_qc': add checks on deletion of existing content #878

Closed pjbriggs closed 11 months ago

pjbriggs commented 1 year ago

The publish_qc command will remove all content in the target directory but this could have unintended consequences in certain situations (e.g. if the target directory is not a QC publication directory).

To prevent this a couple of options are suggested:

  1. If target directory is not empty then check if it looks like a QC publication directory (for example, must contain index.html and processing) - conversely also check that it doesn't look like something else (e.g. analysis directory)

  2. Alternatively (or as well) add a hidden file (e.g. .publish_qc) to indicate that a directory is a QC publication directory. If the target is not empty and doesn't contain one of these files then the publication will stop.