MultiAssayExperiment
Container class to represent and manage multi-omics genomic experiments. Follows Bioconductor's MAE R/Package.
Install
Package is published to PyPI
pip install multiassayexperiment
Usage
First create mock sample data
import pandas as pd
import numpy as np
from genomicranges import GenomicRanges
nrows = 200
ncols = 6
counts = np.random.rand(nrows, ncols)
gr = GenomicRanges(
{
"seqnames": [
"chr1",
"chr2",
"chr2",
"chr2",
"chr1",
"chr1",
"chr3",
"chr3",
"chr3",
"chr3",
]
* 20,
"starts": range(100, 300),
"ends": range(110, 310),
"strand": ["-", "+", "+", "*", "*", "+", "+", "+", "-", "-"] * 20,
"score": range(0, 200),
"GC": [random() for _ in range(10)] * 20,
}
)
col_data_sce = pd.DataFrame(
{
"treatment": ["ChIP", "Input"] * 3,
},
index=["sce"] * 6,
)
col_data_se = pd.DataFrame(
{
"treatment": ["ChIP", "Input"] * 3,
},
index=["se"] * 6,
)
sample_map = pd.DataFrame(
{
"assay": ["sce", "se"] * 6,
"primary": ["sample1", "sample2"] * 6,
"colname": ["sce", "se"] * 6,
}
)
sample_data = pd.DataFrame({"samples": ["sample1", "sample2"]})
Now we can create an instance of an MAE -
from multiassayexperiment import MultiAssayExperiment
from singlecellexperiment import SingleCellExperiment
from summarizedExperiment import SummarizedExperiment
tsce = SingleCellExperiment(
assays={"counts": counts}, row_data=df_gr, col_data=col_data_sce
)
tse2 = SummarizedExperiment(
assays={"counts": counts.copy()},
row_data=df_gr.copy(),
col_data=col_data_se.copy(),
)
mae = MultiAssayExperiment(
experiments={"sce": tsce, "se": tse2},
col_data=sample_data,
sample_map=sample_map,
metadata={"could be": "anything"},
)
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/.
Release files for multiassayexperiment 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| MultiAssayExperiment-0.3.1.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| MultiAssayExperiment-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / MultiAssayExperiment-0.3.1.tar.gz
| Download URL | MultiAssayExperiment-0.3.1.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e68a1c9a154b81bfdf5acd9440e1ffb32ed068cf9d5013526e18598e696d5f67
|
|
BLAKE2b-256 checksum How to use checksums |
01d1e27d1b65c82fbf804c3f7eff84f81aa9f899759ac4822b5f7599433b8203
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / MultiAssayExperiment-0.3.1-py3-none-any.whl
| Download URL | MultiAssayExperiment-0.3.1-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72839e0b1d967330364d49984be09ea73d058944aee1bcb9b83edaf4aedc93e4
|
|
BLAKE2b-256 checksum How to use checksums |
b333132520629650fd098b0e02543e2318ebe08cbabad2ba31c36a8fd2b1d093
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|