|
| 1 | +name: "celltypist" |
| 2 | +namespace: "workflows/annotation" |
| 3 | +scope: "public" |
| 4 | +description: "Cell type annotation workflow by performing lognormalization of the raw counts layer followed by cell type annotation with CellTypist." |
| 5 | +info: |
| 6 | + name: "CellTypist annotation" |
| 7 | + test_dependencies: |
| 8 | + - name: celltypist_test |
| 9 | + namespace: test_workflows/annotation |
| 10 | +authors: |
| 11 | + - __merge__: /src/authors/dorien_roosen.yaml |
| 12 | + roles: [ author, maintainer ] |
| 13 | + - __merge__: /src/authors/weiwei_schultz.yaml |
| 14 | + roles: [ contributor ] |
| 15 | + |
| 16 | +argument_groups: |
| 17 | + - name: Inputs |
| 18 | + description: Input dataset (query) arguments |
| 19 | + arguments: |
| 20 | + - name: "--input" |
| 21 | + alternatives: [-i] |
| 22 | + type: file |
| 23 | + description: The input (query) data to be labeled. Should be a .h5mu file. |
| 24 | + direction: input |
| 25 | + required: true |
| 26 | + example: input.h5mu |
| 27 | + - name: "--modality" |
| 28 | + description: Which modality to process. |
| 29 | + type: string |
| 30 | + default: "rna" |
| 31 | + required: false |
| 32 | + - name: "--input_layer" |
| 33 | + type: string |
| 34 | + description: The layer in the input data containing raw counts, if .X is not to be used. |
| 35 | + - name: "--input_var_gene_names" |
| 36 | + type: string |
| 37 | + required: false |
| 38 | + description: | |
| 39 | + 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. |
| 40 | + - name: "--input_reference_gene_overlap" |
| 41 | + type: integer |
| 42 | + default: 100 |
| 43 | + min: 1 |
| 44 | + description: | |
| 45 | + The minimum number of genes present in both the reference and query datasets. |
| 46 | + |
| 47 | + - name: Reference |
| 48 | + description: Arguments related to the reference dataset. |
| 49 | + arguments: |
| 50 | + - name: "--reference" |
| 51 | + type: file |
| 52 | + description: "The reference data to train the CellTypist classifiers on. Only required if a pre-trained --model is not provided." |
| 53 | + example: reference.h5mu |
| 54 | + direction: input |
| 55 | + required: false |
| 56 | + - name: "--reference_layer" |
| 57 | + type: string |
| 58 | + description: The layer in the reference data containing raw counts, if .X is not to be used. |
| 59 | + required: false |
| 60 | + - name: "--reference_obs_target" |
| 61 | + type: string |
| 62 | + description: The name of the adata obs column in the reference data containing cell type annotations. |
| 63 | + default: "cell_ontology_class" |
| 64 | + - name: "--reference_var_gene_names" |
| 65 | + type: string |
| 66 | + required: false |
| 67 | + description: | |
| 68 | + 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. |
| 69 | + - name: "--reference_var_input" |
| 70 | + type: string |
| 71 | + required: false |
| 72 | + description: | |
| 73 | + .var column containing highly variable genes. By default, do not subset genes. |
| 74 | +
|
| 75 | + - name: Model arguments |
| 76 | + description: Model arguments. |
| 77 | + arguments: |
| 78 | + - name: "--model" |
| 79 | + type: file |
| 80 | + description: "Pretrained model in pkl format. If not provided, the model will be trained on the reference data and --reference should be provided." |
| 81 | + required: false |
| 82 | + example: pretrained_model.pkl |
| 83 | + - name: "--feature_selection" |
| 84 | + type: boolean |
| 85 | + description: "Whether to perform feature selection." |
| 86 | + default: false |
| 87 | + - name: "--majority_voting" |
| 88 | + type: boolean |
| 89 | + description: "Whether to refine the predicted labels by running the majority voting classifier after over-clustering." |
| 90 | + default: false |
| 91 | + - name: "--C" |
| 92 | + type: double |
| 93 | + description: "Inverse of regularization strength in logistic regression." |
| 94 | + default: 1.0 |
| 95 | + - name: "--max_iter" |
| 96 | + type: integer |
| 97 | + description: "Maximum number of iterations before reaching the minimum of the cost function." |
| 98 | + default: 1000 |
| 99 | + - name: "--use_SGD" |
| 100 | + type: boolean_true |
| 101 | + description: "Whether to use the stochastic gradient descent algorithm." |
| 102 | + - name: "--min_prop" |
| 103 | + type: double |
| 104 | + description: | |
| 105 | + "For the dominant cell type within a subcluster, the minimum proportion of cells required to |
| 106 | + support naming of the subcluster by this cell type. Ignored if majority_voting is set to False. |
| 107 | + Subcluster that fails to pass this proportion threshold will be assigned 'Heterogeneous'." |
| 108 | + default: 0 |
| 109 | + |
| 110 | + - name: Outputs |
| 111 | + description: Output arguments. |
| 112 | + arguments: |
| 113 | + - name: "--output" |
| 114 | + type: file |
| 115 | + description: Output h5mu file. |
| 116 | + direction: output |
| 117 | + example: output.h5mu |
| 118 | + - name: "--output_obs_predictions" |
| 119 | + type: string |
| 120 | + default: celltypist_pred |
| 121 | + required: false |
| 122 | + description: | |
| 123 | + In which `.obs` slots to store the predicted information. |
| 124 | + - name: "--output_obs_probability" |
| 125 | + type: string |
| 126 | + default: celltypist_probability |
| 127 | + required: false |
| 128 | + description: | |
| 129 | + In which `.obs` slots to store the probability of the predictions. |
| 130 | + __merge__: [., /src/base/h5_compression_argument.yaml] |
| 131 | + |
| 132 | +dependencies: |
| 133 | + - name: transform/normalize_total |
| 134 | + - name: transform/log1p |
| 135 | + - name: transform/delete_layer |
| 136 | + - name: annotate/celltypist |
| 137 | + alias: celltypist_component |
| 138 | + |
| 139 | +resources: |
| 140 | + - type: nextflow_script |
| 141 | + path: main.nf |
| 142 | + entrypoint: run_wf |
| 143 | + |
| 144 | +test_resources: |
| 145 | + - type: nextflow_script |
| 146 | + path: test.nf |
| 147 | + entrypoint: test_wf |
| 148 | + - path: /resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_mms.h5mu |
| 149 | + - path: /resources_test/annotation_test_data/TS_Blood_filtered.h5mu |
| 150 | + - path: /resources_test/annotation_test_data/celltypist_model_Immune_All_Low.pkl |
| 151 | + - path: /resources_test/annotation_test_data/demo_2000_cells.h5mu |
| 152 | + |
| 153 | +runners: |
| 154 | + - type: nextflow |
0 commit comments