encode_cells#
- DnaClient.encode_cells(cells, *, progress_bar=True, max_workers=5)[source]#
Encode single-cell count profiles into AlphaGenome 2 latent embeddings.
Runs AlphaGenome 2’s single-cell autoencoder (trained on CELLxGENE) without evaluating the DNA sequence model. Use this as a fast diagnostic check to verify that biological variation across cell states is preserved in embedding space before running sequence predictions or variant scoring. Because the encoder does not explicitly correct batch effects, stratify inputs by batch or donor when comparing conditions.
Cells are split into chunks of at most
MAX_ENCODE_CELLS_PER_REQUESTcells, which are encoded in parallel.- Parameters:
- Return type:
- Returns:
NumPy array of per-cell embeddings with shape
(num_cells, latent_dim).