Skip to content

FangmingXie/SingleCellArchetype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SingleCellArchetype

Go directly here Open in colab for a short tutorial (~1 min).

Table of Contents

  1. Project overview
  2. Repository structure
  3. Getting started
  4. Setting up locally
  5. Cite

Project overview

This repository contains code for Archetypal Analysis of single-cell RNA-seq data as described in Xie et al. 2024, an application and extension of Pareto multi-tasking theory as described in Adler et al. 2019.

The code base is a wrapper and extension of the ulfaslak/py_pcha package that implements the PCHA algorithm.

img Figure: Archetypal analysis of the transcriptomic continuum of L2/3 excitatory neurons (Xie et al. 2024).

Repository structure

SingleCellArchetype/
├── README.md
├── data/
│   └── data_snrna_v1.h5ad        # sample data
└── sca/
    ├── utils.py                  # utility functions
    ├── sca.py                    # the SingleCellArchetype class
    ├── tutorial_complete.ipynb   # a short tutorial (~1 min)
    └── tutorial_minimum.ipynb    # a long tutorial  (~10 min)

Getting started

Go directly here or Open in colab for a short tutorial. You can run through this example application of Archetypal Analysis in your web browser in ~1 minute. No need to set up anything else.

Alternatively, you can also check out this complete tutorial.

Setting up locally

Step 1. Download the sample data here or with the following command.

wget 'https://raw.githubusercontent.com/FangmingXie/SingleCellArchetype/main/data/data_snrna_v1.h5ad'

Step 2. Install the packages

pip install anndata # prerequisite
pip install py_pcha # prerequisite
git clone git@github.com:FangmingXie/SingleCellArchetype.git # this repo

Step 3. follow through the following tutorials in your own jupyter notebook or jupyter lab.

  • sca/tutorial_minimum.ipynb
  • sca/tutorial_complete.ipynb

Cite

  • Fangming Xie, Saumya Jain, Runzhe Xu et al. 2024 bioRxiv "Spatial profiling of the interplay between cell type- and vision-dependent transcriptomic programs in the visual cortex" (link)
  • Miri Adler et al 2019 Cell Reports "Emergence of division of labor in tissues through cell interactions and spatial cues" (link)
  • The py_pcha package: https://github.com/ulfaslak/py_pcha

About

Code for Archetypal Analysis of single-cell RNA-seq data as described in Xie et al. 2024, an application and extension of Pareto multi-tasking theory as described in Adler et al. 2019

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors