multiassayexperiment.io package

Submodules

multiassayexperiment.io.h5ad module

multiassayexperiment.io.h5ad.read_h5ad(path)[source]

Create a MultiAssayExperiment from a H5AD file.

This function reads the h5ad at the path using read_h5ad() and converts it into an MAE using from_anndata().

Parameters:

path (str) – Path to a H5AD file

Return type:

MultiAssayExperiment

Returns:

An MAE from the H5ad file.

multiassayexperiment.io.interface module

multiassayexperiment.io.interface.make_mae(experiments)[source]

Create an MultiAssayExperiment from a dictionary of experiment objects. Each experiment is either an AnnData object or a subclass of SummarizedExperiment. AnnData objects will be converted to a SingleCellExperiment.

The import naively creates sample mapping, with each experiment considered to be a independent sample. We add a sample to col_data in this pattern - unknown_sample_{experiment_name}. All cells from the same experiment are considered to be from the same sample and is reflected in sample_map.

Parameters:

experiments (Dict[str, Any]) –

A dictionary of experiments with experiment names as keys and the experiments as values.

Each experiment can be either a AnnData object or a subclass of SummarizedExperiment.

Raises:

TypeError

  • If any of the provided objects are not an expected types. - If experiments is not a dictionary.

Return type:

MultiAssayExperiment

Returns:

An MAE from the experiments.

Module contents