Link Assay Data to Samples

2024-04-18

To create a link between your assay data and the sample that it describes, create a lookup column in the assay design that points to the appropriate Sample Type. Individual assay results can then be mapped to individual samples of that type.

Linking Assay Data to Samples

When creating a lookup column that points to a sample type, you can choose to lookup either the RowID (an integer) or the Name field (a string). In most cases, you should lookup to the Name (String) field, since your assay data probably refers to the string id, not the integer RowID (which is a system generated value). Both fields are guaranteed to be unique within a sample type. When creating a new lookup column, you will see the same table listed twice with different types offered, Integer and String, as shown below.

Choosing the Integer option will create a lookup on the RowId, choosing String will give you a lookup on the Name.

Importing Data Using Lookups

When importing assay data that includes a lookup field, the user will see a dropdown menu for that field allowing them to select the appropriate sample.

Note: if the sample type 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.

Resolve Samples in Multiple Locations

[ Video Overview: Resolving Samples in Other Locations ]

The lookup definition includes the target location. If you select a specific folder, the lookup only matches samples within that folder. If you leave the lookup target as the default location, the search for a match proceeds as follows:

  1. First the current folder is searched for a matching name. If no match:
  2. Look in the parent of the current folder, and if no match there, continue to search up the folder tree to the project level, or whereever the sample type itself is defined. If there is still no match:
  3. Look in the Shared project (but not in any of its subfolders).
Note that while samples from parent/higher folders can be matched to assay data, samples in sibling or child folders will not be resolved.

When you set the schema and table for the lookup, you can either target a specific sample type's query as shown above, or indicate that the server should look across all sample types by targeting the exp.material query.

If multiple matches are found at any step in the search for a match to resolve the lookup, it will be reported to the user as an error.

Related Topics