cospar.hf.get_X_clone_with_reference_ordering¶
-
cospar.hf.
get_X_clone_with_reference_ordering
(clone_data_cell_id, clone_data_barcode_id, reference_cell_id=None, reference_clone_id=None, drop_duplicates=True, count_value=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 reference_cell_id.
- Parameters
- 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
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.
- count_value : list, optional (default: None)
A list of count values corresponding to clone_data_cell_id. If not set, it is default to 1.
- Returns
X_clone (ssp.sparse) – The clonal data matrix, with the row in cell id, and column in barcode id.
reference_clone_id (list)