cospar.pp.initialize_adata_object¶
-
cospar.pp.
initialize_adata_object
(adata=None, X_state=None, cell_names=None, gene_names=None, time_info=None, X_clone=None, X_pca=None, X_emb=None, state_info=None, data_des='cospar')¶ Initialized the
AnnData
object.The principal components (X_pca), 2-d embedding (X_emb), and state_info can be provided upfront, or generated in the next step. The clonal information (X_clone) is also optional.
- Parameters
- adata :
AnnData
object - X_state : np.ndarray or sp.spmatrix, optional (default: None)
The count matrix for state information. Rows correspond to cells and columns to genes. If adata is provided, this is not necessary.
- cell_names : np.ndarray, optional (default: None)
An array of cell ids. If adata is provided, this is not necessary.
- gene_names : np.ndarray, optional (default: None)
An array of gene names. If adata is provided, this is not necessary.
- time_info : np.ndarray
Time annotation for each cell in str,like ‘Day27’ or ‘D27’. However, it can also contain other sample_info, like ‘GFP+_day27’, and ‘GFP-_day27’.
- X_clone : sp.spmatrix or np.ndarray, optional (default: None)
The clonal data matrix, with the row in cell id, and column in barcode id. For evolvable barcoding, a cell may carry several different barcode id. Currently, we assume each entry is 0 or 1.
- X_pca : np.ndarray, optional (default: None)
A matrix of the shape n_cell*n_pct. Used for computing similarity matrices.
- X_emb : np.ndarray, optional (default: None)
Two-dimensional matrix for embedding.
- state_info : np.ndarray, optional (default: None)
The classification and annotation for each cell state. This will be used only after the map is created. Can be adjusted later.
- data_des : str, optional (default:’cospar’)
This is just a name to label/distinguish this data. Will be used for saving the results. It should be a unique name for a new dataset stored in the same folder to avoid conflicts.
- adata :
- Returns
Generate an
AnnData
object with the following entriesadata.var_names (gene names)
adata.obs_names (cell IDs)
obs (‘time_info’, ‘state_info’)
uns (‘data_des’, ‘clonal_time_points’, ‘time_ordering’)
obsm (‘X_clone’, ‘X_pca’, ‘X_emb’)