workflows/annotation/celltypist
Description
Cell type annotation workflow by performing lognormalization of the raw counts layer followed by cell type annotation with CellTypist.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input -i | file required | The input (query) data to be labeled. Should be a .h5mu file. |
--modality | string | Which modality to process. |
--input_layer | string | The layer in the input data containing raw counts, if .X is not to be used. |
--input_var_gene_names | string | The name of the adata var column in the input data containing gene names; when no gene_name_layer is provided, the var index will be used. |
--input_reference_gene_overlap | integer | The minimum number of genes present in both the reference and query datasets. |
--sanitize_ensembl_ids | boolean | Whether to sanitize ensembl ids by removing version numbers. |
Reference
Name | Type & Properties | Description |
|---|---|---|
--reference | file | The reference data to train the CellTypist classifiers on. Only required if a pre-trained --model is not provided. |
--reference_layer | string | The layer in the reference data containing raw counts, if .X is not to be used. |
--reference_obs_target | string | The name of the adata obs column in the reference data containing cell type annotations. |
--reference_var_gene_names | string | The name of the adata var column in the reference data containing gene names; when no gene_name_layer is provided, the var index will be used. |
--reference_var_input | string | .var column containing highly variable genes. If not provided, genes will not be subset. |
Model arguments
Name | Type & Properties | Description |
|---|---|---|
--model | file | Pretrained model in pkl format. If not provided, the model will be trained on the reference data and --reference should be provided. |
--feature_selection | boolean | Whether to perform feature selection. |
--majority_voting | boolean | Whether to refine the predicted labels by running the majority voting classifier after over-clustering. |
--C | double | Inverse of regularization strength in logistic regression. |
--max_iter | integer | Maximum number of iterations before reaching the minimum of the cost function. |
--use_SGD | boolean_true | Whether to use the stochastic gradient descent algorithm. |
--min_prop | double | "For the dominant cell type within a subcluster, the minimum proportion of cells required to support naming of the subcluster by this cell type. Ignored if majority_voting is set to False. Subcluster that fails to pass this proportion threshold will be assigned 'Heterogeneous'." |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file output | Output h5mu file. |
--output_obs_predictions | string | In which `.obs` slots to store the predicted information. |
--output_obs_probability | string | In which `.obs` slots to store the probability of the predictions. |
--output_compression | string | Compression format to use for the output AnnData and/or Mudata H5 files. By default no compression is applied. |
Compute
Name | Type & Properties | Description |
|---|---|---|
--device_type | string | Which implementation to use for the steps that have both a CPU and a GPU variant (normalization, log1p, scaling, highly variable features, PCA, neighbors, BBKNN, Harmony, Leiden clustering and UMAP): * `cpu` (default): the scanpy implementation. * `gpu`: the rapids-singlecell implementation from the `openpipeline_rapids` package. Selecting `gpu` requires a CUDA-capable NVIDIA GPU on every executor that runs a GPU-labelled process; there is no automatic fallback to CPU. The GPU processes also need the container runtime to be given access to the devices, which is done by adding `-c src/workflows/utils/gpu.config` to the Nextflow command. |
--managed_memory | boolean_true | Only used with `--device_type gpu`. Allocate GPU memory with RMM managed memory from the start. Managed memory lets data that does not fit in VRAM spill to host RAM, at the cost of speed. By default, each GPU step runs with regular GPU memory and only switches to managed memory, retrying once, if the GPU runs out of memory. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
input_reference_gene_overlap: [ 100 ]
sanitize_ensembl_ids: [ true ]
reference_obs_target: [ "cell_ontology_class" ]
reference_var_input: [ "filter_with_hvg" ]
feature_selection: [ false ]
majority_voting: [ false ]
C: [ 1 ]
max_iter: [ 1000 ]
min_prop: [ 0 ]
output: "$id.$key.output.h5mu"
output_obs_predictions: [ "celltypist_pred" ]
output_obs_probability: [ "celltypist_probability" ]
device_type: [ "cpu" ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v5.0.0 \
-main-script target/nextflow/workflows/annotation/celltypist/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
workflows/annotation/celltypistopenpipeline v5.0.0