annotate/consensus_vote
Description
Combines cell type predictions from multiple annotation methods into a single consensus prediction using a weighted majority vote.
For each cell, each method votes for its predicted cell type, optionally weighted by the probability score and/or a per-method weight.
The consensus prediction is the cell type with the highest total weighted vote.
Note that this method does not leverage pre-existing ontology or perform any reconciliation of cell type labels across methods, so the same cell type may be represented by different labels in different methods and will be treated as distinct cell types in the vote.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input | file required | Input h5mu file containing cell type predictions in .obs. |
--modality | string | Which modality to process. |
--input_obs_predictions | string required multiple | One or more .obs column names containing cell type predictions (labels) from different annotation methods. |
--input_obs_probabilities | string multiple | One or more .obs column names containing prediction probability scores, one per method in --input_obs_predictions. When provided, each method's vote is scaled by the probability score for that cell (in addition to any per-method --weights). Must be the same length as --input_obs_predictions. |
--tie_label | string | Label to assign when two or more cell types receive equal votes. If not provided, tied cells are assigned None (missing value). |
--weights | double multiple | Per-method weights for the consensus vote. Must be the same length as --input_obs_predictions when provided. Weights are normalized to sum to 1 before use. If not provided, all methods are weighted equally. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output -o | file output | Output h5mu file. |
--output_obs_predictions | string | In which `.obs` slot to store the consensus predicted cell type. |
--output_obs_score | string | In which `.obs` slot to store the consensus score, defined as the fraction of total weight assigned to the winning cell type. |
--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" ]
output: "$id.$key.output.h5mu"
output_obs_predictions: [ "consensus_pred" ]
output_obs_score: [ "consensus_score" ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v4.2.0 \
-main-script target/nextflow/annotate/consensus_vote/main.nf \
-params-file params.yaml Relationships
Used by
No components use this component.
Current component
Uses
No component dependencies found.