annotate/azimuth
Description
Reference-based cell type annotation using Seurat's Azimuth (RunAzimuth()).
Unlike annotate/azimuth_panhuman (which uses a single fixed pan-human neural network
with no reference choice), this component lets you pick which annotated
reference dataset to map the query onto: one of the curated Azimuth
references (e.g. "pbmcref", "bonemarrowref", "lungref"; see
https://azimuth.hubmapconsortium.org/references/ for the full, up to date
list), or a local directory containing a custom "ref.Rds" + "idx.annoy"
reference pair.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input -i | file required | The input (query) data to be annotated. Should be an .rds file containing a Seurat object with raw (unnormalized) counts in the layer specified by `--input_layer`. |
--assay | string | Name of the Seurat assay in the input object to run the annotation on. |
--input_layer | string | Layer of `--assay` containing the raw (unnormalized) counts. RunAzimuth() normalizes these internally using SCTransform. |
--input_var_gene_names | string | Column in the feature metadata of `--assay` containing gene symbols. If not provided, the feature names of the assay are used. Azimuth references use gene symbols; when the query features are Ensembl IDs, Azimuth converts them using a homolog table downloaded at runtime. |
--input_reference_gene_overlap | integer | Minimum number of genes that must overlap between the query and the reference for the mapping to be performed. |
Reference
Name | Type & Properties | Description |
|---|---|---|
--reference | string required | Name of a curated Azimuth reference, downloaded and installed automatically on first use via SeuratData. See https://azimuth.hubmapconsortium.org/references/ for a description of each reference. Set to "custom" to use a local reference instead, provided via `--custom_reference`. |
--custom_reference | file | Path to a local directory containing a "ref.Rds" and "idx.annoy" file pair for a custom reference. If provided, `--reference` must be set to "custom". |
--annotation_levels | string multiple | Which annotation levels (columns in the reference's metadata, e.g. "celltype.l1", "celltype.l2") to transfer. If not provided, all annotation levels available in the reference are transferred. |
--do_adt | boolean_true | Whether to impute a protein (ADT) assay from the reference, if the reference includes antibody-derived tag data. |
Mapping arguments
Name | Type & Properties | Description |
|---|---|---|
--k_weight | integer | Number of neighbors to consider when weighting anchors during label/embedding transfer. |
--n_trees | integer | Number of trees used when building the annoy index for neighbor search. |
--mapping_score_k | integer | Number of neighbors used to compute the per-cell mapping score. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output .rds file containing the input Seurat object, extended with the Azimuth results: the predicted labels, prediction scores and mapping score in the cell metadata (see `--output_obs_*`), the reference projected UMAP and integrated reductions (see `--output_obsm_*`), and a `prediction.score.<level>` assay per annotation level (plus an `impADT` assay when `--do_adt` is set). |
--output_compression | string | Compression used when writing the output .rds file. |
--output_obs_predictions | string multiple | In which cell metadata columns to store the predicted labels. If provided, `--annotation_levels` must be provided as well, and both must have the same length. If not provided, defaults to `azimuth_pred_<level>`, with "." in the level name replaced by "_". |
--output_obs_probability | string multiple | In which cell metadata columns to store the prediction scores. If provided, `--annotation_levels` must be provided as well, and both must have the same length. If not provided, defaults to `azimuth_probability_<level>`, with "." in the level name replaced by "_". |
--output_obs_mapping_score | string | In which cell metadata column to store the per-cell mapping score. |
--output_obsm_umap | string | Name of the reduction in which to store the query embedding projected onto the reference UMAP. |
--output_obsm_integrated | string | Name of the reduction in which to store the integrated (reference-projected) embedding. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
assay: [ "RNA" ]
input_layer: [ "counts" ]
input_reference_gene_overlap: [ 100 ]
k_weight: [ 50 ]
n_trees: [ 20 ]
mapping_score_k: [ 100 ]
output: "$id.$key.output.rds"
output_compression: [ "gzip" ]
output_obs_mapping_score: [ "azimuth_mapping_score" ]
output_obsm_umap: [ "X_azimuth_umap" ]
output_obsm_integrated: [ "X_integrated_azimuth" ]
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/main.nf \
-params-file params.yaml Relationships
Used by
1 relationships
Current component
annotate/azimuthopenpipeline v5.0.0
Uses
0 relationships
No component dependencies found.