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 Type 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 Type, 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.

NameDataInputs/DataClassADataInputs/DataClassB
sample-1data-parent1,data-parent2data-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.

NameDataInputs/DataClassADataInputs/DataClassB
protein-1data-parent1,data-parent2data-parent3
protein-2protein-1 
protein-3protein-1 
protein-4protein-1 

For information on Sample Type and DataClass parentage relationships, see Parent Samples: Derivation and Lineage.

DataClass Member Naming

Choose one of these ways to assign names to the members of your data class:

  1. Include a Name column in your uploaded data to provide a unique name for each row.
  2. Provide a Name Expression when a DataClass is created. This will generate names for you.

Name Expressions

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).

FOO-${genid}-${barcode}

Use name expressions to generate a descriptive id, guaranteed to be unique, for the row.

Learn more about naming patterns in this topic: Sample Naming Patterns

Aliases

You can specify alias names for members of 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"]
}]
});

Related Topics

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all