northstar

Single cell type annotation guided by cell atlases, with freedom to be queer

https://github.com/fabilab/northstar

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.0%) to scientific vocabulary

Keywords

cell-atlas clustering leidenalg scrna-seq scrna-seq-analysis singlecell
Last synced: 6 months ago · JSON representation

Repository

Single cell type annotation guided by cell atlases, with freedom to be queer

Basic Info
Statistics
  • Stars: 25
  • Watchers: 1
  • Forks: 6
  • Open Issues: 1
  • Releases: 0
Topics
cell-atlas clustering leidenalg scrna-seq scrna-seq-analysis singlecell
Created over 6 years ago · Last pushed over 3 years ago
Metadata Files
Readme License

README.md

Build Status License: MIT ReleaseVersion FOSSA Status Documentation Status

Logo

northstar

Single cell type annotation guided by cell atlases, with freedom to be queer.

Brief description

northstar is a Python package to identify cell types within single cell transcriptomics datasets. northstar's superpower is that it learns from cell atlases but still allows queer cells to make their own cluster if they want to.

Also, northstar was heavily developed during Pride Month.

Atlas resources

Atlas averages

Curated averages and subsamples from several atlases: https://northstaratlas.github.io/atlas_landmarks/

If you want us to add you cell atlas, open an issue on: https://github.com/northstaratlas/atlas_landmarks/issues

Documentation

https://northstar.readthedocs.io

Installation

bash pip install northstar

To automatically download and use our online atlas collection at https://northstaratlas.github.io/atlas_averages/, you will need to call:

bash pip install 'northstar[atlas-fetcher]'

Dependencies

  • numpy
  • scipy
  • pandas
  • scikit-learn
  • anndata
  • python-igraph>=0.8.0
  • leidenalg>=0.8.0

It is recommended that you install python-igraph and leidenalg using pip. However, any installation (e.g. conda) that includes recent enough versions of both packages should work.

Optional deps to use our online atlases:

  • requests
  • loompy
  • scanpy
  • pynndescent (only useful if you use scanpy as well)

If you have scanpy installed, northstar will use it to speed up a few operations (PCA, graph construction). You can turn this off in two ways:

  1. Uninstall scanpy is you don't need it for anything else, or
  2. Set the environment variable NORTHSTAR_SKIP_SCANPY to anything except empty string, e.g. in a notebook:

```python import os os.environ['NORTHSTARSKIPSCANPY'] = 'yes' import northstar as ns

(rest of the notebook/script) ```

Hot-swapping between the two modes (w or w/o scanpy) is not currently supported.

Usage

See the paper below or the documentation for detailed instructions and examples. The simplest way to use northstar is to classify a new single cell dataset using one of the available atlases, e.g. Darmanis_2015 on brain cells:

```python import northstar

Choose an atlas

atlasname = 'Darmanis2015'

Get a gene expression matrix of the new dataset (here a

random matrix for simplicity)

N = 200 L = 50 newdataset = pd.DataFrame( data=np.random.rand(L, N).astype(np.float32), index=<genelist>, columns=['cell_'+str(i+1) for i in range(N)], )

Initialize northstar classes

model = northstar.Averages( atlas='Darmanis2015', nneighbors=5, n_pcs=10, )

Run the classifier

model.fit(new_dataset)

Get the cluster memberships for the new cells

membership = model.membership ```

Citation

If you use this software please cite the following paper:

Fabio Zanini*, Bojk A. Berghuis*, Robert C. Jones, Benedetta Nicolis di Robilant, Rachel Yuan Nong, Jeffrey Norton, Michael F. Clarke, Stephen R. Quake. Northstar enables automatic classification of known and novel cell types from tumor samples. Scientific Reports 10, Article number: 15251 (2020), DOI: https://doi.org/10.1038/s41598-020-71805-1

License

northstar is released under the MIT license.

NOTE: The module leidenalg to perform graph-based clstering is released under the GLP3 license. You agree with those licensing terms if you use leidenalg within northstar.

FOSSA Status

Owner

  • Name: fabilab
  • Login: fabilab
  • Kind: organization
  • Location: Australia

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 222
  • Total Committers: 3
  • Avg Commits per committer: 74.0
  • Development Distribution Score (DDS): 0.036
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Fabio Zanini f****i@f****m 214
BojkArth b****s@g****m 7
fossabot b****s@f****o 1
Committer Domains (Top 20 + Academic)

Dependencies

setup.py pypi
  • anndata *
  • leidenalg >=0.8.0
  • numpy *
  • pandas *
  • python-igraph >=0.8.0
  • scikit-learn *