merge_data

besca.tl.auto_annot.merge_data(adata_trains, adata_pred, genes_to_use='all', merge='scanorama')[source]

read adata files of training and testing datasets

This function reads a list of training datasets (at least one) and one testing dataset from .h5ad files and returns a list of training datasets anndata objects, and a testing anndata object.

Parameters:
  • adata_trains (list) – list of training adata objects

  • adata_pred (list) – testing adata object

  • train_datasets (list) – list of name of training datasets

  • genes_to_use (list or string | default = ‘all’) – if all nothing happens, otherwise all genes not found in the list will be removed.

  • merge (string | default = ‘scanorama’) – merges datasets using scanorama. if time is an issue, choose ‘naive’ for simple concatenation.

Returns:

  • list – A merged and corrected training adata object containing chosen genes

  • AnnData – An anndata object containing corrected testinf adata object with chosen genes