Classes
Methods
addSelection(id, selection, optionsopt)
- Description:
Add a custom selection and compute its markers. It is assumed that
runAnalysis
was already run on this instance before calling this method.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
string | A unique identifier for the new custom selection. |
|||||||||||
selection |
Array | TypedArray | The indices of the cells in the selection. Indices should refer to positions of cells in the QC-filtered matrix, not the original matrix. |
|||||||||||
options |
object |
<optional> |
Optional parameters. Properties
|
Returns:
The custom selection is added to the state and calculation of its markers is performed. Nothing is returned.
compute(parameters)
- Source:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
object | Parameter object, equivalent to the Properties
|
Returns:
The state is updated by removing stale selections if the QC filter was altered.
computeVersus(left, right) → {object}
- Description:
Extract markers for a pairwise comparison between two selections for more detailed examination of the differences between them.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
left |
string | Identifier of one selection in which to find upregulated markers. |
right |
string | Identifier of another selection to be compared against |
Returns:
Object containing:
results
: object containing the marker statistics for the comparison between two clusters. Each key is a modality name and each value is a ScoreMarkersResults object.left
: index of the group corresponding to theleft
selection in each ScoreMarkersResults object. e.g., Cohen's d for the RNA markers of theleft
selection are defined asoutput.results.RNA.cohen(output.left)
.right
: index of the group corresponding to theright
selection in each ScoreMarkersResults object. e.g., Cohen's d for the RNA markers of theright
selection are defined asoutput.results.RNA.cohen(output.right)
.
- Type
- object
fetchParameters() → {object}
- Source:
Returns:
Object containing the parameters.
- Type
- object
fetchResults(id) → {object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An identifier for the desired selection. |
Returns:
Object containing the markers for the desired selection. Each key is a modality name while each value is a ScoreMarkersResults object, containing the marker detection results across all features of the corresponding modality. The set of cells in the selection is denoted as group 1, while all cells outside of the selection are denoted as group 0.
- Type
- object
fetchSelectionIndices(id, optionsopt) → {Array|TypedArray}
- Description:
Retrieve the indices for a selection of interest.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
string | The identifier for the selection. |
|||||||||||
options |
object |
<optional> |
Optional parameters. Properties
|
Returns:
Array of indices in the requested selection.
Note that indices are relative to the filtered matrix -
use CellFilteringState.undoFiltering
to convert them to indices on the original dataset.
- Type
- Array | TypedArray
fetchSelections(optionsopt, forceopt, nullable) → {object}
- Description:
Retrieve indices for all selections.
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Optional parameters. Properties
|
|||||||||||
force |
string |
<optional> <nullable> |
null
|
Whether to force each |
Returns:
Object where the keys are the selection names and the values are arrays of indices for each selection.
Each array is a copy and can be modified without affecting the CustomSelectionsState.
See fetchSelectionIndices
for more details on the interpretation of the indices.
- Type
- object
free()
- Description:
Frees all resources associated with this instance.
- Source:
removeSelection(id)
- Description:
Remove a custom selection and its results from the state.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An identifier for the selection to be removed. |
Returns:
The specified selection and its results are removed from the state. Nothing is returned.
(static) defaults() → {object}
- Source:
Returns:
Default parameters that may be modified and fed into compute
.
- Type
- object