DataClasses are used to represent virtual entity definitions that can be customized and defined by administrators. For example, an administrator might define DataClasses to represent entities such as Protein Sequences, Nucleotide Sequences, Cells Lines, and Expression Systems. Members of a DataClass can be connected to physical samples using LabKey's existing experiment framework. For example, a Sample Set may be derived from an Expression System DataClass, which in turn is derived from Cell Line and Vector DataClasses. See
LabKey Data Structures.
DataClass Lineage & Derivation
DataClasses support the concept of parentage/lineage. When importing data into a Sample Set, to indicate a DataClass parent, provide a column named "DataInputs/<NameOfDataClass>", where <NameOfDataClass> is some DataClass. Values entered under this column indicate the parent the sample is derived from. You can enter multiple parent values separated by commas. For example to indicate that sample-1 has three parents, two in DataClassA, and one in DataClassB import the following.
Name | DataInputs/DataClassA | DataInputs/DataClassB |
---|
sample-1 | data-parent1,data-parent2 | data-parent3 |
DataClasses can be linked to one another by parentage lineage using the same syntax. For example, a parent protein may produce many children proteins by some bio-engineering process. Use DataClasses to capture the parent protein and the children proteins.
Name | DataInputs/DataClassA | DataInputs/DataClassB |
---|
protein-1 | data-parent1,data-parent2 | data-parent3 |
protein-2 | protein-1 | |
protein-3 | protein-1 | |
protein-4 | protein-1 | |
For information on Sample Set and DataClass parentage relationships, see
Parent Samples: Derivation and Lineage.
Name Expressions
You can specify a name expression when a DataClass is created. The name expression can be concatenated from (1) fixed strings, (2) an auto-incrementing integer indicated by ${genid}, and (3) values from other columns in the DataClass. The following name expression is concatenated from three parts: "FOO" (a fixed string value), "${genid}" (an auto-incrementing integer), and ${barcode} (the value from the barcode column).
Use name expressions to generate a descriptive id, guaranteed to be unique, for the row.
See
Samples: Name Expressions for more information.
Aliases
You can specify aliases names for records in a DataClass. On import, you can select one or more alias names. These aliases are intended to be used as "friendly" names, or tags; they aren't intended to be an alternative set of unique names. You can import a set of available aliases only via the client API. No graphical UI is currently available.
LABKEY.Query.insertRows({
schemaName: "exp.data",
queryName: "myQuery",
rows: [{
barcode: "barcodenum",
alias: ["a", "b", "c", "d"]
}]
});
DataClass User Interface
The web part "DataClasses" displays a list of the DataClasses in the current folder.
To create a new DataClass, click
(Insert New Row).
You can create a DataClass from scratch or from a
domain templateCreating a DataClass from scratch, you are presented with four fields:
- Name: Required.
- Description: Optional.
- Name Expression: Optional. Specify an alternative naming system, concatenated from fixed strings, auto-incrementing integers, and column values. See above for details.
- Material Source ID: Optional. The default Sample Set where new samples will be created.
After clicking
Create, use the Field Editor to add fields (columns) and set their properties. For details, see
Field Editor.
Related Topics