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/.
Metadata
Release files for singlecellexperiment 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| SingleCellExperiment-0.1.tar.gz | 22.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SingleCellExperiment-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.5 kB
Release files / SingleCellExperiment-0.1.tar.gz
| Download URL | SingleCellExperiment-0.1.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39cc66c46dd159cbdb078e5e5467c5859be829dacff6532943e5b8ec090f3798
|
|
BLAKE2b-256 checksum How to use checksums |
4fc72f87f03dc0a39652929e596b999610770d5a2ad3c98c9d4eda99ac6ad1fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / SingleCellExperiment-0.1-py3-none-any.whl
| Download URL | SingleCellExperiment-0.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
214307c3e3d9a9f40fc6024a101649850b039c292faa41866cf2982a7a5f582c
|
|
BLAKE2b-256 checksum How to use checksums |
0622dc7ff7a9cbb849320db55483824aa238639983004a3384e3cbb56fe1b55c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|