API

Import SINFONIA:

import sinfonia

statistics

statistics.spatially_variable_genes(adata[, ...])

Identify spatially variable genes by SINFONIA.

utils

utils.setup_seed(seed)

Set random seed.

utils.get_N_clusters(adata, n_cluster[, ...])

Tune the resolution parameter in clustering to make the number of clusters and the specified number as close as possible.

metrics

metrics.clustering_metrics(adata, target, pred)

Evaluate clustering performance.

metrics.mean_average_precision(embedding, labels)

Evaluate mean average precision.

metrics.mean_cross_validation_accuracy(...)

Evaluate mean cross-validation accuracy.