How-to: Remove a Sample from an Experiment/Workflow Instance
A sample can be removed from an Experiment/Workflow Instance following the steps below:
Via UI:
To remove a sample from an experiment, it must first be added to a LIMS worksheet
Click on the empty space next to desired worksheet and an inspector panel will open up on the right side of the screen
Click on the black triangle to expand the list of samples
Hover over the desired sample and click on the 'x' to remove that sample from the experiment/workflow instance
Via Backend:
ESP offers a remove_sample() function in l7 console, which can be leveraged to remove samples from backend directly
Example:
Via Client:
A sample is not able to be removed from the client at this time using the remove_sample() function directly
However, users may update the experiment/workflow instance with a list of samples that the user wishes to keep
Case 1: Experiment is in “queued” state (i.e., experiment is not added to a LIMS worksheet):
Case 2: Experiment is in “running” state (i.e., experiment is added to LIMS worksheet)
If an experiment is added to a worksheet, the samples must first be removed from the worksheet and then removed from experiment/workflow_instance
Example: Remove sample “ESP000008"
Via Rest API:
Similar to client, users are not able to remove a sample directly from an experiment; however, a user can update the experiment with the list of samples to keep
Case 1: Experiment is in ‘Queued’ state
Example: Experiment "Delete Sample 3" in LIMS queue with three (3) samples
After running the API:
Case 2: Experiment is in ‘Running’ state (since the experiment is already added to a LIMS worksheet, the samples must first be removed from the worksheet and then removed from the experiment/workflow_instance)
Example: Experiment and worksheet with four (4) samples in 'running' state
Step 1: Remove 2 samples from samplesheet where
["<sample1 uuid>", "<sample2 uuid>"]
are the samples to keep -PUT /api/sample_sheets/<uuid> {"samples": ["<sample1 uuid>", "<sample2 uuid>"]}
Step 2: Remove the same 2 samples from Experiment/workflow_instances
PUT /api/workflow_instances/<uuid> {"samples": ["<sample1 uuid>", "<sample2 uuid>"]}