Skip to content

BoevaLab/ANS_signature_scoring

Repository files navigation

docs-deploy

ANS: Adjusted Neighborhood Scoring to improve gene signature-based cell annotation in single-cell RNA-seq data

A gene expression signature scoring Python package.

This repository accompanies the work: Laure Ciernik*, Agnieszka Kraft*, Joséphine Yates, Florian Barkmann, and Valentina Boeva, “ANS: Adjusted Neighborhood Scoring to improve gene signature-based cell annotation in single-cell RNA-seq data”. doi: https://doi.org/10.1101/2023.09.20.558114

Note: This repository is in the experimental stage. Changes to the API may appear.

Resources

For tutorials and API description, see our documentation.

Installation

We aim for Python versions 3.8+. Run:

pip install git+https://github.com/lciernik/ANS_signature_scoring.git

Disclaimer: The implementations of all Tirosh et al. 2016 based scoring methods are largely based on the implementation of the score_genes method in Scanpy.

Method implementation in R

The repository contains an R implementation of the novel scoring method in the folder src_R/adjusted_neighborhood_scoring.R. The file can be downloaded, and the methods can be loaded for use.

Disclaimer: The code is largely based on the implementation of the AddModuleScore method of the Seurat package.

Note: ANS for R should be used on Seurat objects. Source the file in your script and use it identically to AddModuleScore.

Getting started

The package allows full compatibility with the Python scRNA-seq analysis toolbox Scanpy. The scoring methods are applied to preprocessed (log-normalized) scRNA-seq.

import signaturescoring as ssc

ssc.score_signature(
    adata=adata,                            # preprocessed (log-normalized) gene expression data in an AnnData object 
    gene_list=gene_signature,               # gene expression signature, type list
    method='adjusted_neighborhood_scoring',
    ctrl_size=100, 
    score_name='scores',                    # scores stored in adata.obs column defined by score_name
)

print(adata.obs['scores'].describe())

Other method values:

See tutorials on basic scoring examples, GMM postprocessing, and hard labeling in the tutorials folder.

Correspondance

First: Laure Ciernik Second: Prof. Valentina Boeva

About

ANS_signature_scoring: A gene expression signature scoring Python package.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published