diff --git a/README.md b/README.md index f66ef10..c395f68 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ The folder may contain other folders of FAST5 or POD5 files and all files will b |--------------------------|------|-------------|------|---------| | basecaller_cfg | string | Name of the model to use for converting signal. | Required for basecalling. The model list only shows models that are compatible with this workflow. | | | duplex | boolean | Run the basecaller in duplex mode. | By default the workflow conducts simplex basecalling. If you used a chemistry and flowcell combination that supports duplex reads, you may switch this option on. This option is incompatible with the watch_path option due to the way the input files must be traversed in order to find duplex pairs. | False | -| remora_cfg | string | Name of the model to use for calling modified bases. | Required for calling modified bases while basecalling. The model list only shows models that are compatible with this workflow. | | +| remora_cfg | string
(array) | Name of the model to use for calling modified bases. | Required for calling modified bases while basecalling. The model list only shows models that are compatible with this workflow. Provide multiple models as an array of names via the `-params-file` argument. | | | dorado_ext | string | File extension for Dorado inputs. | Set this to fast5 if you have not converted your fast5 to pod5. It is recommended to [convert existing fast5 files to pod5 for use with Dorado](https://github.com/nanoporetech/pod5-file-format/blob/master/python/README.md#pod5-convert-from-fast5). | pod5 | | poly_a_config | string | Provide this TOML file to turn on and configure dorado poly(A) calling. | This TOML file allows you to turn on and configure poly(A) tail calling options in dorado. This feature is described [here](https://github.com/nanoporetech/dorado?tab=readme-ov-file#polya-tail-estimation). | | | barcode_kit | string | Name of the kit to use for barcoding. Demultiplex the data. | Providing a kit here will instruct the workflow to demultiplex your 'pass' data to BAM files which can be found in your output dir under the folder 'demuxed' in a struture reminissent of MinKNOW. | | diff --git a/lib/signal/ingress.nf b/lib/signal/ingress.nf index b266319..94076b3 100644 --- a/lib/signal/ingress.nf +++ b/lib/signal/ingress.nf @@ -51,7 +51,7 @@ process dorado { path("${chunk_idx}.ubam"), emit: ubams path("converted/*.pod5"), emit: converted_pod5s, optional: true script: - def remora_model = remora_model_override ? "remora_model" : "\${DRD_MODELS_PATH}/${remora_cfg}" + def remora_model = remora_cfg instanceof String ? "\${DRD_MODELS_PATH}/${remora_cfg}" : remora_cfg.collect { "\${DRD_MODELS_PATH}/$it" }.join(',') def remora_args = (params.basecaller_basemod_threads > 0 && (params.remora_cfg || remora_model_override)) ? "--modified-bases-models ${remora_model}" : '' def model_arg = basecaller_model_override ? "dorado_model" : "\${DRD_MODELS_PATH}/${basecaller_cfg}" def basecaller_args = params.basecaller_args ?: '' diff --git a/nextflow_schema.json b/nextflow_schema.json index 00f3769..6345e0d 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -118,42 +118,87 @@ }, "remora_cfg": { "title": "Modified basecalling model configuration", - "type": "string", "description": "Name of the model to use for calling modified bases.", - "help_text": "Required for calling modified bases while basecalling. The model list only shows models that are compatible with this workflow.", - "enum": [ - "dna_r10.4.1_e8.2_260bps_fast@v4.1.0_5mCG_5hmCG@v2", - "dna_r10.4.1_e8.2_260bps_hac@v4.1.0_5mCG_5hmCG@v2", - "dna_r10.4.1_e8.2_260bps_sup@v4.1.0_5mCG_5hmCG@v2", - "dna_r10.4.1_e8.2_400bps_fast@v4.1.0_5mCG_5hmCG@v2", - "dna_r10.4.1_e8.2_400bps_fast@v4.2.0_5mCG_5hmCG@v2", - "dna_r10.4.1_e8.2_400bps_hac@v4.1.0_5mCG_5hmCG@v2", - "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_5mCG_5hmCG@v1", - "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_5mC_5hmC@v1", - "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_6mA@v2", - "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_4mC_5mC@v1", - "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mCG_5hmCG@v1", - "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mC_5hmC@v1", - "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_6mA@v1", - "dna_r10.4.1_e8.2_400bps_sup@v4.1.0_5mCG_5hmCG@v2", - "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mCG_5hmCG@v1", - "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mC_5hmC@v1", - "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_6mA@v2", - "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_4mC_5mC@v1", - "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mCG_5hmCG@v1", - "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mC_5hmC@v1", - "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_6mA@v1", - "dna_r9.4.1_e8_fast@v3.4_5mCG@v0.1", - "dna_r9.4.1_e8_fast@v3.4_5mCG_5hmCG@v0", - "dna_r9.4.1_e8_hac@v3.3_5mCG@v0.1", - "dna_r9.4.1_e8_hac@v3.3_5mCG_5hmCG@v0", - "dna_r9.4.1_e8_sup@v3.3_5mCG@v0.1", - "dna_r9.4.1_e8_sup@v3.3_5mCG_5hmCG@v0", - "rna004_130bps_hac@v5.0.0_m6A@v1", - "rna004_130bps_hac@v5.0.0_pseU@v1", - "rna004_130bps_sup@v3.0.1_m6A_DRACH@v1", - "rna004_130bps_sup@v5.0.0_m6A@v1", - "rna004_130bps_sup@v5.0.0_pseU@v1" + "help_text": "Required for calling modified bases while basecalling. The model list only shows models that are compatible with this workflow. Provide multiple models as an array of names via the -params-file argument.", + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "dna_r10.4.1_e8.2_260bps_fast@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_260bps_hac@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_260bps_sup@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_fast@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_fast@v4.2.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_hac@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_5mCG_5hmCG@v1", + "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_5mC_5hmC@v1", + "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_6mA@v2", + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_4mC_5mC@v1", + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mCG_5hmCG@v1", + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mC_5hmC@v1", + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_6mA@v1", + "dna_r10.4.1_e8.2_400bps_sup@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mCG_5hmCG@v1", + "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mC_5hmC@v1", + "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_6mA@v2", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_4mC_5mC@v1", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mCG_5hmCG@v1", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mC_5hmC@v1", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_6mA@v1", + "dna_r9.4.1_e8_fast@v3.4_5mCG@v0.1", + "dna_r9.4.1_e8_fast@v3.4_5mCG_5hmCG@v0", + "dna_r9.4.1_e8_hac@v3.3_5mCG@v0.1", + "dna_r9.4.1_e8_hac@v3.3_5mCG_5hmCG@v0", + "dna_r9.4.1_e8_sup@v3.3_5mCG@v0.1", + "dna_r9.4.1_e8_sup@v3.3_5mCG_5hmCG@v0", + "rna004_130bps_hac@v5.0.0_m6A@v1", + "rna004_130bps_hac@v5.0.0_pseU@v1", + "rna004_130bps_sup@v3.0.1_m6A_DRACH@v1", + "rna004_130bps_sup@v5.0.0_m6A@v1", + "rna004_130bps_sup@v5.0.0_pseU@v1" + ] + }, + "uniqueItems": true + }, + { + "type": "string", + "enum": [ + "dna_r10.4.1_e8.2_260bps_fast@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_260bps_hac@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_260bps_sup@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_fast@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_fast@v4.2.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_hac@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_5mCG_5hmCG@v1", + "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_5mC_5hmC@v1", + "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_6mA@v2", + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_4mC_5mC@v1", + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mCG_5hmCG@v1", + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mC_5hmC@v1", + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_6mA@v1", + "dna_r10.4.1_e8.2_400bps_sup@v4.1.0_5mCG_5hmCG@v2", + "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mCG_5hmCG@v1", + "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mC_5hmC@v1", + "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_6mA@v2", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_4mC_5mC@v1", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mCG_5hmCG@v1", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mC_5hmC@v1", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_6mA@v1", + "dna_r9.4.1_e8_fast@v3.4_5mCG@v0.1", + "dna_r9.4.1_e8_fast@v3.4_5mCG_5hmCG@v0", + "dna_r9.4.1_e8_hac@v3.3_5mCG@v0.1", + "dna_r9.4.1_e8_hac@v3.3_5mCG_5hmCG@v0", + "dna_r9.4.1_e8_sup@v3.3_5mCG@v0.1", + "dna_r9.4.1_e8_sup@v3.3_5mCG_5hmCG@v0", + "rna004_130bps_hac@v5.0.0_m6A@v1", + "rna004_130bps_hac@v5.0.0_pseU@v1", + "rna004_130bps_sup@v3.0.1_m6A_DRACH@v1", + "rna004_130bps_sup@v5.0.0_m6A@v1", + "rna004_130bps_sup@v5.0.0_pseU@v1" + ] + } ] }, "dorado_ext": {