annotate/random_forest_annotation
Description
Automated cell type annotation tool for scRNA-seq datasets on the basis of random forest.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input | 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 to be used for cell type annotation 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 to be used for cell type annotation if .X is not to be used. Data are expected to be processed in the same way as the --input query dataset. |
--reference_obs_target | string required | Key in obs field of reference modality with cell-type information. |
--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. By default, do not subset genes. |
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 objects. By default no compression is applied. |
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. |
--n_estimators | integer | Number of trees in the random forest. |
--max_depth | integer | Maximum depth of the trees in the random forest. If not provided, the nodes are expanded until all leaves only contain a single sample. |
--criterion | string | The function to measure the quality of a split. |
--class_weight | string | Weights associated with classes. The `balanced` mode uses the values of y to automatically adjust weights inversely proportional to class frequencies in the input data. The `balanced_subsample` mode is the same as `balanced` except that weights are computed based on the bootstrap sample for every tree grown. The `uniform` mode gives all classes a weight of one. |
--max_features | string | The number of features to consider when looking for the best split. The value can either be a positive integer or one of `sqrt`, `log2` or `all`. If integer: consider max_features features at each split. If `sqrt`: max_features is the squareroot of all input features. If `log2`: max_features is the log2 of all input features. If `all`: max features equals all input features. |
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 ]
output: "$id.$key.output.h5mu"
output_obs_predictions: [ "random_forest_pred" ]
output_obs_probability: [ "random_forest_probability" ]
n_estimators: [ 100 ]
criterion: [ "gini" ]
class_weight: [ "balanced_subsample" ]
max_features: [ "200" ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v4.0.1 \
-main-script target/nextflow/annotate/random_forest_annotation/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
annotate/random_forest_annotationopenpipeline v4.0.1
Uses
0 relationships
No component dependencies found.