Skip to main content

Python port of Augur: cell type prioritization in high-dimensional single-cell data

Project description

pyaugur

Python port of Augur: cell type prioritization in high-dimensional single-cell data.

Install

pip install pyaugur

Quick Start

import numpy as np
import pandas as pd
from pyaugur import calculate_auc

# Expression matrix: genes x cells
expr = pd.read_csv("expression.csv", index_col=0).values
meta = pd.read_csv("metadata.csv")  # columns: cell_type, label

result = calculate_auc(expr, meta=meta)
print(result["AUC"])  # Mean AUC per cell type, ranked

API

calculate_auc(input, meta=None, ...)

Train a classifier (random forest or logistic regression) to predict condition labels per cell type, evaluate AUC in cross-validation.

Returns: dict with AUC (DataFrame), results, feature_importance, parameters.

calculate_differential_prioritization(augur1, augur2, permuted1, permuted2, ...)

Permutation test for differential prioritization between two conditions.

select_variance(mat, var_quantile=0.5)

Feature selection by variance (loess on CV vs mean expression).

select_random(mat, feature_perc=0.5)

Random feature subsampling.

Performance

vs R Augur on sc_sim dataset (15,697 genes x 600 cells):

Metric Value
Pearson r (AUC parity) 0.9977
Speedup 4.0x

License

GPL-3.0 (matching upstream R package).

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

pyaugur-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyaugur-0.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file pyaugur-0.1.0.tar.gz.

File metadata

  • Download URL: pyaugur-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for pyaugur-0.1.0.tar.gz
Algorithm Hash digest
SHA256 deebb4229fd3a88925058ca968c3f781fabef12a8100bee22e4f5b4a202df4b2
MD5 c23ee74b5b1ec50116dddd1712f1ee0a
BLAKE2b-256 82e2b4329de0d011dd547956743255354a53caebaa2bd92883846a80cd4a18c9

See more details on using hashes here.

File details

Details for the file pyaugur-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyaugur-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for pyaugur-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38dc1ca2b0efb0a8f286f0abd9a7eb9f8c94fe92908af1ad47586452535c90c4
MD5 406e3d455550d88d7589b0ab1d9dd69e
BLAKE2b-256 f700ed579ace1eb98eaab48f43fea26c065d0bea756d4008e2ee717597690c3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page