Container class for representing data from single-cell experiments
Project description
SingleCellExperiment
Container class for representing data from single-cell experiments; follows Bioconductor's SingleCellExperiment.
Install
Package is published to PyPI
pip install singlecellexperiment
Usage
First create mock 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,
}
)
from singlecellexperiment import SingleCellExperiment
tse = SingleCellExperiment(
assays={"counts": counts}, rowData=df_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/.
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
SingleCellExperiment-0.1.tar.gz
(22.5 kB
view hashes)
Built Distribution
Close
Hashes for SingleCellExperiment-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 214307c3e3d9a9f40fc6024a101649850b039c292faa41866cf2982a7a5f582c |
|
MD5 | e2f17c29d79c8ec1cd7be912828270dd |
|
BLAKE2b-256 | 0622dc7ff7a9cbb849320db55483824aa238639983004a3384e3cbb56fe1b55c |