Constructor
new CellLabellingStandalone(annotations)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
annotations |
external:DataFrame | Feature annotations for the dataset. |
Classes
Members
availableReferences :object
- Description:
Available references for each species. Each key is a taxonomy ID and each value is an array of strings containing the names of references for that species.
- Source:
Available references for each species. Each key is a taxonomy ID and each value is an array of strings containing the names of references for that species.
Type:
- object
Methods
computeLabels(x, optionsopt) → {object}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
x |
external:ScranMatrix | external:ScoreMarkersResults | A matrix of (normalized or unnormalized) expression values, with genes in rows and cells/clusters in columns.
Alternatively, an object containing marker results, e.g., as computed by In both cases, the identity of genes should correspond to that in |
||||||||||||
options |
object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
Object containing:
per_reference
: an object where each key is the name of a reference dataset and its value is an array. Each array is of length equal to the number of columns ofx
(if matrix), groups inx
(if marker results), or groups ingroup
. Each entry is an object containingbest
, the name of the best label assigned to a column/group in this reference; andall
, an object where each key is a label in this reference dataset and its value is the score for assigning that label to this column/group.- (optional)
integrated
: an array of length equal to the number of columns/groups. Each entry is an object containingbest
, the name of the best reference for this column/group; andall
, an object where each key is the name of a reference dataset and its value is the score for this column/group. This property is only reported if multiple references are used. - (optional)
groups
: an array of length equal to the number of groups, containing the identity of each group. Only reported if an inputgroup
is supplied andx
is a ScranMatrix.
- Type
- object
fetchParameters() → {object}
- Source:
Returns:
Object containing the parameters.
- Type
- object
(async) ready()
- Description:
This should be called after construction and/or
setParameters
. Users should wait for the return value to resolve before calling any other methods of this class.
- Source:
Returns:
Reference datasets are loaded into memory.
(async) setParameters(parameters)
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
object | Parameter object, equivalent to the Properties
|
Returns:
The object is updated with the new results.
(static) defaults() → {object}
- Source:
Returns:
Default parameters that may be modified and fed into compute
.
- Type
- object
(static) flush()
- Description:
Flush all cached references.
By default, this class will cache the loaded references in a global cache for re-use across CellLabellingStandlone instances. These cached references are not tied to any single instance and will not be removed by garbage collectors or by
free
. Rather, this function should be called to release the relevant memory.
- Source:
(static) setDownload(fun)
- Description:
Specify a function to download references for the cell labelling step.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
fun |
function | Function that accepts a single string containing a URL and returns any value that can be used in the SimpleFile constructor. This is most typically a Uint8Array of that URL's contents, but it can also be a path to a locally cached file on Node.js. |
Returns:
fun
is set as the global downloader for this step.
The previous value of the downloader is returned.