Tools: tl#

Any transformation of the data matrix that is not preprocessing. In contrast to a preprocessing function, a tool usually adds an easily interpretable annotation to the data matrix, which can then be visualized with a corresponding plotting function.

Embeddings#

tl.spectral(adata[, n_comps, features, ...])

Compute a spectral embedding with Laplacian Eigenmaps.

tl.multi_spectral(adatas[, n_comps, ...])

Compute one spectral embedding from multiple modalities.

tl.umap(adata[, n_comps, use_dims, use_rep, ...])

Compute a UMAP embedding from an existing representation.

Clustering#

tl.leiden(adata[, resolution, ...])

Cluster cells with the Leiden community detection algorithm.

tl.kmeans(adata, n_clusters[, n_iterations, ...])

Cluster cells with k-means.

tl.dbscan(adata[, eps, min_samples, ...])

Cluster cells with DBSCAN.

tl.hdbscan(adata[, min_cluster_size, ...])

Cluster cells with HDBSCAN.

Peak calling#

tl.macs3(adata, *[, groupby, qvalue, ...])

Call open chromatin peaks with MACS3.

tl.merge_peaks(peaks, chrom_sizes[, half_width])

Merge group-specific peak calls into a non-overlapping peak set.

Differential analysis#

tl.marker_regions(data, groupby[, pvalue])

Select marker regions for each group by z-score enrichment.

tl.diff_test(data, cell_group1, cell_group2)

Test regions for differential accessibility between two cell groups.

Motif analysis#

tl.motif_enrichment(motifs, regions, ...[, ...])

Test transcription factor motifs for enrichment in region sets.

Network analysis (beta)#

tl.init_network_from_annotation(regions, ...)

Build a region-to-gene network from gene annotations.

tl.add_cor_scores(network, *[, gene_mat, ...])

Add Spearman correlation scores to network edges.

tl.add_regr_scores(network, *[, peak_mat, ...])

Add regression-based importance scores to network edges.

tl.add_tf_binding(network, *, motifs, ...[, ...])

Add motif-to-region edges to a regulatory network.

tl.link_tf_to_gene(network)

Create a transcription-factor-to-gene network.

tl.prune_network(network[, node_filter, ...])

Filter nodes and edges from a network.

Utilities#

tl.aggregate_X(adata[, groupby, normalize, file])

Aggregate .X values across cells or cell groups.

tl.aggregate_cells(adata[, use_rep, ...])

Assign cells to pseudo-cell groups by iterative clustering.