Namespace LABKEY.Experiment
The Experiment static class allows you to create hidden run groups and other experiment-related functionality.
Additional Documentation:
Defined in: Experiment.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
LABKEY.Experiment.createHiddenRunGroup(config)
Create or recycle an existing run group.
|
<static> |
LABKEY.Experiment.lineage(config)
Get parent/child relationships of an ExpData or ExpMaterial.
|
<static> |
LABKEY.Experiment.loadBatch(config)
Loads a batch from the server.
|
<static> |
LABKEY.Experiment.loadBatches(config)
Loads batches from the server.
|
<static> |
LABKEY.Experiment.saveBatch(config)
Saves a modified batch.
|
<static> |
LABKEY.Experiment.saveBatches(config)
Saves an array of modified batches.
|
<static> |
LABKEY.Experiment.saveMaterials(config)
Saves materials.
|
Method Detail
<static>
LABKEY.Experiment.createHiddenRunGroup(config)
Create or recycle an existing run group. Run groups are the basis for some operations, like comparing
MS2 runs to one another.
- Parameters:
- config
- A configuration object with the following properties:
- {function} config.success
- A reference to a function to call with the API results. This
function will be passed the following parameters:
- runGroup: a LABKEY.Exp.RunGroup object containing properties about the run group
- response: The XMLHttpResponse object
- {Integer[]} config.runIds Optional
- An array of integer ids for the runs to be members of the group. Either runIds or selectionKey must be specified.
- {string} config.selectionKey Optional
- The DataRegion's selectionKey to be used to resolve the runs to be members of the group. Either runIds or selectionKey must be specified.
- {function} config.failure Optional
- A reference to a function to call when an error occurs. This
function will be passed the following parameters:
- errorInfo: an object containing detailed error information (may be null)
- response: The XMLHttpResponse object
- {string} config.containerPath Optional
- An alternate container path to get permissions from. If not specified, the current container path will be used.
- {object} config.scope Optional
- A scoping object for the success and error callback functions (default to this).
<static>
LABKEY.Experiment.lineage(config)
Get parent/child relationships of an ExpData or ExpMaterial.
- Parameters:
- config
- config.rowId
- The row id of the seed ExpData or ExpMaterial. Either rowId or lsid is required.
- config.lsid
- The LSID of the seed ExpData or ExpMaterial. Either rowId or lsid is required.
- {Number} config.depth Optional
- An optional depth argument. Defaults to include all.
- {Boolean} config.parents Optional
- Include parents in the lineage response. Defaults to true.
- {Boolean} config.children Optional
- Include children in the lineage response. Defaults to true.
- {String} config.expType Optional
- Optional experiment type to filter response -- either "Data", "Material", or "ExperimentRun". Defaults to include all.
- {String} config.cpasType Optional
- Optional LSID of a SampleSet or DataClass to filter the response. Defaults to include all.
<static>
LABKEY.Experiment.loadBatch(config)
Loads a batch from the server.
- Parameters:
- config
- An object that contains the following configuration parameters
- {Number} config.assayId
- The assay protocol id.
- {Number} config.batchId
- The batch id.
- {function} config.success
- The function to call when the function finishes successfully.
This function will be called with a the parameters:
- batch A new LABKEY.Exp.RunGroup object.
- response The original response
- {function} config.failure Optional
- The function to call if this function encounters an error.
This function will be called with the following parameters:
- response The original response
- {object} config.scope Optional
- A scoping object for the success and error callback functions (default to this).
- See:
- The Module Assay documentation for more information.
<static>
LABKEY.Experiment.loadBatches(config)
Loads batches from the server.
- Parameters:
- config
- An object that contains the following configuration parameters
- {Number} config.assayId
- The assay protocol id.
- {Number} config.batchIds
- The list of batch ids.
- {function} config.success
- The function to call when the function finishes successfully.
This function will be called with a the parameters:
- batches The list of LABKEY.Exp.RunGroup objects.
- response The original response
- {function} config.failure Optional
- The function to call if this function encounters an error.
This function will be called with the following parameters:
- response The original response
- {object} config.scope Optional
- A scoping object for the success and error callback functions (default to this).
- See:
- The Module Assay documentation for more information.
<static>
LABKEY.Experiment.saveBatch(config)
Saves a modified batch.
Runs within the batch may refer to existing data and material objects, either inputs or outputs, by ID or LSID.
Runs may also define new data and materials objects by not specifying an ID or LSID in their properties.
- Parameters:
- config
- An object that contains the following configuration parameters
- {Number} config.assayId Optional
- Optional assay protocol id, either assayId or protocolName must be specified.
- {String} config.protocolName Optional
- Optional protocol name to be used for non-assay backed runs. Currently only SAMPLE_DERIVATION_PROTOCOL is supported.
- {LABKEY.Exp.RunGroup} config.batch
- The modified batch object.
- {function} config.success
- The function to call when the function finishes successfully.
This function will be called with the following parameters:
- batch A new LABKEY.Exp.RunGroup object. Some values (such as IDs and LSIDs) will be filled in by the server.
- response The original response
- {function} config.failure Optional
- The function to call if this function encounters an error.
This function will be called with the following parameters:
- response The original response
- See:
- The Module Assay documentation for more information.
<static>
LABKEY.Experiment.saveBatches(config)
Saves an array of modified batches.
Runs within the batches may refer to existing data and material objects, either inputs or outputs, by ID or LSID.
Runs may also define new data and materials objects by not specifying an ID or LSID in their properties.
- Parameters:
- config
- An object that contains the following configuration parameters
- {Number} config.assayId
- The assay protocol id.
- {LABKEY.Exp.RunGroup[]} config.batches
- The modified batch objects.
- {function} config.success
- The function to call when the function finishes successfully.
This function will be called with the following parameters:
- batches An array of new LABKEY.Exp.RunGroup objects. Some values (such as IDs and LSIDs) will be filled in by the server.
- response The original response
- {function} config.failure Optional
- The function to call if this function encounters an error.
This function will be called with the following parameters:
- response The original response
- See:
- The Module Assay documentation for more information.
<static>
LABKEY.Experiment.saveMaterials(config)
Saves materials.
- Parameters:
- config
- An object that contains the following configuration parameters
- config.name
- name of the sample set
- config.materials
- An array of LABKEY.Exp.Material objects to be saved.
- {function} config.success
- The function to call when the function finishes successfully.
This function will be called with the following parameters:
- batch A new LABKEY.Exp.RunGroup object. Some values will be filled in by the server.
- response The original response
- {function} config.failure Optional
- The function to call if this function encounters an error.
This function will be called with the following parameters:
- response The original response
- {object} config.scope Optional
- A scoping object for the success and error callback functions (default to this).
- Deprecated:
- Use LABKEY.Query.insertRows({schemaName: 'Samples', queryName: '<sample set name>', ...});