Skip to main content

nico-wrapper

nico-wrapper provides Python APIs and Typer command-line tools for running the main NiCo (nico-sc-sp) workflow on reference single-cell RNA-seq data and spatial/Xenium query data.

nico-wrapper is being developed at the Grün Lab at the Institute for Systems Immunology under the leadership of Dominic Grün.

It covers the practical pipeline around NiCo:

  1. preprocessing raw reference and spatial data into NiCo-ready AnnData files;
  2. transferring reference labels onto spatial/query cells;
  3. running NiCo niche / spatial cell-type interaction analysis;
  4. running NiCo latent-factor covariation analysis and selected exports/reports.

Relationship to NiCo

This project is a wrapper around the upstream nico-sc-sp package, not a replacement for NiCo and not a fork of the NiCo method.

NiCo still performs the core scientific computations, including anchor discovery, label propagation, niche interaction modeling, and covariation analysis. nico-wrapper adds:

  • repository-local CLI entry points;
  • typed configuration objects and pipeline functions;
  • input/output validation before expensive NiCo calls;
  • predictable output locations;
  • small sidecar exports such as manifests, metrics tables, and coefficient tables where available.

When you need methodological details, cite or consult NiCo. When you need a structured way to execute the workflow from this repository, use nico-wrapper.

Documentation

Installation

Version 1.1.0 supports Python 3.12 on Linux and macOS.

1. Install uv

Install uv with Homebrew, your system package manager, or the official standalone installer. See the uv installation documentation for the available methods.

2. Run nico-wrapper with uvx

Run nico-wrapper directly in an isolated environment without installing it permanently:

uvx --python 3.12 nico-wrapper --help
uvx --python 3.12 nico-wrapper preprocess --help

uvx installs and caches the package. The explicit Python request makes uv select or download Python 3.12; if your default interpreter is already Python 3.12, you can omit --python 3.12.

3. Install nico-wrapper

Install nico-wrapper as a persistent command-line tool:

uv tool install --python 3.12 nico-wrapper
nico-wrapper --help

Alternatively, install it in a project-local virtual environment:

uv venv --python 3.12
source .venv/bin/activate
uv pip install nico-wrapper

Quick start

With uvx, use the umbrella command groups:

uvx --python 3.12 nico-wrapper preprocess --help
uvx --python 3.12 nico-wrapper transfer --help
uvx --python 3.12 nico-wrapper niche --help
uvx --python 3.12 nico-wrapper covariation --help

A minimal end-to-end CLI skeleton is documented in CLI usage.

Main command groups

Command Purpose
nico-wrapper preprocess Convert/build NiCo-ready reference and spatial inputs
nico-wrapper transfer Transfer reference labels onto spatial/query cells
nico-wrapper niche Run spatial niche interaction analysis
nico-wrapper covariation Run latent-factor covariation analysis and reports

Vignettes: start here

The vignettes/ directory contains worked examples for different starting points:

Goal Start here
Run the minimal CLI workflow Core CLI pipeline
Run the complete CLI analysis with exports and plots Full CLI analysis
Work interactively through the full Python API Full Python workflow
Explore results from an existing run Interactive result exploration
Use existing spatial cell-type annotations Starting from pre-annotated spatial data

New CLI users should begin with the core pipeline, which covers preprocessing, label transfer, niche analysis, and covariation analysis. The full CLI example adds exports, diagnostic plots, proximity analysis, covariation reports, ligand–receptor analysis, and pathway enrichment.

See the CLI documentation for command options and the Python API documentation for programmatic usage.

License and citation

nico-wrapper is licensed under the MIT License.

NiCo is used as an external library dependency. When using this wrapper, cite the upstream NiCo method:

Agrawal A, Thomann S, Basu S, Grün D. NiCo identifies extrinsic drivers of cell state modulation by niche covariation analysis. Nature Communications. 2024;15:10628. doi:10.1038/s41467-024-54973-w.

Contributors

See CONTRIBUTORS.md.

Metadata

Release files for nico-wrapper 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nico-wrapper 1.1.1
File Size Uploaded
nico_wrapper-1.1.1.tar.gz 92.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nico-wrapper 1.1.1
File Interpreter ABI Platform
nico_wrapper-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 193.5 kB

Release files / nico_wrapper-1.1.1.tar.gz

Download URL nico_wrapper-1.1.1.tar.gz
Size 92.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8efb724ae308d2d5b740d4d0649d17406e0111aa8701f9fafa3b42c39894c286
BLAKE2b-256 checksum
How to use checksums
046de0fd58b816d449a56f6432cb01bd9bce113b38be7d3818cd669654c87a32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / nico_wrapper-1.1.1-py3-none-any.whl

Download URL nico_wrapper-1.1.1-py3-none-any.whl
Size 100.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8251effbeeb7231173e8076fdb60347310eb74b6043c094b2d453cdaef5622cf
BLAKE2b-256 checksum
How to use checksums
b9069fd28b8e1db0aaf9d442dc2ae631a1159bf3eeb3a95c3f2df082491bdaa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page