cospar.pp.get_X_clone¶
-
cospar.pp.
get_X_clone
(adata, clone_data_cell_id, clone_data_barcode_id, reference_cell_id=None, reference_clone_id=None)¶ Build the X_clone matrix from data.
Convert the raw clonal data table (long format): [clone_data_cell_id,clone_data_barcode_id] to X_clone (wide format) based on the unique cell id ordering in adata
- Parameters
- adata :
AnnData
object We assume that adata.obs_names have been initialized.
- clone_data_cell_id : list
The list of cell id for each corresponding sequenced barcode.
- clone_data_barcode_id : list
The list of barcode id from sequencing. It has the same shape as clone_data_cell_id.
- reference_cell_id : list, optional (default: None)
A list of uniuqe cell id. X_clone will be generated based on its cell id ordering. This has to be provided to match the cell ordering in the adata object.
- reference_clone_id : list, optional (default: None)
A list of uniuqe clone id. If provided, X_clone will be generated based on its barcode ordering.
- adata :
- Returns
Update adata.obsm[‘X_clone’] (sp.spmatrix)