Container to represent data from genomic experiments
Project description
SummarizedExperiment
Container to represent data from genomic experiments, follows Bioconductor's SummarizedExperiment. It uses efficient structures already available in the Python/Pandas/numpy eco-system & adds an familiar interfaces.
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
)
Note
This project has been set up using PyScaffold 4.1.1. For details and usage information on PyScaffold see https://pyscaffold.org/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
SummarizedExperiment-0.1.tar.gz
(21.1 kB
view hashes)
Built Distribution
Close
Hashes for SummarizedExperiment-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f054c7c866ace2756f8a6dc63b1802e4e20b60688c471cea8ada01098a31a25 |
|
MD5 | 047967b15a1a5dcad38ef841aa4728df |
|
BLAKE2b-256 | a6196590a80c2a5a9181756353504f72fb8f4b606166266759ee1c7379f76f0d |