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.2
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.2.tar.gz | 22.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SummarizedExperiment-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.6 kB
Release files / SummarizedExperiment-0.1.2.tar.gz
| Download URL | SummarizedExperiment-0.1.2.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
665f80ff4a5ca27f21b598f61bfcf2af7c9126e2ae8bbd6960cd78cc0bd37a64
|
|
BLAKE2b-256 checksum How to use checksums |
826e4f2f6f9388c4362b78f860106b46c51b9ec92c556b9b893a1567eb7119bc
|
| 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.2-py3-none-any.whl
| Download URL | SummarizedExperiment-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a54fbaf2678592bfb3efbe3c138fd4e7c58d82130b419297b4f8b9064ba6648
|
|
BLAKE2b-256 checksum How to use checksums |
930df63ec4bdb02adb98cdcf0858c1f781cb870b7226137f6a85c99f44adc038
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|