LabKey's assay framework helps you to share experimental data and metadata with collaborators. It can be a powerful tool for aggregating data across multiple labs and for making decisions on a course of research based on what others are finding. But how can you record data in a way that makes it easily comparable across labs? When different groups use slightly different words for the same thing, how can you ensure that data are entered consistently? How can you guard against the inevitable typo, or entry of the wrong information into the wrong field?

This page introduces a few of the ways LabKey Server can help your team improve consistency and reduce user error during initial data entry:

Use Lookups to Constrain Input

When users upload assay data, they often need to enter information about the data and might use different names for the same thing. For instance, one user might enter "ABI-Qstar" and another simply "Qstar" for the same machine. By defining a lookup for an assay field, you can eliminate this confusion by only allowing a pre-set vocabulary of options for that field.

In this scenario, we want users to choose from a dropdown list of instruments, rather than name them instrument themselves when they upload a run. We modify the assay design to constrain the instrument field to only values available on a given list. The example "Cell Culture" design used here comes from the design a general purpose assay tutorial, so if you have completed that tutorial you may follow these steps yourself.

Note: adding a lookup does more than assist with data entry consistency and standardization. Lookup fields also provide a link between two tables, making it possible to create data grids that combine columns from the two tables.

Define Lookup Vocabulary

First you need to create the list from which you want dropdown values to be chosen.

  • Download this file: Instruments.xls
  • Select (Admin) > Manage Lists.
  • Click Create New List.
  • Enter Name: "Lab Instruments"
  • Click the Fields section to open it.
  • Drag and drop the "Instruments.xls" file into the target area.
  • Once the fields are inferred, select "InstrumentID" from the Key Field Name dropdown in the blue panel.
  • Scroll down and confirm that the Import Data slider is selected and shows three rows of your data file.
  • Scroll down and click Save.

You can click the name Lab Instruments to see the list of options that will be presented by the lookup.

Add Lookup to Assay Design

Change the assay design so that the instruments field no longer asks for open user entry, but is a lookup dropdown instead:

  • Select (Admin) > Manage Assays.
  • Click Cell Culture.
  • Select Manage Assay Design > Edit assay design.
  • Click the Batch Fields section to open it.
  • Click Add Field and enter the Name: "Instrument".
  • Use the Data Type dropdown menu to select Lookup.
  • The panel will open, so you can enter the Lookup Definition Options:
    • Target Folder: [current folder]
    • Target Schema: lists
    • Target Table: Instruments (String)
  • Check the box for Ensure Value Exists in Lookup Target to require that the selected value is present in the lookup's target table or query.
  • Scroll down and click Save.

Usage Demonstration

If you have now made these changes in your tutorial project, you can see how it will work by starting to import an additional run:

  • On the Cell Culture Runs page:
  • Click Import Data.
  • On the Batch Properties page notice the new Instruments field is a dropdown list.

Note: if the lookup target contains 10,000 rows or more, the lookup will not be rendered as a dropdown, but as a text entry panel instead.

The system will attempt to resolve the text input value against the lookup target's primary key column or display value. For matching values, this will result in the same import behavior as if it were selected via dropdown menu.

Set Default Values

When the user must enter the same fixed values repeatedly, or you want to allow prior entries to become new defaults for given fields, you can do so using built in default values for fields. Default values may be scoped to a specific folder or subfolder, which can be useful in a situation where an assay design is defined at the project level, the overall design can be shared among many subfolders, each of which may have different default value requirements.

More Data Validation Options

Field level validation can programmatically ensure that specific fields are required, entries follow given regular expressions, or are within valid ranges.

Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all