Description
Run multiple annotation methods from OpenPipeline in parallel on the same
preprocessed query h5mu input, then merge each method's predictions
(predicted labels and probabilities in .obs, and integrated embeddings in
.obsm for the integration-based methods) back into a single output h5mu.
These are label-projection (reference-based) methods: they transfer labels from
a labelled --reference onto the query (CellTypist can alternatively use a
pretrained --celltypist_model). The reference is expected to be preprocessed in
the same way as the query.
Available annotation methods:
CellTypist
ScanVI with scArches
SingleR
SCVI integration followed by KNN label transfer
Harmony integration followed by KNN label transfer
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
id: "run"
modality: [ "rna" ]
input_layer_lognormalized: [ "log_normalized" ]
input_obs_batch_label: [ "sample_id" ]
input_reference_gene_overlap: [ 100 ]
sanitize_ensembl_ids: [ true ]
reference_layer_lognormalized: [ "log_normalized" ]
reference_obs_batch_label: [ "sample_id" ]
reference_var_input: [ "filter_with_hvg" ]
reference_obs_label_unlabeled_category: [ "Unknown" ]
leiden_resolution: [ 1 ]
knn_weights: [ "uniform" ]
knn_n_neighbors: [ 15 ]
scvi_early_stopping_monitor: [ "elbo_validation" ]
scvi_early_stopping_patience: [ 45 ]
scvi_early_stopping_min_delta: [ 0 ]
scvi_reduce_lr_on_plateau: [ true ]
scvi_lr_factor: [ 0.6 ]
scvi_lr_patience: [ 30 ]
celltypist_majority_voting: [ false ]
celltypist_feature_selection: [ false ]
celltypist_C: [ 1 ]
celltypist_max_iter: [ 1000 ]
celltypist_use_SGD: [ false ]
celltypist_min_prop: [ 0 ]
harmony_knn_n_hvg: [ 2000 ]
harmony_knn_theta: [ 2 ]
scvi_knn_n_hvg: [ 2000 ]
singler_de_method: [ "classic" ]
singler_quantile: [ 0.8 ]
singler_fine_tune: [ true ]
singler_fine_tuning_threshold: [ 0.05 ]
singler_prune: [ true ]
celltypist_obs_predictions: [ "celltypist_pred" ]
celltypist_obs_probability: [ "celltypist_probability" ]
harmony_knn_obs_predictions: [ "harmony_knn_pred" ]
harmony_knn_obs_probability: [ "harmony_knn_probability" ]
harmony_knn_obsm_integrated: [ "X_integrated_harmony" ]
scanvi_scarches_obs_predictions: [ "scanvi_pred" ]
scanvi_scarches_obs_probability: [ "scanvi_probability" ]
scanvi_scarches_obsm_integrated: [ "X_integrated_scanvi" ]
scvi_knn_obs_predictions: [ "scvi_knn_pred" ]
scvi_knn_obs_probability: [ "scvi_knn_probability" ]
scvi_knn_obsm_integrated: [ "X_integrated_scvi" ]
singler_obs_predictions: [ "singler_pred" ]
singler_obs_probability: [ "singler_probability" ]
singler_obs_delta_next: [ "singler_delta_next" ]
singler_obs_pruned_predictions: [ "singler_pruned_labels" ]
singler_obsm_scores: [ "singler_scores" ]
output: "$id.$key.output.h5mu"
output_scanvi_model: "$id.$key.output_scanvi_model.scanvi_model"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline_composed.git \
-revision v0.2.1 \
-main-script target/nextflow/single_cell/parallel_annotation/main.nf \
-params-file params.yaml Name | Type & Properties |
|---|---|
--id | string required |
--input | file required |
--modality | string |
--input_layer | string |
--input_layer_lognormalized | string |
--input_obs_batch_label | string |
--input_var_gene_names | string |
--input_reference_gene_overlap | integer |
--sanitize_ensembl_ids | boolean |
--input_obs_categorical_covariates | string multiple |
--input_obs_numerical_covariates | string multiple |
Name | Type & Properties |
|---|---|
--annotation_methods | string required multiple |
Name | Type & Properties |
|---|---|
--reference | file |
--reference_layer | string |
--reference_layer_lognormalized | string |
--reference_obs_target | string |
--reference_obs_batch_label | string |
--reference_var_gene_names | string |
--reference_var_input | string |
--reference_obs_categorical_covariates | string multiple |
--reference_obs_numerical_covariates | string multiple |
--reference_obs_label_unlabeled_category | string |
Name | Type & Properties |
|---|---|
--leiden_resolution | double multiple |
Name | Type & Properties |
|---|---|
--knn_weights | string |
--knn_n_neighbors | integer |
Name | Type & Properties |
|---|---|
--scvi_early_stopping | boolean |
--scvi_early_stopping_monitor | string |
--scvi_early_stopping_patience | integer |
--scvi_early_stopping_min_delta | double |
--scvi_max_epochs | integer |
--scvi_reduce_lr_on_plateau | boolean |
--scvi_lr_factor | double |
--scvi_lr_patience | double |
Name | Type & Properties |
|---|---|
--celltypist_model | file |
--celltypist_majority_voting | boolean |
--celltypist_feature_selection | boolean |
--celltypist_C | double |
--celltypist_max_iter | integer |
--celltypist_use_SGD | boolean |
--celltypist_min_prop | double |
Name | Type & Properties |
|---|---|
--harmony_knn_n_hvg | integer |
--harmony_knn_pca_num_components | integer |
--harmony_knn_theta | double multiple |
Name | Type & Properties |
|---|---|
--scvi_knn_n_hvg | integer |
Name | Type & Properties |
|---|---|
--singler_input_obs_clusters | string |
--singler_de_method | string |
--singler_de_n_genes | integer |
--singler_quantile | double |
--singler_fine_tune | boolean |
--singler_fine_tuning_threshold | double |
--singler_prune | boolean |
Name | Type & Properties |
|---|---|
--celltypist_obs_predictions | string |
--celltypist_obs_probability | string |
--harmony_knn_obs_predictions | string |
--harmony_knn_obs_probability | string |
--harmony_knn_obsm_integrated | string |
--scanvi_scarches_obs_predictions | string |
--scanvi_scarches_obs_probability | string |
--scanvi_scarches_obsm_integrated | string |
--scvi_knn_obs_predictions | string |
--scvi_knn_obs_probability | string |
--scvi_knn_obsm_integrated | string |
--singler_obs_predictions | string |
--singler_obs_probability | string |
--singler_obs_delta_next | string |
--singler_obs_pruned_predictions | string |
--singler_obsm_scores | string |
Name | Type & Properties |
|---|---|
--output -o | file required output |
--output_compression | string |
--output_scanvi_model | file output |