This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.8.0 instead.
SummarizedExperiment
This package provides containers to represent genomic experimental data as 2-dimensional matrices, follows Bioconductor's SummarizedExperiment. In these matrices, the rows typically denote features or genomic regions of interest, while columns represent samples or cells.
The package currently includes representations for both SummarizedExperiment and RangedSummarizedExperiment. A distinction lies in the fact RangedSummarizedExperiment object provides an additional slot to store genomic regions for each feature and is expected to be GenomicRanges (more here).
Install
To get started, Install the package from PyPI,
pip install summarizedexperiment
Usage
A SummarizedExperiment contains three key attributes,
assays: A dictionary of matrices with assay names as keys, e.g. counts, logcounts etc.row_data: Feature information e.g. genes, transcripts, exons, etc.column_data: Sample information about the columns of the matrices.
First lets mock feature and sample data:
from random import random
import pandas as pd
import numpy as np
from biocframe import BiocFrame
nrows = 200
ncols = 6
counts = np.random.rand(nrows, ncols)
row_data = BiocFrame(
{
"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 = pd.DataFrame(
{
"treatment": ["ChIP", "Input"] * 3,
}
)
To create a SummarizedExperiment,
from summarizedexperiment import SummarizedExperiment
tse = SummarizedExperiment(
assays={"counts": counts}, row_data=row_data, column_data=col_data,
metadata={"seq_platform": "Illumina NovaSeq 6000"},
)
## output
class: SummarizedExperiment
dimensions: (200, 6)
assays(1): ['counts']
row_data columns(6): ['seqnames', 'starts', 'ends', 'strand', 'score', 'GC']
row_names(0):
column_data columns(1): ['treatment']
column_names(0):
metadata(1): seq_platform
To create a RangedSummarizedExperiment
from summarizedexperiment import RangedSummarizedExperiment
from genomicranges import GenomicRanges
trse = RangedSummarizedExperiment(
assays={"counts": counts}, row_data=row_data,
row_ranges=GenomicRanges.from_pandas(row_data.to_pandas()), column_data=col_data
)
## output
class: RangedSummarizedExperiment
dimensions: (200, 6)
assays(1): ['counts']
row_data columns(6): ['seqnames', 'starts', 'ends', 'strand', 'score', 'GC']
row_names(0):
column_data columns(1): ['treatment']
column_names(0):
metadata(0):
For more examples, 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 summarizedexperiment 0.6.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 | |
|---|---|---|---|
| summarizedexperiment-0.6.1.tar.gz | 1.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| summarizedexperiment-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.0 MB
Release files / summarizedexperiment-0.6.1.tar.gz
| Download URL | summarizedexperiment-0.6.1.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3aa6e9eefd27266e4203a97b8e63ac87de74b72e512bcbd18b46a3771b16333a
|
|
BLAKE2b-256 checksum How to use checksums |
8d5cb86bde135570d6b4ce385b35d09f92bdab063acd2a8b5f9c16b48b18f1fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 3, 2026.
Transparency logRelease files / summarizedexperiment-0.6.1-py3-none-any.whl
| Download URL | summarizedexperiment-0.6.1-py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d229ecbb563eadee6d73cfcd2fb48e769c0e4764809784a6c1cf4f501668814c
|
|
BLAKE2b-256 checksum How to use checksums |
989674e6a30ad0e4a2d4782590e3a75c5edcf99eee77ccc19f989a1da7511405
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 3, 2026.
Transparency log