tacco.utilsΒΆ
General utility functions
Functions
Query the columns of .obs of an |
|
Bins points in position space. |
|
Calclulate a dense pairwise distance matrix of sparse and dense inputs. |
|
Rescales columns of dense or sparse matrix inplace. |
|
Similar to |
|
Converts a sparse matrix in coo format into a sparse matrix in csr format consuming less memory than working in-memory by using hard disc buffer. |
|
Converts a sparse matrix in coo format into a sparse matrix in csr format without allocating huge temporaries by reusing the memory of the input coo matrix. |
|
Return the number of available CPU cores. |
|
Calclulate a dense pairwise euclidean distance matrix of dense inputs. |
|
Calculates division out = a / b. |
|
Finds an unused key. |
|
Perform Fisher's exact test. |
|
Given a condensed mapping construct a flat inverse mapping. |
|
Perform a matrix-matrix multiplication A @ B.T for arbitrary sparseness of A and B in parallel. |
|
Creates symmetric pairwise mixture profiles. |
|
Get average profiles for a certain annotation from a reference |
|
Find the approximations of intervals with equal number of points in each interval which keep a specified minimum separation between them. |
|
Get the first principal axis of a set of points. |
|
Turns a soft annotation into a categorical annotation by reporting the annotation categories with the maximum values per oberservation. |
|
Calculates the sum of a sparse matrix or array-like in a specified axis and returns a flattened result. |
|
Create collision-free hash of several categorical columns by lexicograhical indexing. |
|
Sorts an array in-place while following the reordering of the elements in two other arrays. |
|
Calculates log inplace and in parallel. |
|
Calculates log1p inplace and in parallel. |
|
Perform Mann-Whitney-U test. |
|
Merges annotation into coarser groups, e.g. from subtypes to types. |
|
Merges a dict-like of colors into coarser colors. |
|
Gives the smallest signed integer dtype which is necessary to represent maximum. |
|
Calculates the most frequent value per row in a dataframe. |
|
Runs multiple nnls in parallel. |
|
Preprocess single cell data in a standardized way from bare counts as input. |
|
Calculate pairwise normalized projections of sparse and dense inputs. |
|
Rescales rows of dense or sparse matrix inplace. |
|
Scales the count matrix in an |
|
Solve optimal transport problem with entropy regularization and optionally Kullback-Leibler divergence penalty terms instead of exact marginal conservation. |
|
Calclulate a sparse pairwise distance matrix of dense inputs. |
|
Perform a dense matrix-matrix multiplication A @ B.T for the case when only a sparse subset of the result is needed. |
|
Splits a dataset into spatial patches balancing the number of observations per split. |
|
Splits a dataset into separated spatial patches. |
|
Calculates sqrt inplace and in parallel. |
|
Perform Student's t test. |
|
Preprocess single cell data in a standardized way from bare counts as input and include the generation of a tsne embedding. |
|
Preprocess single cell data in a standardized way from bare counts as input and include the generation of a umap embedding. |
|
Perform Welch's t test. |
|
Write only .X, .obs, and .var to an .h5ad file. |