Scanpy

Single-cell analysis in Python. Scales to >100M cells.

Data SciencePythonBSD-3-Clause

Abstract

Scanpy is an open-source Data Science project. Single-cell analysis in Python. Scales to >100M cells. Scanpy is a scalable toolkit for analyzing single-cell gene expression data built jointly with [anndata][]. It includes preprocessing, visualization, clustering, trajectory inference and differential expression testing. It is built using Python, Machine Learning. The complete source code is publicly available on GitHub under the BSD 3-Clause "New" or "Revised" License, making it a useful reference for students building a Data Science mini project or final-year project.

1. Introduction

Scanpy is a scalable toolkit for analyzing single-cell gene expression data built jointly with [anndata][]. It includes preprocessing, visualization, clustering, trajectory inference and differential expression testing. The Python-based implementation efficiently deals with datasets of more than one million cells. For datasets too large to fit into memory, [many scanpy functions][] are now compatible with [dask][] (warning: experimental).

scanpy is part of the scverse® project (website, governance) and is fiscally sponsored by NumFOCUS. If you like scverse® and want to support our mission, please consider making a tax-deductible donation to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.

Our public API is documented in the [API section][] of these docs. We cannot guarantee the stability of our internal APIs, whether it's the location of a function, its arguments, or something else. In other words, we do not officially support (or encourage users to do) something like from scanpy.logging import debug as logging is not documented, even though it does not contain a [leading underscore][]. However, we are aware that many users do use these internal APIs and thus encourage them to [open an issue][] or migrate to the public API. That is, if something is missing from our public API as documented, for example a feature you wish to be exported publicly, please open an issue.

2. Objective

Single-cell analysis in Python. Scales to >100M cells.

This project demonstrates how Python, Machine Learning can be applied to a real-world Data Science problem.

4. Technology Stack

PythonMachine Learning

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Python 3.8 or later
  • pip / virtualenv for dependencies
  • VS Code, PyCharm or Jupyter Notebook
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/scverse/scanpy.git
cd scanpy

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Turn the analysis into an interactive dashboard
  • Automate data refresh with a scheduled job
  • Add a predictive model on top of the analysis

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. What is the source of the dataset and how was missing data handled?
  2. Which exploratory analysis steps revealed the most useful insight?
  3. Why were these particular charts chosen to present the data?
  4. Which statistical or ML technique supports the conclusions?
  5. How could the analysis be automated or refreshed with new data?

9. Source Code & License

This project is developed by scverse and published on GitHub under the BSD 3-Clause "New" or "Revised" License. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on a Data Science project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Data Science Internship