Skip to main content

cell2sentence: create cell sentences from sequencing data

Project description

cell2sentence

cell2sentence workflow image

Reframing cells as sentences of genes, ordered by expression. Please read the manuscript on bioRxiv for methodological details and examples.

(https://www.biorxiv.org/content/10.1101/2022.09.18.508438)

Stable Setup

Install cell2sentence from PyPI with

pip install cell2sentence

Convert Anndata Object to Cell Sentences

After your data is loaded into a standard AnnData adata object, you may create a cell2sentence object with:

import cell2sentence as cs

csdata = cs.transforms.csdata_from_adata(adata)

and generate a list of cell sentences with:

sentences = csdata.create_sentence_lists()

A tutorial script showing how to use pretrained word vectors to analyze the pbmc3k dataset used by Seurat and scanpy in their guided clustering tutorials is available at tutorials/pbmc3k_cell_sentences.py

Development Setup

Create a conda environment using python3 using anaconda with:

conda create -n cell2sentence python=3.8

and activate the environment with

conda activate cell2sentence

finally, you can install the latest development version of cell2sentence by running

make install

which simply uses pip -e.

Loading Data

All data used in the bioRxiv manuscript are publicly available, and details are outlined in the DATA.md file in this repository.

Project details


Download files

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

Source Distribution

cell2sentence-0.0.1.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

cell2sentence-0.0.1-py3-none-any.whl (15.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page