LoomDataset

class scvi.dataset.LoomDataset(filename, save_path='data/', url=None, batch_indices_attribute_name='BatchID', labels_attribute_name='ClusterID', encode_labels_name_into_int=False, gene_names_attribute_name='Gene', cell_types_attribute_name='CellTypes', delayed_populating=False)[source]

Bases: scvi.dataset.dataset.DownloadableDataset

Loads a potentially remote .loom file.

Parameters
  • filename (strstr) – File name to use when saving/loading the data.

  • 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.

  • batch_indices_attribute_name (strstr) – Name of the attribute containing batch indices.

  • labels_attribute_name (strstr) – Name of the attribute containing labels.

  • gene_names_attribute_name (strstr) – Name of the attribute containing gene names.

  • cell_types_attribute_name (strstr) – Name of the attribute containing cell types.

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

Examples

>>> # Loading a remote dataset
>>> remote_loom_dataset = LoomDataset("osmFISH_SScortex_mouse_all_cell.loom", save_path='data/',
... url='http://linnarssonlab.org/osmFISH/osmFISH_SScortex_mouse_all_cells.loom')
>>> # Loading a local dataset
>>> local_loom_dataset = LoomDataset("osmFISH_SScortex_mouse_all_cell.loom", 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.