Skip to main content

A python package for managing single-cell RNA-seq datasets.

Project description


SingleCell is a python class available in the singlecelldata package for managing single-cell RNA-seq data. It contains three pandas dataframes; data for holding gene expression values (counts/normalized counts), genedata for holding more information about the genes e.g., gene names, and celldata which contains more information about cells such as cell types, labels etc.


The singlecelldata package can be easily installed using the following command:

pip install singlecelldata


The SingleCell class reference manual can be found here

Using the SingleCell class

Basic Example

The SingleCell class can be used to create an object which stores single-cell gene expression data and additional data about genes and cells in their respective dataframes. To create a SingleCell object sc, the following python code can be used:

import pandas as pd
from singlecelldata import SingleCell

dataset = 'biase'

data_path = "data/" + dataset + '/' + dataset + "_data.csv"
celldata_path = "data/" + dataset + '/' + dataset + "_celldata.csv"
genedata_path = "data/" + dataset + '/' + dataset + "_genedata.csv"

# Create pandas dataframes by reading data from files
data = pd.read_csv(data_path, index_col=0)
celldata = pd.read_csv(celldata_path, index_col=0)
genedata = pd.read_csv(genedata_path, index_col = 0)

# Create a single cell object
sc = SingleCell(dataset, data, celldata, genedata)

In the above example, a SingleCell object, sc, was ceated by passing the dataset name and the main data, the cell data and gene data as Pandas dataframes. Pandas is a powerpul python library for creating data structures from a variety of sources. Pandas can open and read data from numerous differernt file types such as csv files and creating dataframes from it. This enables the user to create SingleCell objects from a variety of different data file types.

Detailed Example

More detailed example can be found here


Contact the author on to give feedback/suggestions for further improvements and to report issues.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for singlecelldata, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size singlecelldata-1.0.1-py3-none-any.whl (7.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size singlecelldata-1.0.1.tar.gz (6.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page