RunPcaResults

RunPcaResults

Wrapper for the PCA results on the Wasm heap, typically created by runPca.

Classes

RunPcaResults

Methods

free()

Source:
Returns:

Frees the memory allocated on the Wasm heap for this object. This invalidates this object and all references to it.

numberOfCells() → {number}

Source:
Returns:

Number of cells used to compute these results.

Type
number

numberOfPCs() → {number}

Source:
Returns:

Number of PCs available in these results.

Type
number

principalComponents(optionsopt) → {Float64Array|Float64Wasmarray}

Source:
Parameters:
Name Type Attributes Default Description
options object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
copy boolean <optional>
true

Whether to copy the results from the Wasm heap, see possibleCopy.

Returns:

Array containing the principal components for all cells. This should be treated as a column-major array where the rows are the PCs and columns are the cells.

Type
Float64Array | Float64Wasmarray

rotation(optionsopt) → {Float64Array|Float64Wasmarray}

Source:
Parameters:
Name Type Attributes Default Description
options object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
copy boolean <optional>
true

Whether to copy the results from the Wasm heap, see possibleCopy.

Returns:

Array containing the rotation matrix for all cells. This should be treated as a column-major array where the rows are the genes and the columns are the PCs.

Type
Float64Array | Float64Wasmarray

totalVariance() → {number}

Source:
Returns:

The total variance in the dataset, typically used with varianceExplained to compute the proportion of variance explained.

Type
number

varianceExplained(optionsopt) → {Float64Array|Float64WasmArray}

Source:
Parameters:
Name Type Attributes Default Description
options object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
copy boolean <optional>
true

Whether to copy the results from the Wasm heap, see possibleCopy.

Returns:

Array containing the variance explained for each requested PC.

Type
Float64Array | Float64WasmArray