SOP - Routine SARS-CoV-2 sequencing data administration 

Mateusz Jundzill, Riccardo Spott, Mara Lohde, Martin Hölzer, Adrian Viehweger, Christian Brandt

Published: 2023-03-09 DOI: 10.17504/protocols.io.kxygx91zzg8j/v1

Abstract

This is a step-by-step standard operating protocol (SOP) for data administration using the MongoDB database for routine SARS-CoV-2 sequencing.

The collapsed note blocks contain command-line solutions that are usually faster but require more advanced IT knowledge.

Additionally, we have enclosed a Github repository with a code and script approach to automate multiple data administration procedures.

Please note that since these codes are specifically made to be used with the SARS-CoV-2 internal database, they will require adjustments to work with other databases. In this protocol, we have focused on using the MongoDB Compass GUI, but there are other solutions available. We recommend choosing the most suited solution for your needs.

Steps

Creating New Entries

1.

Sample arrives from external or internal partner.

2.

Sample entry creation. Fill the template CSV file with the given information and import it through MongoDB Compass.

Example of a template CSV:

ABCDE
Sample_IDIsolation_DateLongitudeLatitude...
A1234523010111.58611150.927223...
B1234523010111.58611150.927223...
...............

Longitude and latitude data can later be used for visualizing MongoDB Chart maps.

Import icon in MongoDB Compass.
Import icon in MongoDB Compass.

Select Import File and choose a file for data upload. Pick CSV in the Select Input FileType option.

If the file is in proper format, a table with the headline Specify Fields and Types should appear, providing an overview of the imported data and allowing you to specify key types. Confirm by selecting Import.

Note
Command line import approach: Enter the Docker container in the folder where CSV file is located. Execute command: If Docker is not installed follow the official If Docker is not installed follow the official instalation manual..If Mongo Tools are installed, the mongoimport command can be executed without entering the Docker container.

Sequencing preparation

3.

Select samples for laboratory work. Access database using MongoDB Compass and search for samples that have an empty Status field.

Search query example:

{Status:""} 
```<img src="https://static.yanyin.tech/literature_test/protocol_io_true/protocols.io.kxygx91zzg8j/1_1.png" alt="Search field in MongoDB Compass." loading="lazy" title="Search field in MongoDB Compass."/>

Fill  _the Status_  field with a short personal identifier and a sample barcode number.





Example:

RS1_BC01




4.

(Optional) Export the sample list as a CSV file. Search for the desired samples using MongoDB Compass and then export the results to a CSV file.

The exported CSV can also be used to update entries at a later step (see step 6).

Example of a queary that searches for a status that contais 'BC' (barcode).

{Status:{$regex: 'BC'}} 
Export icon in MongoDB Compass.
Export icon in MongoDB Compass.

Command line export approach:

Note
Command line export approach: Enter the Docker container: Execute the following command:

5.

Print out the sample for the laboratory work.

Sample analysis

6.

(Optional) Analyze the results your experiment and update the list prepared in with any data that you want to store in the database.

Database entry update

7.

Update MongoDB database with new results. There are three available solutions:

  1. Manually update entries in MongoDB Compass.

Switch to the optimal data view in the application (table-like or JSON-like), depending on how many entries you need to view. Then, turn on the edit mode and in case you would like to add a new key-value pair select the small plus sign. This will create a new key-value pair that you can modify. To modify an existing value, double-click on value you wish to modify. Confirm your changes by choosing Update .

  1. Pure CSV solution. Export the list of analyzed samples by querying the common Status field fragment e.g. BC (Barcode):
{Status:{$regex: 'BC'}} 

Update the exported CSV with new information and change the status of failed sequencing runs to fail . Then, delete the preexisting database entry and import the updated CSV file using MongoDB Compass.

Note
Command line update approach: Enter the Docker container: Execute the following command:

8.

Check data integrity. This could be performed in multiple ways:

  1. Go to the MongoDB Compass Schema tab, select Analyze Schema and check your data for any discrepancies (such as numerical values out of bonds, repeated values, unusual data formats, etc.)

  2. Prepare MongoDB Charts data overview that works in a similar but customized way as MongoDB Compass Schema.

  3. Use sanity scripts similar to the 'field_mod_exec.sh' script provided in the Github repository The script can also create a new field based on the given information. Please note that the provided scripts require modification and adjustments to work with databases other than the internal Routine SARS-CoV-2 sequencing database.

Prepare a report file

9.

Prepare report file for external partners. Prepare results for the report by searching the database for the desired data, such as by Analysis Date or any other required field Then export the list with selected fields to a CSV file via MongoDB Compass.

Example to filter data by date of analysis:

{"Analysing_Date": <date of analysis>}

Note
Command line approach: Enter the Docker container: Execute the following command:

推荐阅读

Nature Protocols
Protocols IO
Current Protocols
扫码咨询