SummarizedExperiment
Container to represent data from genomic experiments, follows Bioconductor's SummarizedExperiment. It uses efficient structures already available in the Pandas/numpy eco-system & adds a familiar interface.
Install
Package is deployed to PyPI
pip install summarizedexperiment
Usage
Currently supports both SummarizedExperiment & RangeSummarizedExperiment objects
First create necessary sample data
nrows = 200
ncols = 6
counts = np.random.rand(nrows, ncols)
df_gr = pd.DataFrame(
{
"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,
}
)
gr = GenomicRanges.fromPandas(df_gr)
colData = pd.DataFrame(
{
"treatment": ["ChIP", "Input"] * 3,
}
)
To create a SummarizedExperiment,
tse = SummarizedExperiment(
assays={"counts": counts}, rowData=df_gr, colData=colData
)
To create a RangeSummarizedExperiment
trse = SummarizedExperiment(
assays={"counts": counts}, rowRanges=gr, colData=colData
)
For more use cases including subset, checkout the documentation
Note
This project has been set up using PyScaffold 4.1.1. For details and usage information on PyScaffold see https://pyscaffold.org/.
Release files for summarizedexperiment 0.1.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.1.1.tar.gz | 21.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SummarizedExperiment-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.2 kB
Release files / SummarizedExperiment-0.1.1.tar.gz
| Download URL | SummarizedExperiment-0.1.1.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
340dca5b3a5dbc067ce282550de5e8306ae6ebd57024b136f13d8e12fbd0c843
|
|
BLAKE2b-256 checksum How to use checksums |
72c6f86011504cd48a88566ce375a9fdadea2e026511c551fcb6550f9f4bb499
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / SummarizedExperiment-0.1.1-py3-none-any.whl
| Download URL | SummarizedExperiment-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2656c694856206763941ef1d5b27e3507e3ffd1f11c4e41dab0022cadb06cf39
|
|
BLAKE2b-256 checksum How to use checksums |
3591b90860298e56dd9de40a3947ae59a9531a6d01cee7399c284f927877ae95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|