Dna.run_umap#

Dna.run_umap(attribute: Union[str, numpy.ndarray], output_label: str = 'umap', jitter: float = 0.1, **kwargs: Any) None#

Extends _Assay.run_umap()

Sets the default values for the dna UMAP. n_neighbors=50, metric=’euclidean’, min_dist=0 Also adds jitter for the NGT layer.

For DNA, if metric=”nan-l2” then -50 in the attribute is converted to NaN. This enables passing AF_FILTERED, and AF_MISSING without converting the data to include NaNs.

Perform UMAP on the given data.

Adds output_label to the row attributes.

metric=”nan-l2” is also accepted. In that case, the distance metric passed to UMAP calculates the L2-norm between cells ignoring NaN values.

Parameters
attributestr

The attribute to be used for UMAP. Uses :met:`_Assay.get_attribute` to retrieve the values constrained by row.

output_labelstr, default UMAP_LABEL

The name of the row attribute where the UMAP output is.

kwargsdictionary

Passed to UMAP.

Raises
ValueError

When both layer and attribute are provided. Only one is permitted at a time.