pseudodynamics.reader.HigDim_AnnDS¶
- class pseudodynamics.reader.HigDim_AnnDS(AnnData, cellstate_key='cellstate', timepoint_key='timepoint_tx_days', timepoint_idx=None, n_dimension=5, knn_volume=False, nearby_cellstate=1, norm_time=False, deltax_key=None, density_funs=None, kde_kws={}, base_cellstate=None, pop_dict=None, n_grid=300, collocation_points=600, log_transform=False, resampling_indensity=0.5, resampling_rate=0.5)[source]¶
Bases:
AnnDatasetHigh Dimensional Cell state Dataset for trajectory indepdent modeling
- Parameters:
n_repeat (int) – the output file path from script
nearby_cellstate (int) – the number of near (cell state)
norm_Time (boolen) – log-normalize the real timepoint
AnnData (annData,) – the single cell object
cellstate_key (str) – the obsm key, the lower dimension representation on which we will use to compute density
timepoint_key (str) – the obs key that indicate the experimental time the cells are collected from
pop_dict (dict) – the dictionary we use to pass population statistics including collected timepoint, mean ,variation
log_transform (bool) – default False, whether the population size will be log transformed to reduce the magnitude of the data
base_cellstate (np.ndarray) – the space to evaluate the density
- compute_density(density_funs=None)[source]¶
compute the density for the self.cellstate, if density functions not specified then we use the gaussian kde
- Returns:
self.u_b : Tensor, flatten, (n_time * n_cell) self.t_b : Tensor, flatten, (n_time * n_cell) self.density_funs : list of callable, [n_time] self.density_P : ndarray, average the total density into probability summing to 1 self.s_std : the std of self.cellsate
Methods table¶
|
compute the density for the self.cellstate, if density functions not specified then we use the gaussian kde |
|
Compute the volume of each cell from KNN distances, assume the inner dimension is 2 and the min distance to represent radius |
|
sample meshes by the time-averaged density distribution |
Methods¶
- HigDim_AnnDS.compute_density(density_funs=None)[source]¶
compute the density for the self.cellstate, if density functions not specified then we use the gaussian kde
- Returns:
self.u_b : Tensor, flatten, (n_time * n_cell) self.t_b : Tensor, flatten, (n_time * n_cell) self.density_funs : list of callable, [n_time] self.density_P : ndarray, average the total density into probability summing to 1 self.s_std : the std of self.cellsate