Identify cell states across treatments in single-cell RNA sequencing experiments
Project description
icat
Identifying Cell-states Across Treatments
ICAT is a tool developed to better identify cell states in scRNAseq experiments where perturbations or some other biologic heterogeneity is present, such as gene knock-outs.
The method works by first identifying a set of conrol-defined cell states by performing unsupervised clustering. These identified cell states are then fed into a sparse gene weighting algorithm, Neighborhood Component Feature Selection (NCFS), to highly weight the most predictive genes, while also removing variance from non-explanatory genes. We then transform the data matrix using this weight vector, and perform semi-supervised clustering such that the originally identified control labels remain constant, but cells from experimental conditions
Installation
ICAT can be installed using pip
and can be installed using the following command:
pip install icat-sc
How to use
ICAT makes heavy use of the excellent scanpy
library along with the associated AnnData
data structure.
An example code block walks through running icat
on a simulated dataset. The
final clustering is stored in the sslouvain
column of the returned AnnData
object.
from icat import simulate
from icat import models
import scanpy as sc
import numpy as np
data_model = simulate.SingleCellDataset(
populations=2,
genes=1000,
dispersion=np.random.choice([1, 2, 3], 1000)
)
controls = data_model.simulate()
controls.obs['treatment'] = 'control'
perturbed = simulate.perturb(controls)
perturbed.obs['treatment'] = 'perturbed'
adata = controls.concatenate([perturbed])
sc.pp.log1p(adata)
visualizing dataset
# specify model parameters -- see documentation for more information
model = models.icat(
ctrl_value="control",
ncfs_kws={'reg': 1, 'sigma': 3},
neighbor_kws={'n_neighbors': 15},
cluster_kws={'resolution': 0.75},
)
# cluster cells by providing treatment information
out = model.cluster(adata, adata.obs['treatment'])
print(out.obs['sslouvain'].unique())
visualizing results
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file icat-sc-0.1.4.tar.gz
.
File metadata
- Download URL: icat-sc-0.1.4.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cd2931858304aa2602ad750bcd238c8cd953ae9768863edb6f2ec71ab1f0aee |
|
MD5 | 544f19797b5fc9fde106f2e76d7fced1 |
|
BLAKE2b-256 | 23941bbb3c3c36c778101c0e57e8973c2cf84ad6f3c5366e715a5554a2a918fe |
File details
Details for the file icat_sc-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: icat_sc-0.1.4-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98edd5f4c747d6945f557b2ef731fe386983cfd6b927690ce7c858b973b337d2 |
|
MD5 | ec456811f796872821457053ad906bbd |
|
BLAKE2b-256 | 7acf82f7ad9f02115ddc0ddba752c74d53d4a416b904b62071cbde8e15122115 |