Skip to content

Supernova-45/concordex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

concordex 0.0.1

Installation

concordex can be installed via pip

pip install git+https://github.com/pachterlab/concordex.git

Usage

After installing, concordex can be run by simply typing concordex on the command line

usage: concordex [-h] <CMD> ...

concordex 0.0.1: Assess clustering

positional arguments:
  <CMD>
    map
    stat

optional arguments:
  -h, --help  show this help message and exit

concordex map

The concordex map command generates the cluster x cluster matrix where each entry is the fraction of cluster i's neighbors which are in cluster j (i, j are row, column indices into the matrix). The matrix can be generated by running

concordex map -a assignments.txt -o map.csv mtx_file

This matrix can be used to visualize the concordex measure (in leiu of producing a non-linear 2-dimensional embedding).

concordex stat

The concordex stat command generates the concordex statistic as described in this manuscript. The stat can be generated by running

concordex stat -a assignments.txt -o map.csv mtx_file

and with python (in a jupyter notebook)

from concordex.concordex_stat import concordex_stat
import anndata

adata = anndata.read_h5ad("adata.h5ad")

mtx = adata.X # or adata.layers["my matrix"], should be scipy sparse matrix
assignments = adata.obs["assignments"].values

trace, random_trace, corrected_trace = concordex_stat(mtx, assignments)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 98.8%
  • Makefile 1.2%