velocyto.estimation module¶
-
velocyto.estimation.
colDeltaCor
(emat: numpy.ndarray, dmat: numpy.ndarray, threads: int = None) → numpy.ndarray[source]¶ Calculate the correlation between the displacement (d[:,i]) and the difference between a cell and every other (e - e[:, i])
Parallel cython+OpenMP implemetation
Parameters: - emat (np.ndarray (ngenes, ncells)) – gene expression matrix
- dmat (np.ndarray (ngenes, ncells)) – gene velocity/displacement matrix
- threads (int) – number of parallel threads to use
-
velocyto.estimation.
colDeltaCorpartial
(emat: numpy.ndarray, dmat: numpy.ndarray, ixs: numpy.ndarray, threads: int = None) → numpy.ndarray[source]¶ Calculate the correlation between the displacement (d[:,i]) and the difference between a cell and every other (e - e[:, i])
Parallel cython+OpenMP implemetation
Parameters: - emat (np.ndarray (ngenes, ncells)) – gene expression matrix
- dmat (np.ndarray (ngenes, ncells)) – gene velocity/displacement matrix
- ixs (the neighborhood matrix (ncells, nneighbours)) – ixs[i, k] is the kth neighbour to the cell i
- threads (int) – number of parallel threads to use
-
velocyto.estimation.
colDeltaCorLog10
(emat: numpy.ndarray, dmat: numpy.ndarray, threads: int = None, psc: float = 1.0) → numpy.ndarray[source]¶ Calculate the correlation between the displacement (d[:,i]) and the difference between a cell and every other (e - e[:, i])
Parallel cython+OpenMP implemetation
Parameters: - emat (np.ndarray (ngenes, ncells)) – gene expression matrix
- dmat (np.ndarray (ngenes, ncells)) – gene velocity/displacement matrix
- threads (int) – number of parallel threads to use
-
velocyto.estimation.
colDeltaCorLog10partial
(emat: numpy.ndarray, dmat: numpy.ndarray, ixs: numpy.ndarray, threads: int = None, psc: float = 1.0) → numpy.ndarray[source]¶ Calculate the correlation between the displacement (d[:,i]) and the difference between a cell and every other (e - e[:, i])
Parallel cython+OpenMP implemetation
Parameters: - emat (np.ndarray (ngenes, ncells)) – gene expression matrix
- dmat (np.ndarray (ngenes, ncells)) – gene velocity/displacement matrix
- ixs (the neighborhood matrix (ncells, nneighbours)) – ixs[i, k] is the kth neighbour to the cell i
- threads (int) – number of parallel threads to use
-
velocyto.estimation.
colDeltaCorSqrt
(emat: numpy.ndarray, dmat: numpy.ndarray, threads: int = None, psc: float = 0.0) → numpy.ndarray[source]¶ Calculate the correlation between the displacement (d[:,i]) and the difference between a cell and every other (e - e[:, i])
Parallel cython+OpenMP implemetation
Parameters: - emat (np.ndarray (ngenes, ncells)) – gene expression matrix
- dmat (np.ndarray (ngenes, ncells)) – gene velocity/displacement matrix
- threads (int) – number of parallel threads to use
-
velocyto.estimation.
colDeltaCorSqrtpartial
(emat: numpy.ndarray, dmat: numpy.ndarray, ixs: numpy.ndarray, threads: int = None, psc: float = 0.0) → numpy.ndarray[source]¶ Calculate the correlation between the displacement (d[:,i]) and the difference between a cell and every other (e - e[:, i])
Parallel cython+OpenMP implemetation
Parameters: - emat (np.ndarray (ngenes, ncells)) – gene expression matrix
- dmat (np.ndarray (ngenes, ncells)) – gene velocity/displacement matrix
- ixs (the neighborhood matrix (ncells, nneighbours)) – ixs[i, k] is the kth neighbour to the cell i
- threads (int) – number of parallel threads to use
-
velocyto.estimation.
fit_slope
(Y: numpy.ndarray, X: numpy.ndarray) → numpy.ndarray[source]¶ Loop through the genes and fits the slope
- Y: np.ndarray, shape=(genes, cells)
- the dependent variable (unspliced)
- X: np.ndarray, shape=(genes, cells)
- the independent variable (spliced)
-
velocyto.estimation.
fit_slope_offset
(Y: numpy.ndarray, X: numpy.ndarray, fixperc_q: bool = False) → Tuple[numpy.ndarray, numpy.ndarray][source]¶ Loop through the genes and fits the slope
- Y: np.ndarray, shape=(genes, cells)
- the dependent variable (unspliced)
- X: np.ndarray, shape=(genes, cells)
- the independent variable (spliced)
-
velocyto.estimation.
fit_slope_weighted
(Y: numpy.ndarray, X: numpy.ndarray, W: numpy.ndarray, return_R2: bool = False, limit_gamma: bool = False, bounds: Tuple[float, float] = (0, 20)) → numpy.ndarray[source]¶ Loop through the genes and fits the slope
- Y: np.ndarray, shape=(genes, cells)
- the dependent variable (unspliced)
- X: np.ndarray, shape=(genes, cells)
- the independent variable (spliced)
- W: np.ndarray, shape=(genes, cells)
- the weights that will scale the square residuals
-
velocyto.estimation.
fit_slope_weighted_offset
(Y: numpy.ndarray, X: numpy.ndarray, W: numpy.ndarray, fixperc_q: bool = False, return_R2: bool = True, limit_gamma: bool = False) → Any[source]¶ Loop through the genes and fits the slope
- Y: np.ndarray, shape=(genes, cells)
- the dependent variable (unspliced)
- X: np.ndarray, shape=(genes, cells)
- the independent variable (spliced)
-
velocyto.estimation.
clusters_stats
(U: numpy.ndarray, S: numpy.ndarray, clusters_uid: numpy.ndarray, cluster_ix: numpy.ndarray, size_limit: int = 40) → Tuple[numpy.ndarray, numpy.ndarray][source]¶ Calculate the averages per cluster
If the cluster is too small (size<size_limit) the average of the toal is reported instead