To create a link between your assay data and its source sample, create a lookup column
in the assay design that points to the source 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.
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:
- First the current folder is searched for a matching name. If no match:
- 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:
- Look in the Shared project (but not in any of its subfolders).
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.