Managing Sample Metadata

Each project in IRIDA may contain a collection of samples that corresponds to an isolate. Each sample can contain an indefinite number of metadata terms.

Viewing and modifying metadata on a sample

Metadata can be viewed and modified on the individual sample.

Bulk import of metadata for samples within a project

Administrators and project managers can directly upload Excel spreadsheets of metadata directly to a project. It is expected that one of the columns in the spreadsheet will map to the sample name within IRIDA, this can be selected at upload time.

Links to the upload page can be found:

  1. On the Project > Samples page, under the Sample Tools dropdown menu: Bulk upload on project sample page under sample tools menu.

  2. On the Project > Linelist page: Bulk upload on project linelist page using link.

Please note that this feature is still under development.

Excel Spreadsheet Example

Any CSV or Excel spreadsheet containing metadata for samples in a project can be uploaded through the IRIDA web interface. One of the column in the table must correspond to the sample name within the project. In this example spreadsheet, the NLEP # column is the sample name.

The first step is to select the CSV or Excel file containing the data. Either click on the square label Click or drop Excel/CSV file containing metadata for samples in this project. or drag and drop the file from your file browser.

Select spreadsheet

After uploading a spreadsheet, the column corresponding to the sample name must be selected. After selecting the column header, press the Preview the data button.

Select name column.

Rows that do not match an existing sample name are identified with the New tag. If selected, these samples will automatically be created. Rows that do match an existing sample name will be updated. Only select the rows that are to be uploaded and press the Upload the data button.

Preview Upload

Rows that have an invalid sample name will be highlighted in red. These errors should be fixed within the spreadsheet and re-imported.

Upload Preview Errors

The complete page will be displayed on a successful upload. Clicking on the Upload another file button will redirect to the beginning of a new upload.

Upload Preview Success

Project Metadata Line List

A Metadata Line List is a table that summarizes all metadata associated with samples in a project.

Basic Line List

Sorting Columns

The initial sort is on the Sample Name column in ascending order.

Columns can be sorted by clicking on the column headers and the sort direction is indicated by an arrow next to the label. Multiple columns can be sorted simultaneously by holding down the Shift key while clicking on the column header.

Line List column sorting by clicking on the column headers

Column Filtering

Data within individual columns can be filtered. Hovering the cursor over the column header displays a menu icon that, when clicked, displays filtering options.

Line List column filters

Filters can be set to be:

Up to 2 separate filters can be applied to a column at a time.

Line List column filters

Reorder Columns

To make it easier to see related information, columns can be re-ordered by dragging the the column header to the required position.

Line List Reorder

Toggle Metadata Columns

Some columns might not have information that is useful in a particular analysis. Columns can be toggled on and off in the right hand side panel of the table. If the panel is closed, or needs to be opened, click the Columns button on the right hand side of the table.

Line List Metadata Toggle

Columns can be toggled on and off by selecting the checkbox with the column name in it. If the checkbox is checked, the column will be visible.

Line List Toggle Columns using checkbox

Saving Column Order and Visible Metadata

Updating the column order and which metadata is visible can be saved as a Template so that the next time the line list is viewed the same settings can be applied quickly. Click the Save Template button which will open a dialog window. Add a name for the template (this cannot match the name of another template within the project).

Save Template Dialog

A template can up updated by selecting its name in the dropdown. The checkbox must be selected stating that the existing template will be overwritten.

After a template is created it can me modified or deleted under Project Settings > Sample Metadata Templates

Exporting Data from Metadata Table

Data can be exported as either Excel or CSV formats. Ony the fields currently in the table will be exported.

Hovering over the Export button which will reveal a dropdown where you can select from either Export as Excel or Export as CSV, the download will begin automatically.

Export Buttons

Editing Metadata

Inline Editing

Values within the metadata table can be updated by double clicking on the cell you want to modify, enter the new value and press enter. The new value will be automatically saved. Once a cell has been edited, a notification will display with a “undo” button, that will revert the value back to the original.

Project Sample Metadata

Each sample can contain it’s own metadata. IRIDA uses the terms:

All metadata fields associated with samples in a project can be viewed on the metadata fields page. This is accessed by clicking on the ‘Metadata’ tab within the Project Settings. Once on the Sample Metadata page, you will see a listing of all Metadata Fields associated with samples in this project and their restriction levels:

Image showing sample metadata tan

Metadata Fields have:

Individual Sample Metadata

You can view the metadata for a sample from the Metadata tab of the sample details viewer which can be launched from anywhere the sample is listed by clicking the sample name. Only a user with a project Manager role can add/edit sample metadata.

Sample metadata

Metadata Field Security

Metadata Fields can be restricted at the project level by metadata role. There are 4 restriction levels which can be applied to a field (Level 1, Level 2, Level 3, Level 4 (with Level 4 being the highest restriction level and Level 1 the lowest)). A project Manager has a default metadata role of Level 4 and can view all the project sample metadata. A Collaborator can have any of the metadata roles applied to them and will only be able to view fields with their metadata role and lower.

On the metadata fields page, the project Manager can set the restriction levels for each of the metadata fields associated with the project:

Project sample metadata manager view

For this example we have the Test User set to Collaborator with a metadata role of Level 2:

Image listing the project members

Visiting the line list page, this user will only see the metadata fields which have a restriction level of 2 or below. In this case there are only 4 fields this user can view:

List list collaborator Level 2 metadata role

Visiting the metadata fields page, this user will only be able to see the 4 fields above:

Project sample metadata collaborator view

Metadata Templates

Metadata Templates provide a pre-defined collection and order of metadata fields used for displaying sample metadata on the line list page.

To create a new metadata template (project managers only) select the fields from the metadata fields table and click the “Create Template” button:

Select fields and create a new template

Create a new template dialog

A list of all metadata templates for the project can be viewed by selecting the “Templates” from the menu along the top:

Image displaying metadata template list

Each template listing contains:

Template Details Page

Clicking on a template name will redirect you to the template details page.

Image displaying the metadata template details page

Project manager can edit/update the template name, description and fields on this page. They can also set the template as the default for the project.