pyrovelocity.analysis#
analyze#
cytotrace#
- pyrovelocity.analysis.cytotrace.compute_gcs(mat, count, top_n_genes=200)[source]#
Compute gene set enrichment scores by correlating gene count and gene expression
- Parameters:
mat (ndarray) – Matrix of shape (n_genes, n_cells)
count (ndarray) – Gene count
top_n_genes (int, optional) – Number of genes to select. Defaults to 200.
- Return type:
ndarray
- pyrovelocity.analysis.cytotrace.compute_similarity1(A)[source]#
Compute pairwise correlation of all columns in matrices A
adapted from https://github.com/ikizhvatov/efficient-columnwise-correlation/blob/master/columnwise_corrcoef_perf.py
- Parameters:
A (ndarray) – matrix of shape (n, t)
- Returns:
correlation matrix of shape (t, t)
- Return type:
ndarray
- pyrovelocity.analysis.cytotrace.compute_similarity2(O, P)[source]#
Compute pearson correlation between two matrices O and P.
- Parameters:
O (ndarray) – matrix of shape (n, t)
P (ndarray) – matrix of shape (n, m)
- Returns:
correlation matrix of shape (t, m)
- Return type:
ndarray
- pyrovelocity.analysis.cytotrace.cytotrace_sparse(adata, layer='raw', cell_count=20, top_n_features=200, skip_regress=False)[source]#
optimized version
- Return type:
dict
[str
,ndarray
]
- pyrovelocity.analysis.cytotrace.diffused(markov, gcs, ALPHA=0.9)[source]#
Compute diffused gene set enrichment scores
- Parameters:
markov (ndarray) – Markov state transition matrix
gcs (ndarray) – gene set enrichment scores
ALPHA (float, optional) – Defaults to 0.9.
- Returns:
_description_
- Return type:
ndarray