Run Pan-human Azimuth annotation locally

This function runs the Pan-human Azimuth model on a Seurat object to annotate cell types, via reticulate and the panhumanpy Python package. We recommend using the CloudAzimuth function, which runs cloud-based annotation, can handle large datasets, and performs robust error handling.

Usage

ANNotate(
  query_obj,
  feature_names_col = NULL,
  annotation_pipeline = "supervised",
  eval_batch_size = 8192L,
  normalization_override = FALSE,
  norm_check_batch_size = 100L,
  output_mode = "minimal",
  refine_labels = TRUE,
  map_to_cl = NULL,
  include_cl_id = FALSE,
  extract_embeddings = TRUE,
  umap_embeddings = TRUE,
  n_neighbors = 30L,
  n_components = 2L,
  metric = "cosine",
  min_dist = 0.3,
  umap_lr = 1,
  umap_seed = 42L,
  spread = 1,
  verbose = TRUE,
  init = "spectral",
  model_version = "v1",
  process_obj = TRUE,
  cutoff_abs = 5,
  cutoff_frac = 0.001,
  assay = NULL
)

Arguments

  • query_obj:

    Seurat object to annotate

  • feature_names_col:

    Column name for feature names

  • annotation_pipeline:

    Set to ‘supervised’ as a default

  • eval_batch_size:

    Evaluation batch size

  • normalization_override:

    Whether to override normalization

  • norm_check_batch_size:

    Batch size to inspect normalization of data

  • output_mode:

    Output mode for annotated cell metadata

  • refine_labels:

    Whether to refine labels

  • map_to_cl:

    One or more annotation columns to map to Cell Ontology labels

  • include_cl_id:

    Whether to add Cell Ontology IDs to the output metadata

  • extract_embeddings:

    Whether to extract Azimuth embeddings

  • umap_embeddings:

    Whether to include UMAP of Azimuth embeddings

  • n_neighbors:

    Number of neighbors for UMAP

  • n_components:

    Number of components for UMAP

  • metric:

    Distance metric for UMAP

  • min_dist:

    Minimum distance for UMAP

  • umap_lr:

    Learning rate for UMAP

  • umap_seed:

    Seed for UMAP

  • spread:

    Spread parameter for UMAP

  • verbose:

    Whether to show progress

  • init:

    Initialization method for UMAP

  • model_version:

    Version of the model to use (default: ‘v1’)

  • process_obj:

    Whether to process the object

  • cutoff_abs:

    Absolute cutoff for label filtering

  • cutoff_frac:

    Fractional cutoff for label filtering

  • assay:

    Assay to use for annotation

Value

Annotated Seurat object

Details

This function requires the panhumanpy Python package to be installed and accessible via reticulate.