annotate/azimuth_panhuman
Description
Automated cell type annotation using Pan-human Azimuth, a neural network
pre-trained on a pan-human single-cell atlas by the Satija lab.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input -i | file required | The input (query) data to be annotated. Should be a .h5mu file. |
--modality | string | Which modality to process. |
--input_layer | string | The layer in the input data containing raw (unnormalized) counts. Azimuth performs its own normalization internally and expects integer counts; if not provided, `.X` is used. |
--input_var_gene_names | string | The name of the .var column in the input data containing gene symbols. The Azimuth model was trained on gene symbols rather than Ensembl IDs, so this column must contain gene symbols for the model to work correctly. |
--input_reference_gene_overlap | integer | The minimum number of genes required to be present in both the query dataset and the Azimuth reference gene panel. Genes in the reference panel that are absent from the query are silently zero-filled by Azimuth, so too little overlap produces unreliable predictions rather than an outright failure; this argument turns that situation into an explicit error. |
Model
Name | Type & Properties | Description |
|---|---|---|
--model | file | Path to a pre-downloaded Azimuth inference model (a `.keras` file, as published on Zenodo: https://zenodo.org/records/20401417). When provided, the model is used instead of downloading it, for offline component run. The file must match `--model_version`. If not provided, the weights are downloaded automatically on first use. |
--model_version | string | Which version of the pre-trained Azimuth model to use. Model weights are versioned separately from the panhumanpy package; currently available versions are 'v0' and 'v1' ('v1' additionally applies confidence calibration). |
--eval_batch_size | integer | Batch size used during model inference and minibatched annotation. |
--normalization_override | boolean_true | Skip Azimuth's internal normalization and treat `--input_layer` (or `.X`) as already log-normalized, instead of raw counts. Counts must be normalized to a target sum of 10000 per cell (i.e. `sc.pp.normalize_total(target_sum=1e4)` followed by `sc.pp.log1p()`); the component verifies this and raises an error if the data does not match. Without this flag, the component instead verifies that the data looks like raw (integer) counts, rather than silently normalizing already-normalized data a second time. Only set this flag if your data is already normalized in this way. |
--norm_check_batch_size | integer | Number of cells sampled to determine whether the input counts are already normalized. |
--refine_labels | boolean | Whether to post-process the raw hierarchical predictions into broad, medium and fine labels with consistent granularity across cell types, stored in `--output_obs_predictions_broad`, `--output_obs_predictions_medium` and `--output_obs_predictions_fine`. |
Embeddings and UMAP
Name | Type & Properties | Description |
|---|---|---|
--extract_embeddings | boolean | Whether to extract the Azimuth neural network embeddings for each cell. |
--umap_embeddings | boolean | Whether to compute a UMAP projection of the extracted embeddings. Requires `--extract_embeddings true`. |
--umap_n_neighbors | integer | Number of neighbors to consider for each point in the UMAP. |
--umap_n_components | integer | Dimensionality of the UMAP projection. |
--umap_metric | string | Distance metric to use for the UMAP. |
--umap_min_dist | double | Minimum distance between points in the UMAP projection. |
--umap_lr | double | UMAP learning rate. |
--umap_seed | integer | Random seed for reproducibility of the UMAP. |
--umap_spread | double | Scales the effective scale of embedded points in the UMAP. |
--umap_init | string | Initialization method for the UMAP. |
--umap_verbose | boolean | Whether to print UMAP progress to the log. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file output | Output h5mu file. |
--output_obs_predictions | string | In which `.obs` column to store the most granular ('final level') predicted cell type label. Only the `.obs` columns set with the `--output_obs_*` arguments are added; other columns produced by Azimuth are not stored. |
--output_obs_probability | string | In which `.obs` column to store the confidence score of the `--output_obs_predictions` label (calibrated for `--model_version v1`). |
--output_obs_predictions_broad | string | In which `.obs` column to store the refined broad-granularity cell type label. Only used if `--refine_labels` is set. |
--output_obs_predictions_medium | string | In which `.obs` column to store the refined medium-granularity cell type label. Only used if `--refine_labels` is set. |
--output_obs_predictions_fine | string | In which `.obs` column to store the refined fine-granularity cell type label. Only used if `--refine_labels` is set. |
--output_obsm_embedding | string | In which `.obsm` slot to store the extracted Azimuth embeddings. Only used if `--extract_embeddings` is set. |
--output_obsm_umap | string | In which `.obsm` slot to store the UMAP projection. Only used if `--umap_embeddings` is set. |
--output_compression | string | Compression format to use for the output AnnData and/or Mudata H5 files. By default no compression is applied. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
input_var_gene_names: [ "gene_symbol" ]
input_reference_gene_overlap: [ 100 ]
model_version: [ "v1" ]
eval_batch_size: [ 8192 ]
norm_check_batch_size: [ 100 ]
refine_labels: [ true ]
extract_embeddings: [ true ]
umap_embeddings: [ true ]
umap_n_neighbors: [ 30 ]
umap_n_components: [ 2 ]
umap_metric: [ "cosine" ]
umap_min_dist: [ 0.3 ]
umap_lr: [ 1 ]
umap_seed: [ 42 ]
umap_spread: [ 1 ]
umap_init: [ "spectral" ]
umap_verbose: [ false ]
output: "$id.$key.output.h5mu"
output_obs_predictions: [ "azimuth_pred" ]
output_obs_probability: [ "azimuth_probability" ]
output_obs_predictions_broad: [ "azimuth_broad" ]
output_obs_predictions_medium: [ "azimuth_medium" ]
output_obs_predictions_fine: [ "azimuth_fine" ]
output_obsm_embedding: [ "X_azimuth" ]
output_obsm_umap: [ "X_azimuth_umap" ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v5.0.0 \
-main-script target/nextflow/annotate/azimuth_panhuman/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
annotate/azimuth_panhumanopenpipeline v5.0.0
Uses
0 relationships
No component dependencies found.