When you import instrument data into LabKey server, assay tools allow you to create a detailed custom map, or assay design, which tells the server how to interpret the often complex information. An assay design can be partially inferred by reading the spreadsheet itself, but rather than simply drop the data into a basic list or table, you might need to make modifications, and might also want to track who generated that spreadsheet, how, and with what instrument settings. Your design would specify what information to gather from an operator at the time of upload, and how best to store both the data and the additional metadata about it.

Create a New Assay Design by Inference

LabKey Server can give you a head start on creating your assay design by inferring column names and types from a sample data file, in this case an Excel spreadsheet.

  • In the Assay List web part, click New Assay Design.
  • On the New Assay Design page, select General.
  • Select the current folder as the Assay Location and click Next.
  • On the General Assay Designer page, in the Name field, enter "GenericAssay".
  • Scroll down to the Data Fields section and click Infer Fields for File.
  • In the pop up dialog, click Choose File. Note that you may have to scroll up in your browser to see the popup.
  • Navigate to the sample files you downloaded and select LabKeyDemoFiles/Assays/Generic/GenericAssay_Run1.xls.
  • In the pop up dialog click Submit.
  • LabKey Server will examine the Excel file and infer a "best guess" assay design. The server then shows you the inferred columns and their data types. In this tutorial, two extraneous data fields are inferred:
  • Delete the inferred fields for "column5" and "column6" by clicking the X to the left of each name.
  • In this case the other inferrals are correct. If needed, you could also change field types and set column properties from this page.

Add Fields to the Assay Design

At this point, we could declare the design finished and save a skeleton design capable of uploading any spreadsheets of the same format. But before we finalize the design, we'll add our own fields, in order to capture information about who was operating the instrument and with what settings.

An assay design is composed of different fields. There are three types of built-in fields:

  • Data Fields: Can be read from the uploaded file.
  • Run Fields: Are specific to a single file and will be populated by the operator for each file, or run, of data.
  • Batch Fields: Apply to groups of runs and are typically populated by the operator once per batch.
For any fields requiring user entry, we can clarify what users are supposed to enter by customizing the description. It is also possible to make user entry more reliable by constraining fields to known sets of values (such as specific machines present in a given lab) and defining data validators and formats to catch common entry errors.

  • Scroll to the section Batch Fields (If you have already saved and reopened this design, the section will include the assay name, i.e. "GenericAssay Batch Fields.")
    • Click Add Field, enter the Name "OperatorEmail".
    • Click Add Field, enter the Name "Instrument", and enter the Description: "The diagnostic test instrument."
  • In the section Run Fields:
    • Click Add Field
    • Enter the Name "InstrumentSetting".
    • Click the Type field, select Integer in the popup and click Apply.
    • Enter the Description: "The configuration settings on the instrument."
  • Click Save & Close.
  • Your new assay design is now saved and ready to use. We can use it to import as many runs as we like from spreadsheets with the same structure. On the Assay Dashboard tab, you will now see GenericAssay on the assay list.

Example

The original Excel spreadsheet looks like this:

The data structure within LabKey Server will look like this after we import the spreadsheet through the assay design in the next step:

Previous Step | Next Step


previousnext
 
expand allcollapse all