DownloadableAnnDataset

class scvi.dataset.DownloadableAnnDataset(filename='anndataset', save_path='data/', url=None, delayed_populating=False, batch_label='batch_indices', ctype_label='cell_types', class_label='labels', use_raw=False, cell_measurements_col_mappings=None)[source]

Bases: scvi.dataset.dataset.DownloadableDataset

Forms a DownloadableDataset from a .h5ad file using the anndata package.

Parameters
  • filename (strstr) – Name of the .h5ad file to save/load.

  • save_path (strstr) – Location to use when saving/loading the data.

  • url (str, NoneOptional[str]) – URL pointing to the data which will be downloaded if it’s not already in save_path.

  • delayed_populating (boolbool) – Switch for delayed populating mechanism.

  • batch_label (strstr) – AnnData obs column name for batches

  • ctype_label (strstr) – AnnData obs column name for cell_types

  • class_label (strstr) – AnnData obs column name for labels

  • use_raw (boolbool) – if True, copies data from .raw attribute of AnnData

Examples

>>> # Loading a local dataset
>>> dataset = DownloadableAnnDataset("TM_droplet_mat.h5ad", save_path = 'data/')

Methods Summary

populate()

Populates a DonwloadableDataset object’s data attributes.

Methods Documentation

populate()[source]

Populates a DonwloadableDataset object’s data attributes.

E.g by calling one of GeneExpressionDataset’s populate_from... methods.