Create

How to create a new comparative analysis

Introduction

Comparative analysis is used to view groups of samples to determine similarities and differences between them. It works by taking the resulting organisms from all samples selected and making a matrix. This matrix contains each organism and each sample and identifies whether or not each organism was found in a sample. You can also select groups of samples, also known as cohorts, to compare to each other so you can determine differences or similarities between the groups.

Comparative analysis allows you to look for trends in your data. For example, certain bacteria might be present in higher abundance in certain cohorts. An example would be comparing the gut microbiome of mice fed different diets. Some groups may have different gut bacteria depending on what they eat.

Video walkthrough of Metadata import and generating comparative analyses using it

Create a New Comparative Analysis using uploaded metadata from the Cohorts & Metadata Menu

CosmosID-HUB Microbiome allows you the option to generate comparatives automatically using automated cohort splitting instead of selecting each sample manually for different cohorts. Please refer to the Cohorts & Metadata section in the documentation to learn how to add metadata to your samples. The video down below gives you a short demonstration on how to use this functionality for your use-case.

Create a New Comparative Analysis using Custom Tags added from the Cohorts & Metadata Menu

CosmosID-HUB Microbiome allows you the option to generate comparatives by using user defined custom tags. The custom tags can be added to a group of samples from the Cohorts & Metadata Menu. Different cohorts within a project can be defined by using custom tags for individual cohorts respectively. Once the custom tags are added to the respective samples within the project, you can create comparative and define comparative cohorts using the custom tags you added previously for your different cohorts. The video down below gives you a short demonstration on how to use this functionality for your use-case.

Create a New Comparative Analysis using Folder Names from the Cohorts & Metadata Menu

CosmosID-HUB Microbiome allows you the option to generate comparatives by using folder Names. Cohorts within a project can be defined by creating sub-folders to bin the samples that belong to certain cohorts respectively. Different folder names for individual cohorts can then be used to create comparatives and define comparative cohorts using the different folder names you added previously from the cohorts and metadata menu. The video down below gives you a short demonstration on how to use this functionality for your use-case.

Create a New Comparative Analysis from the Comparative Analysis Section on the menu

To create a new comparative analysis, navigate to the comparative analysis page by clicking on the comparative analysis alt text button. If you have already run some comparative analyses they will appear here.

Click on the "Create" button. Enter a name for your comparative analysis report.
Select database from the dropdown menu. Select filtered or total results to use for the comparative analysis. Read more about Filtering. Select the value to use for the comparative analysis. For the main databases, you can choose relative abundance, frequency, total matches %, or unique matches %. Click here for the Definition of each of these values.

Cohorts are available to define groups of samples. Enter the names you wish to use in the cohort boxes.

Select Samples

To select samples you can click the check box to the left of the sample. You can do this for individual samples or for all samples by clicking the check box next to "file" at the top of the sample table. You can also assign samples to labels by selecting the check box under the correct label column. By default, if not given names, the labels are called "L1, L2, L3," etc. in the table. You can search for a sample name or date range by entering the search term in the search boxes just above the sample table. You can toggle on and off the initial example data sets provided.

Under the "submit" button on the right you can change the number of samples that are viewed at a time by selecting a number from the drop down menu. To scroll through pages of samples, click on the page numbers or "previous" or "next" at the bottom of the table.

In the sample selection table, in addition to the sample name, you will see the sample size and number of hits for that database (the number of organisms or genes identified).

🚧

You must select at least 2 datasets to perform comparative analysis.

After selecting your samples, click "Submit" to run your comparative analysis.

Comparative Analysis Setup using the TSV Template

In order to make the setup of complex comparative analyses more manageable, you can define the cohorts and assign samples using a spreadsheet. To do so please click on the "Export TSV" button to initiate the download of the TSV template. The TSV file can be opened in Excel or your favorite spreadsheet software. It comes pre-filled with the following information. Columns:
1 Display name
2 Selected
3 Cohort
4 Cohort Order
5 File name
6 Path
7 Submitted
8 Size
9 Dataset Reads
10 Hits (Total)
11 Hits (Filtered)
12 UUID (Do not modify)

Rows - Each row represents a sample that has been analyzed in your account using the database you selected at the beginning of the comparative analysis setup process.

Filling out the Template
Only three columns need to be edited.
Column 2 "Selected" - enter an X next to any sample you wish to include in the comparative analysis.
Column 3 "Cohort" - assign a selected name to a cohort by entering the cohort name here. For all samples belonging to the same cohort, please enter the same cohort name.
Column 4 "Cohort Order" - enter the number in which you'd like cohorts to appear in the comparative analysis results. For all samples belonging to the same cohort, please enter the same number.
Column 1 "Display name" - can be edited optionally and by default shows the file name.
"Columns 5 - 11" - include information that will make it easier to search or select the right samples. Editing this information has no effect.
"Column 12 UUID" (Do not modify) - includes a unique sample ID. This information may NOT be edited, otherwise the comparative analysis might fail.

Once the comparative analysis has been defined, please save the sheet in TSV format, then click on the Import TSV button, navigate to the saved TSV file and proceed.

Duplicating an existing Comparative Analysis

If you want to change certain samples or parameters of an already existing comparative analysis it is not necessary to go through the entire setup process again. You can instead create copy of the existing comparative analysis. Open the menu by clicking on the comparative analysis icon on the left panel. Select the comparative analysis you wish to duplicate. Click the Duplicate button in the upper right corner of the screen. The comparative analysis setup menu will appear where you can enter a name for the comparative analysis and modify for instance the database, samples, filter settings or the comparator metric. Once complete proceed by clicking the Submit button.

Rename or Remove existing Comparative Analysis

Open the menu by clicking on the comparative analysis icon on the left panel. Select one or multiple comparative analysis. Next to the search field in the upper left corner of the menu, you will see a confirmation of how many Comparative Analyses you have selected, followed by a Delete icon and a Rename icon. Selected Comparative Analyses will be permanently deleted and cannot be restored. They can however be recreated from original sample files. You will be asked to confirm if you wish to proceed. It is possible to select and delete multiple Comparative Analyses, but renaming is only possible for one Comparative Analyses at a time. To rename a Comparative Analyses, click the Rename button, which will give you access to a text entry field you can use to change the existing name. Text entry is limited to latin letters, numbers, ', &, (, ), [, ], +, !, ., - and _ symbols.

Create Comparative Analysis Video