SummarizedExperiment
Container to represent genomic experiments, follows Bioconductor's SummarizedExperiment.
Install
Package is published to PyPI
pip install summarizedexperiment
Usage
Currently supports SummarizedExperiment & RangeSummarizedExperiment classes
First create necessary sample data
import pandas as pd
import numpy as np
from genomicranges import GenomicRanges
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,
from summarizedexperiment import SummarizedExperiment
tse = SummarizedExperiment(
assays={"counts": counts}, rowData=df_gr, colData=colData
)
To create a RangeSummarizedExperiment
from summarizedexperiment import RangeSummarizedExperiment
trse = RangeSummarizedExperiment(
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.5
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.5.tar.gz | 26.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SummarizedExperiment-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.4 kB
Release files / SummarizedExperiment-0.1.5.tar.gz
| Download URL | SummarizedExperiment-0.1.5.tar.gz |
|---|---|
| Size | 26.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5084efb4a9a00c2057145e5e9a079e2508527e1b12323cb6549e67a2ce0e30ca
|
|
BLAKE2b-256 checksum How to use checksums |
e8fc64ba3fdb2240310781c12ed6954e02578474f6cc86d6b6a5b74f5dfde178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / SummarizedExperiment-0.1.5-py3-none-any.whl
| Download URL | SummarizedExperiment-0.1.5-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fee8d983445be7b145c0294c8e01660e6401e9ceb2ee719e890f4e138cf72fb
|
|
BLAKE2b-256 checksum How to use checksums |
28173f554f9befa211b3b7495035da5f675540e7ed59d8630be9626a58a282ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|