bioalpha.singlecell.write_bioturing_format

bioalpha.singlecell.write_bioturing_format(adata: AnnData | H5ADMap, *, dst_path: str, layer: str | None = None, pca_key: str | None = None, species: Literal['human', 'mouse', 'primate', 'others'] = 'human')

Write Bioturing format.

Parameters:
  • adata (AnnData) – The annotated data matrix of shape n_obs x n_vars. Rows correspond to cells and columns to genes.

  • dst_path (str) – Path to save.

  • layer (Optional[str], default = None) – layer save the expression matrix. If None, use .X.

  • pca_key (Optional[str], default = None) – Which key in .obsm used as PCA for futher analysis. If None, choose randomly one key in .obsm with more than 3 dims. If can not find, run bioalpha.sc.pp.pca with 50 components.

  • species (Literal['human', 'mouse', 'primate', 'others'], default = 'human') – Species of data.

Returns:

  • Folder save at '{save_path}/{id}'.

  • Including

    • custom_embeddings

    • coords.npy

    • embedding.db

    • metadata.db

    • matrix.hdf5