labels_transfer/knn
Description
Performs label transfer from reference to query using KNN classifier
Input dataset (query) arguments
Name | Type & Properties | Description |
|---|---|---|
--input | file required | The query data to transfer the labels to. Should be a .h5mu file. |
--modality | string | Which modality to use. |
--input_obsm_features | string | The `.obsm` key of the embedding to use for the classifier's inference. If not provided, the `.X` slot will be used instead. Make sure that embedding was obtained in the same way as the reference embedding (e.g. by the same model or preprocessing). |
Reference dataset arguments
Name | Type & Properties | Description |
|---|---|---|
--reference | file | The reference data to train classifiers on. |
--reference_obsm_features | string required | The `.obsm` key of the embedding to use for the classifier's training. Make sure that embedding was obtained in the same way as the query embedding (e.g. by the same model or preprocessing). |
--reference_obs_targets | string multiple | The `.obs` key of the target labels to tranfer. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | The query data in .h5mu format with predicted labels transfered from the reference. |
--output_obs_predictions | string multiple | In which `.obs` slots to store the predicted information. If provided, must have the same length as `--reference_obs_targets`. If empty, will default to the `reference_obs_targets` combined with the `"_pred"` suffix. |
--output_obs_uncertainty | string multiple | In which `.obs` slots to store the uncertainty of the predictions. If provided, must have the same length as `--reference_obs_targets`. If empty, will default to the `reference_obs_targets` combined with the `"_uncertainty"` suffix. |
--output_uns_parameters | string | The `.uns` key to store additional information about the parameters used for the label transfer. |
Learning parameters
Name | Type & Properties | Description |
|---|---|---|
--n_neighbors -k | integer required | Number of nearest neighbors to use for classification |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
reference_obsm_features: [ "X_integrated_scanvi" ]
reference_obs_targets:
[
"ann_level_1",
"ann_level_2",
"ann_level_3",
"ann_level_4",
"ann_level_5",
"ann_finest_level"
]
output: "$id.$key.output"
output_uns_parameters: [ "labels_transfer" ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision 1.0.3 \
-main-script target/nextflow/labels_transfer/knn/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
labels_transfer/knnopenpipeline 1.0.3
Uses
0 relationships
No component dependencies found.