Data record deletion¶
Deletion and removal of physical data from disk¶
Deleting a dataset object is not equivalent to removing files from the file system. These are two distinct operations. Dataset deletion happen at the application level (or more accurately the database behind the application). Physical data removal from disk happen at the filesystem level.
The two have different controls on the interface. It is possible to delete a data record without necessarily removing the underlying files. The data record will be flagged as deleted in the database, but the files will remain on disk.
Removing files¶
In the end, what is removed is always the datafile copy. However, because we want to protect the integrity of logical units of data, and because the datafile copy model does not intrinsically encompass enough information to make relevant decision about the removability of a file, the interface does not allow to act on single datafile copies directly. It remains however possible to trigger file removal via the application interface, but it has to happen at the dataset level.
The file removal control is available in certain situations to remove files. In addition, upon deleting certain data management records, the interface will prompt you to know whether or not the associated physical data should be removed from disk too.
How to remove files?¶
There are different entry points for removing files.
Removing datafile copies associated to a list of datasets¶
Datafile copies associated to datasets can be targeted individually from dataset lists. This is the case on the datasets list page, but also on datasets lists within an assay detail or study detail page.
The file removal control appears on the top-right corner of the dataset list. It is available when the user has selected one or more datasets.
This opens a modal where certain decision can be taken, and information about the removal can be given by the user performing the removal.
Removal of files following the deletion of a record¶
In other situations, you will be prompted if you want to remove files from disk when deleting a data record. This happens when deleting an assay, an upload session or a dataset.
An example of this is shown on the screenshot below, where deleting an assay prompts about file removal
Removal of managed data¶
Data registered as part of a managed assay is referred to as managed data. It is handled slightly differently, with additional safeguards. We allow the removal of files associated to a managed dataset only when (1) the QC on the dataset is explicitely set to FAILED or (2) when the file copies associated to this dataset have another copy on a protected storage volume (for example, when they have been archived).