Skip to content

Unofficial Python implementation of EcoTyper (R) for tumour-microenvironment classification in single-cell and bulk RNA-seq, incorporation with AnnData.

Notifications You must be signed in to change notification settings

hoseok-lee/ecotyper-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disclaimer

This is an unofficial Python implementation for the R package EcoTyper, for discovery of ecotypes in scRNA-seq data, and recovery in bulk RNA-seq. The original code has been optimized for sparse matrices and smoother integration with AnnData. The NMF solver can now be changed to the much quicker Coordinate Descent algorithm.

Installation

This package is not yet available on PyPi. To install ecotyper for Python, clone the repository

$ git clone https://github.com/hoseok-lee/ecotyper-py.git

and install with pip.

$ pip install .

Usage

To run EcoTyper pipelines, instantiate an EcoTyper object and run either discovery() or recovery(). Recovery is not yet implemented.

eco = EcoTyper(adata)
eco.discovery(
    cell_type_idx,
    sample_idx,

    n_jobs              = 10,
    fractions           = "cell_type_specific",
    n_cells_gene_filter = 500,
    n_cells_distance    = 2500,
    n_genes_top_nmf     = 1000,
    cophenetic_cutoff   = 0.95,
    max_clusters        = 20,
    nmf_restarts        = 5,
    random_state        = 0,

    figures             = "output/folder"
)

About

Unofficial Python implementation of EcoTyper (R) for tumour-microenvironment classification in single-cell and bulk RNA-seq, incorporation with AnnData.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages