Skip to main content

Compute single-cell cell-type expression specificity

Project description

CELLEX

CELLEX (CELL-type EXpression-specificity) is a tool for computing cell-type Expression Specificity (ES) profiles. It employs a "wisdom of the crowd"-approach by integrating multiple ES metrics, thus combining complementary cell-type ES profiles, to capture multiple aspects of ES and obtain improved robustness.

Contents

Quick start

This brief tutorial showcases the core features of CELLEX.

Setup

Download this repository and place it in the same directory as the script or Jupyter Notebook you wish to use CELLEX with.

Import modules

import numpy as np # needed for formatting data for this tutorial
import pandas as pd # needed for formatting data for this tutorial
import CELLEX.cellex as cellex # needed when importing directly from this repo

Load input data and metadata

data = pd.read_csv("./data.csv", index_col=0)
metadata = pd.read_csv("./metadata.csv", index_col=0)

Data format

Data may consist of UMI counts (integer) for each gene and cell.

cell_1 ... cell_9
gene_x 0 ... 4
... ... ... ...
gene_z 3 ... 1

Shape: m genes by n cells.

Metadata format

Metadata should consist of cell id's and matching annotation (string).

cell_id cell_type
cell_1 type_A
... ...
cell_9 type_C

Shape: n cells by 2.

Create ESObject and compute ESmu

eso = cellex.ESObject(df=data, annotation=metadata, verbose=True)

eso.compute(verbose=True)

Save result(s)

Only saves ESmu by default. The ESmu specificity scores may be used directly with CELLECT.

eso.save(verbose=True)

Output format

Output consist of Expression Specificity Weights (float) for each gene and cell-type. ESmu values lie in the range [0,1].

type_A ... type_C
gene_x 0.0 ... 0.9
... ... ... ...
gene_z 0.1 ... 0.2

Shape: m genes by x unique annotations. N.B. a number of genes may be removed during preprocessing.

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

cellex-1.0.0.tar.gz (6.2 MB view hashes)

Uploaded Source

Built Distribution

cellex-1.0.0-py3-none-any.whl (41.3 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