The Exp.Run class describes an experiment run. An experiment run is an application of an experimental protocol to concrete inputs, producing concrete outputs. In object-oriented terminology, a protocol would be a class while a run would be an instance. For more information see additional documentation.

var result = // ... result of uploading a new assay results file
var data = new LABKEY.Exp.Data(result);

var run = new LABKEY.Exp.Run();
run.name = data.name;
run.properties = { "MyRunProperty" : 3 };
run.dataInputs = [ data ];

data.getContent({
format: 'jsonTSV',
success: function (content, format) {
data.content = content;
var sheet = content.sheets[0];
var filedata = sheet.data;

// transform the file content into the dataRows array used by the run
run.dataRows = [];
for (var i = 1; i < filedata.length; i++) {
var row = filedata[i];
run.dataRows.push({
"SampleId": row[0],
"DataValue": row[1],
// ... other columns
});
}

var batch = // ... the LABKEY.Exp.RunGroup object
batch.runs.push(run);
},
failure: function (error, format) {
alert("error: " + error);
}
});

Hierarchy (view full)

Constructors

Properties

comment: string

User editable comment.

created: Date

The person who created the ExpObject.

createdBy: string

The person who created the ExpObject.

dataInputs: Data[]

Array of Data objects that are the inputs to this run. Datas typically represents a file on the server's file system.

dataOutputs: Data[]

Array of Data objects that are the outputs from this run. Datas typically represent a file on the server's file system.

dataRows: any[]

Array of Objects where each Object corresponds to a row in the results domain.

experiments: any
filePathRoot: string
id: number

The id of the ExpObject

lsid: string

The LSID of the ExpObject

materialInputs: Material[]
materialOutputs: Material[]
modified: Date

When the ExpObject was last modified.

modifiedBy: string

The person who last modified the ExpObject.

name: string

The name of the ExpObject

objectProperties: any
properties: Record<string, any>

Map of property descriptor names to values. Most types, such as strings and numbers, are just stored as simple properties. Properties of type FileLink will be returned by the server in the same format as Data objects (missing many properties such as id and createdBy if they exist on disk but have no row with metadata in the database). FileLink values are accepted from the client in the same way, or a simple value of the following three types: the data's RowId, the data's LSID, or the full path on the server's file system.

protocol: any
rowId: number

The id of the ExpObject (alias of id property)

Methods