MultiAssayExperiment
Container class to represent and manage multi-omics genomic experiments. MultiAssayExperiment (MAE) simplifies the management of multiple experimental assays conducted on a shared set of specimens, follows Bioconductor's MAE R/Package.
Install
To get started, install the package from PyPI
pip install multiassayexperiment
Usage
An MAE contains three main entities,
-
Primary information (
column_data): Bio-specimen/sample information. Thecolumn_datamay provide information about patients, cell lines, or other biological units. Each row in this table represents an independent biological unit. It must contain anindexthat maps to the 'primary' insample_map. -
Experiments (
experiments): Genomic data from each experiment. either aSingleCellExperiment,SummarizedExperiment,RangedSummarizedExperimentor any class that extends aSummarizedExperiment. -
Sample Map (
sample_map): Map biological units fromcolumn_datato the list ofexperiments. Must contain columns,- assay provides the names of the different experiments performed on the biological units. All experiment names from experiments must be present in this column.
- primary contains the sample name. All names in this column must match with row labels from col_data.
- colname is the mapping of samples/cells within each experiment back to its biosample information in col_data.
Each sample in
column_datamay map to one or more columns per assay.
Let's start by first creating few experiments:
from random import random
import numpy as np
from biocframe import BiocFrame
from genomicranges import GenomicRanges
from iranges import IRanges
nrows = 200
ncols = 6
counts = np.random.rand(nrows, ncols)
gr = GenomicRanges(
seqnames=[
"chr1",
"chr2",
"chr2",
"chr2",
"chr1",
"chr1",
"chr3",
"chr3",
"chr3",
"chr3",
] * 20,
ranges=IRanges(range(100, 300), range(110, 310)),
strand = ["-", "+", "+", "*", "*", "+", "+", "+", "-", "-"] * 20,
mcols=BiocFrame({
"score": range(0, 200),
"GC": [random() for _ in range(10)] * 20,
})
)
col_data_sce = BiocFrame({"treatment": ["ChIP", "Input"] * 3},
row_names=[f"sce_{i}" for i in range(6)],
)
col_data_se = BiocFrame({"treatment": ["ChIP", "Input"] * 3},
row_names=[f"se_{i}" for i in range(6)],
)
sample_map = BiocFrame({
"assay": ["sce", "se"] * 6,
"primary": ["sample1", "sample2"] * 6,
"colname": ["sce_0", "se_0", "sce_1", "se_1", "sce_2", "se_2", "sce_3", "se_3", "sce_4", "se_4", "sce_5", "se_5"]
})
sample_data = BiocFrame({"samples": ["sample1", "sample2"]}, row_names= ["sample1", "sample2"])
Finally, we can create an MultiAssayExperiment object:
from multiassayexperiment import MultiAssayExperiment
from singlecellexperiment import SingleCellExperiment
from summarizedexperiment import SummarizedExperiment
tsce = SingleCellExperiment(
assays={"counts": counts}, row_data=gr.to_pandas(), column_data=col_data_sce
)
tse2 = SummarizedExperiment(
assays={"counts": counts.copy()},
row_data=gr.to_pandas().copy(),
column_data=col_data_se.copy(),
)
mae = MultiAssayExperiment(
experiments={"sce": tsce, "se": tse2},
column_data=sample_data,
sample_map=sample_map,
metadata={"could be": "anything"},
)
## output
class: MultiAssayExperiment containing 2 experiments
[0] sce: SingleCellExperiment with 200 rows and 6 columns
[1] se: SummarizedExperiment with 200 rows and 6 columns
column_data columns(1): ['samples']
sample_map columns(3): ['assay', 'primary', 'colname']
metadata(1): could be
For more use cases, checkout the documentation.
Note
This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.
Metadata
Release files for multiassayexperiment 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| multiassayexperiment-0.7.0.tar.gz | 1.1 MB | With provenance | Details for multiassayexperiment-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| multiassayexperiment-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for multiassayexperiment-0.7.0-py3-none-any.whl |
Total release size: 1.1 MB
Release files / multiassayexperiment-0.7.0.tar.gz
| Download URL | multiassayexperiment-0.7.0.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4840a21d122ac4b74b8ce3fa3b5e353e886925aa40839e23f81e33cf51a21b9a
|
|
BLAKE2b-256 checksum How to use checksums |
ef1900035dbb4a32658dca24ababa045451a475adc0d15359961d84b8271d60b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / multiassayexperiment-0.7.0-py3-none-any.whl
| Download URL | multiassayexperiment-0.7.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
480fa23a42cb98c17afe05a826b7ef3a4ae767f8f986f33cc14e7e8a9997c3af
|
|
BLAKE2b-256 checksum How to use checksums |
c740eaffc978e9ce2c56ef17633bde36727304295389e253c8c358192ccce5f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logSecurity for multiassayexperiment 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for multiassayexperiment-0.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.