When creating new Samples, the Add > Import from File option (or the Import Samples From File tab) lets you upload a spreadsheet of sample data, streamlining the process over entering data into a grid. You can also update data for existing samples via Edit > Update from File.
Note that fields of type File are not included in file import methods. Values must be individually added as described in this topic: Attach Images and Other Files.

Obtain File Import Template

An import template shows all the expected columns for your data structure, making it easier to ensure your imported data will conform to system expectations. Templates are available for Sample Types, Source Types, and Assays from the main dashboard for the type of structure.

From the main menu, select the target Sample Type. Click the Template button to download the template for this type of sample.

  • Use this template as a guide for ensuring your data matches the expected columns.
  • Note that any "File" fields will be omitted from the downloaded template.
  • When populating the template, you may not need to include all columns. For example, if you have defined import aliases for sources or parents, all possible columns will be included in the template, but you only need to include the ones you want to use.

Import Samples From File

You can start from the overview page for your sample type and select Add > Import from File.

  • Set the Sample Type for the Samples you will import (if it is not already selected).
  • Use the Template button if you didn't already download a template file for your data.
  • Drag and Drop the file directly into the window to upload it.
    • You will see the sample information obtained from the file in the panel.
    • Only fields included in the definition of the Sample Type will be imported. In this example, the Sample ID will be generated for you, so is not included in the imported file or shown here. If any fields are unrecognized, they will be ignored and a banner will be shown.
    • Note that you cannot edit the values here. If you see an error, you can use the X to delete the loaded file, make changes offline, and reselect the revised file.
  • Click Import to create the samples from the data in the file.
You will see the sample grid for that type, with a banner message indicating how many were created and offering actions for working with them.

Additional examples and details are available here:

Update Existing Samples

To update existing samples, or merge a combined spreadsheet of new and existing samples, select Edit > Update from File. The update page is very similar to the Import from File page.

  • Any data you provide for the rows representing samples that already exist will replace the previous values.
    • When updating, you only need to provide the columns you wish to update. Existing data for other columns will be left as is.
    • Note that you cannot update an existing sample to make it an aliquot of another sample.
Just as for importing new samples from file, you can make use of import templates to know which fields you want to update. You might start from an existing grid of samples, make adjustments offline and/or add new samples to it, and then Edit > Update from File by first downloading the update template, merging your data to fit, then importing.

A common scenario for using "update" for samples is to add storage information for a group of samples that are already registered in the system. Learn more in this topic: Migrate Storage Data into LabKey

Merge by Allowing New Samples

The Allow new samples checkbox controls whether you will be able to merge the incoming file or simply update existing rows.

  • When unchecked, the default, the update will fail if rows are included that do not match existing samples already in the system.
  • When checked, any rows for samples that do not yet exist will add them as new samples.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all