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 published 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.3
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.3.tar.gz | 22.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SummarizedExperiment-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.9 kB
Release files / SummarizedExperiment-0.1.3.tar.gz
| Download URL | SummarizedExperiment-0.1.3.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22c5ce380f9aa9debad1a7d1ffbb9b9ff88812e44fb358d67f5cc68b8127a151
|
|
BLAKE2b-256 checksum How to use checksums |
1a7858d8654c5302fcb0d136903ccab0a1bd8beba8ebb7a2f4bf08e38703d513
|
| 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.3-py3-none-any.whl
| Download URL | SummarizedExperiment-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2181d1b3de2171adef7c589aa009f1f92a3f8b7de26195522601e21c8e7b0f3e
|
|
BLAKE2b-256 checksum How to use checksums |
da19552a0282e766e520214ff3d5dd43486b8a1b658d7e2cc96ce9f1dfcaeb55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|