---
title: Scanpy FAQ
description: Common questions about Scanpy input format, GPU acceleration, batch effects, and clustering.
---

These answers cover the practical choices in [Scanpy](/docs/scanpy) single-cell analysis on the platform — the required input format, how GPU acceleration works, which workflow to pick, handling batch effects, and how many clusters to expect. For error-by-error fixes, see [troubleshooting](/docs/scanpy/troubleshooting).

## Data preparation

**Q: What file format do I need?**
A: An AnnData `.h5ad` file referenced by an S3 URI or HTTPS URL. That's the only format the platform's Scanpy job reads — convert 10X output or CSV matrices to `.h5ad` first.

**Q: Does the `.h5ad` need to be pre-normalized?**
A: No — the pipeline runs QC, normalization, and log-transformation itself. Provide raw counts in `X` and let the workflow handle preprocessing.

## GPU acceleration

**Q: Is this GPU-accelerated?**
A: Yes. The core workflows (`full`, `qc`, `clustering`, `de`) run on a T4 GPU via rapids-singlecell (cuML/cuGraph/cupy), which accelerates PCA, k-NN, UMAP, and Leiden. The extension workflows (batch correction, annotation, scoring) run on CPU.

**Q: How large a dataset can it handle?**
A: The T4's 16 GB VRAM is sufficient for up to roughly a million cells. Beyond that, subsample first or filter more aggressively.

## Workflows and batch effects

**Q: Which workflow should I run?**
A: `full` for the complete pipeline through markers, `clustering` to stop before differential expression, `qc` for filtering only, and `de` for marker genes. Start with `full`.

**Q: How do I handle batch effects?**
A: Use one of the batch-correction extension workflows — `harmony_integrate`, `scanorama_integrate`, or `combat_correct` — with a `batch_key` naming the `obs` column that holds batch labels. For deep generative integration, pair with [scvi-tools](/docs/scvi-tools).

## Clustering

**Q: How many clusters should I expect?**
A: It depends on your biology. Start at the default `resolution` of 0.5 and adjust — raise it for more, smaller clusters. Over-clustering is easier to merge than under-clustering is to split.

**Q: Leiden or Louvain?**
A: Leiden (the default) produces better-connected communities and is recommended. Use Louvain only for backward compatibility.

## Read next
