Hands-on: Merging Redundant Samples¶
- 15 min
- Easy
Overview
Sometimes you'll end up in a situation where you have created the same sample(s) many times. For example, you batch-created samples and linked sequencing libraries using excel templates. Later, you write your ELN and create an experiment reflecting the library preparation including batch creation of samples as we did in The Experiment's Sample Editor.
Although we haven't looked into assay & dataset management, we can mention that the creation of redundant samples occurs frequently when registering raw data corresponding to technical replicates.
Walkthrough¶
Step 1. Batch create redundant samples¶
We first need to create the redundant situation as depicted in the following diagram
Simulating a situation with redundant samples
-
Navigate to the Biomaterial menu and click the Sample sub-menu, mouse over the button above the table and click on the Download template for batch create link.
-
Edit the excel spreadsheet to reflect the picture below and save it e.g. as batch_create_redundant_samples.xlsx
- remove all optional columns
- use your own project_i.e._Tea Project or Coffee Project
-
Navigate to the Biomaterial menu and click the Sample sub-menu, mouse over the button above the table and click on the Batch create with spreadsheet link.
-
Drag'Drop the batch_create_redundant_samples.xlsx excel file to batch upload the samples; check the results.
-
Use the trick explained in the previous tutorial at step 2 , to generate 9 different sequencing libraries:
- export the samples for batch-edit
- convert the template to a sequencing library batch-create template (as depicted in the below picture):
- Rename the Excel sheet to SEQUENCINGLIBRARY (circled in red)
- Remove all non-mandatory columns but the Parents one
- Copy the content of the ID column in the Parent column
- Remove the ID column
- Adapt the library name i.e. lib-A1..3, lib-B1..3 & lib-C1..3 for Sample A, B & C respectively. Make sure that each library is a child of the 9 samples created just before and name them to reflect 3 groups as shown in the below picture.
- Add the Barcode column: write Barcode in the first row, barcode in the second (all lowercase) and type random but different barcodes (only use A,C,T,G letters)
- Save the document (e.g. as easy_child_creation.xlsx)
-
Batch create them and check the result on the Sequencing Library list page. From the display, it looks OK i.e. the parent sample names are the same but we know those are actually different samples.
Step 2. Merge redundant samples¶
-
Navigate to the Biomaterial menu and click the Sample sub-menu, select the 9 redundant samples and click on
-
The Merge Samples component pops up. By default, all samples are considered one group and the merge sample tool expects you to select the only sample that should remain while all others would be deleted after the merge operation. This is not what we want, we want to merge the sample A/B/C independently by name groups.
-
Click the Group by name and select one sample to keep per group (keep column). Here the choice is not important but in real life, you should select the one that has the most information among all the similar ones.
-
Validate with the Merge samples button (bottom-left) and check the sample list table.
-
Open the detail page of sample A and check its lineage.
Congrats! You have completed this hands-on section. Next we will learn about Assay & Dataset management.