omicverse.bulk2single.BulkTrajBlend

omicverse.bulk2single.BulkTrajBlend(bulk_seq: DataFrame, single_seq: AnnData, celltype_key: str, bulk_group: Any | None = None, max_single_cells: int = 5000, top_marker_num: int = 500, ratio_num: int = 1, gpu: int | str = 0) None[source]

Integrate bulk and single-cell information to infer transitional cell-state trajectories.

Parameters:
  • bulk_seq (pd.DataFrame) – Bulk expression matrix with genes in rows and samples in columns.

  • single_seq (anndata.AnnData) – Reference single-cell dataset used to define cell identities.

  • celltype_key (str) – Column name in single_seq.obs containing cell-type labels.

  • bulk_group (Optional[Any]) – Optional grouping key/list for averaging bulk replicates.

  • max_single_cells (int) – Maximum number of reference cells retained for model fitting.

  • top_marker_num (int) – Number of top marker genes used in Bulk2Single preparation.

  • ratio_num (int) – Ratio controlling generated cell numbers per cell type.

  • gpu (Union[int,str]) – Compute device specification (CUDA index, 'mps', or CPU fallback).

Returns:

Initializes bulk-trajectory blending workflow.

Return type:

None

Examples

>>> bulktb = ov.bulk2single.BulkTrajBlend(bulk_seq=bulk, single_seq=adata, celltype_key="celltype")