Home

Awesome

Build Status Documentation Status Coverage Status License: MIT ReleaseVersion

Logo

Singlet

Single cell RNA-Seq analysis with quantitative phenotypes.

Examples:

Documentation

Hosted on readthedocs.

Features

The vision is to let you explore your data your way while providing support for repetitive tasks. Here a few things I do pretty regularly:

Requirements

Python 3.5+ is required. Moreover, you will need:

Optional dependencies:

Get those from your Linux distribution, pip, conda, or any other source.

Singlet is pure Python for the time being. So it should work on any platform supported by its dependencies, in particular various Linux distributions, recent-ish OSX, and Windows. It is tested on Linux and OSX, but if you are a Windows user and know how to use AppVeyor let's set it up!

Install

To get the latest stable version, use pip:

pip install singlet

To get the latest development version, clone the git repo and then call:

python3 setup.py install

Usage example

You can have a look inside the test folder for examples. To start using the example dataset:

import matplotlib.pyplot as plt
from singlet.dataset import Dataset
ds = Dataset(
    samplesheet='example_PBMC2',
    counts_table='example_PBMC2',
    featuresheet='example_PBMC2',
    )
ds.counts.log(inplace=True)
ds.samplesheet['cluster'] = ds.cluster.kmeans(axis='samples', n_clusters=5)
vs = ds.dimensionality.tsne(perplexity=15)
ax = ds.plot.scatter_reduced_samples(
    vs,
    color_by='cellType',
    figsize=(5, 4),    
    )
plt.show()

This will calculate a t-SNE embedding of the log-transformed features and then show your samples in the reduced space, colored by cluster. It should look more or less like this:

t-SNE example

Similar packages

Singlet is similar to other packages like scanpy or seurat. However, there are differences too: