Deleting Loaded Data
When you add data to your Persephone database, PersephoneShell tags this addition as a run with a unique ID, known as a RunId. You can use the List command to list runs and their RunIds along with what sort of object (e.g., an annotation) was added and when it was added to your Persephone database.
In addition, once you have identified the RunId and what was added during that run, you can use the RunId along with the Delete command to delete the object from your Persephone database. The steps required to delete an object are described below.
Note
This section is a "use case" for this example indented to provide quick steps to delete objects in your Persephone database with the List and Delete commands. For complete syntax of these commands please refer to List and Delete for more information.
Note that there are multiple ways of deleting the objects in the database: mapset, tracktreenode, variants, etc. Some of the objects (like otholog pairs) can be deleted only by using their RunId assigned during loading.
Step 1: Identify the RunID
Before you can delete an object, you need to identify the run where it was added and the corresponding RunId using the List command. For example, enter the following to list the top 5 runs in "long-listing" format in reverse chronological order
PS> list runs -l -r -t 1
The following is a typical example of the output.
RUN_ID DESCRIPTION PROCESS_TYPE DATE_CREATED CREATED_BY PARENT_RUN_ID
------------------------------------------------------------------------------------
200 Add true genetic maps for wheat from https://doi.org/10.1371/journal.pone.0186329.s003.zip LOAD MAPS 7/27/2018 11:53:19 PM operator (null)
1 run
In the example above, there is the most recent run with the RunId=200 that loaded markers.
To narrow down the search, when looking for a run of particular type (e.g., orthologs), specify the type of the batch job using "-T <job type>", e.g.
list run -l -T ortholog
This "job type" is the term used after the add verb when loading the data (add annotation, add ortholog, add qtls, etc).
Step 2: Delete the Object
Once you have identified the RunID of the run that added the object or objects you want to delete, use the Delete command to delete the run and the object or objects it added. For example, enter the following to test deleting the run with the RunId of "200" that had added markers:
PS> delete run 200 -t
The following confirmation message will be displayed.
This operation will affect:
- 35768 annotations
- 13 tracks
run 200 can be removed
In the verbose mode, before deleting the objects associated with the given run, the program will ask for a confirmation. The confirmation can be avoided by using the switch '-f' (force).