Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Installation

CyteType has two clients:

Both prepare your data on your own computer and send it to the CyteType service at https://cytetype.nygen.io, where the annotation runs. Install the client for the environment you analyze your data in. You can install both; they share the same sign-in.

Requirements

PythonR
Language versionPython 3.12 or newerR 4.2 or newer (see R notes)
Package sourcePyPIGitHub, with dependencies from CRAN and Bioconductor
Single-cell toolkitAnnData, installed with cytetypeSeurat, installed with CyteTypeR

You also need internet access to https://cytetype.nygen.io and a CyteType account, which needs an institutional email address (see Sign in and API keys).

Install the client

Python
R

With pip, in the virtual environment or conda environment you use for your analysis:

pip install cytetype

With uv:

# Add CyteType to a uv project
uv add cytetype

# Or install it into the active virtual environment
uv pip install cytetype

The package also installs the cytetype command, which you use to sign in.

Python notes

R notes

Optional packages that CyteTypeR uses when they are installed (the installers do not add them):

PackageWhat it is for
furrr and progressrWith furrr, CyteTypeR uploads large files in parallel chunks (up to upload_max_workers, 6 by default); with the default show_progress = TRUE it also needs progressr. Without them, chunks are uploaded one at a time.

Install the packages for the quickstart

The quickstarts use the standard Scanpy and Seurat workflows to cluster the example data before annotating it.

Python
R

Scanpy is not installed with cytetype. Install it with the leiden extra:

pip install "scanpy[leiden]"

# or, with uv
uv add "scanpy[leiden]"

The extra installs igraph and leidenalg, the two Leiden implementations Scanpy can use; the quickstart’s sc.tl.leiden(flavor="igraph") needs igraph. CyteType’s plotting helper, cytetype.marker_dotplot(), also needs Scanpy.

Check the installation

Python
R
cytetype --version
python -c "import cytetype; print(cytetype.__version__)"

Both print the installed version, for example cytetype 0.21.0 and 0.21.0.

If your shell cannot find the cytetype command, the environment’s scripts folder is not on your PATH. Activate the environment, or run the command through Python instead, for example python -m cytetype.cli --version.

Update

Python
R
pip install -U cytetype

# or, with uv in a virtual environment
uv pip install -U cytetype

# or, with uv in a project
uv lock --upgrade-package cytetype
uv sync

When Python imports cytetype, and when you run the cytetype command, the package asks PyPI for the latest version, waiting at most 2 seconds. If a newer release exists, it prints a warning such as:

⚠️  A newer CyteType version is available on PyPI (<installed> -> <latest>). Run `pip install -U cytetype` to update.

The check stays silent when you are offline or PyPI cannot be reached.

After updating, restart your Python kernel or R session so that the new version is loaded.

Optional: the cytetyper command for R

Python users get the cytetype terminal command with the package. R users can install an equivalent command, cytetyper, which runs the CyteTypeR sign-in functions from a terminal:

library(CyteTypeR)
InstallCyteTypeRCli()

The function prints and returns the path of the installed command. cytetyper has the same commands as the Python cytetype command:

cytetyper setup           # sign in with your browser (also: cytetyper get-key)
cytetyper login           # save an existing API key
cytetyper logout          # remove the saved key from this computer
cytetyper dashboard       # open the dashboard
cytetyper view <JOB_ID>   # open the report of a job
cytetyper --version

cytetyper only signs you in and opens pages. Annotation jobs always run from an R session with CyteTypeR(). You do not need the command at all: the R functions SetupCyteTypeR(), LoginCyteTypeR() and LogoutCyteTypeR() do the same things.

Before you rely on it, check these points:

Next step

Sign in once on each computer you run CyteType from: Sign in and API keys. If the installation fails, see Troubleshooting.