From d451439cb77e5c7fc39a8da1c9a4d88bf3feba7b Mon Sep 17 00:00:00 2001 From: maxibor Date: Thu, 17 Mar 2022 11:30:44 +0100 Subject: [PATCH 1/2] update schema and change default string values to null instead of false --- nextflow.config | 62 ++++++++++++++++++++++---------------------- nextflow_schema.json | 21 ++++++++------- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/nextflow.config b/nextflow.config index 589d186f..eee164bf 100644 --- a/nextflow.config +++ b/nextflow.config @@ -9,18 +9,18 @@ params { // Pipeline Options // Many different input modalities can be provided at once - read_pairs = false - read_singles = false - csv_pairs = false - csv_singles = false - fastas = false - protein_fastas = false - sra = false + read_pairs = null + read_singles = null + csv_pairs = null + csv_singles = null + fastas = null + protein_fastas = null + sra = null - input = false + input = null // Parsing 10x bam files - tenx_tgz = false + tenx_tgz = null tenx_tags = "CB,CR,CY,XC,UB,UR,UY,AN,TR,XM,XB,RG,GN,GX,TX,NH,HI,AS,nM,RE,MM,pa,xf,fb,fr,fq,fx" tenx_cell_barcode_pattern = '(CB|XC):Z:([ACGT]+)(\\-1)?' tenx_molecular_barcode_pattern = '(UB|XB|XM):Z:([ACGT]+)' @@ -32,10 +32,10 @@ params { // Track abundance by default track_abundance = true // Number of hashes from each sample - sketch_num_hashes = false - sketch_num_hashes_log2 = false - sketch_scaled = false - sketch_scaled_log2 = false + sketch_num_hashes = null + sketch_num_hashes_log2 = null + sketch_scaled = null + sketch_scaled_log2 = null skip_sig_merge = false // Comparing sketches @@ -50,8 +50,8 @@ params { translate_peptide_ksize = 8 translate_peptide_molecule = 'protein' translate_jaccard_threshold = 0.05 - reference_proteome_fasta = false - bloomfilter_tablesize = '1e8' + reference_proteome_fasta = null + bloomfilter_tablesize = 1e8 // Saving the translate results for each dataset makes it take extra long // Recommended for debugging purposes only save_translate_csv = false @@ -65,34 +65,34 @@ params { // ska options split_kmer = false - subsample = false + subsample = null // 10x options save_fastas = "fastas" - tenx_min_umi_per_cell = '0' - write_barcode_meta_csv = false - bam = false + tenx_min_umi_per_cell = 0 + write_barcode_meta_csv = null + bam = null // 10x optional input parameters set using the below pattern // https://github.com/nextflow-io/patterns/blob/master/docs/optional-input.adoc - barcodes_file = false - rename_10x_barcodes = false + barcodes_file = null + rename_10x_barcodes = null // Variables for testing - input_paths = false - fasta_paths = false - protein_fasta_paths = false + input_paths = null + fasta_paths = null + protein_fasta_paths = null // QC to skip skip_multiqc = false // Boilerplate options outdir = './results' - name = false + name = null publish_dir_mode = 'copy' multiqc_config = "$baseDir/assets/multiqc_config.yaml" - email = false - email_on_fail = false + email = null + email_on_fail = null max_multiqc_email_size = 25.MB plaintext_email = false monochrome_logs = false @@ -100,10 +100,10 @@ params { tracedir = "${params.outdir}/pipeline_info" custom_config_version = 'master' custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" - hostnames = false - config_profile_description = false - config_profile_contact = false - config_profile_url = false + hostnames = null + config_profile_description = null + config_profile_contact = null + config_profile_url = null // Defaults only, expecting to be overwritten max_memory = 128.GB diff --git a/nextflow_schema.json b/nextflow_schema.json index a279fa64..e56e2b75 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -178,15 +178,16 @@ "default": "protein" }, "translate_jaccard_threshold": { - "type": "string", + "type": "number", "fa_icon": "fas fa-code-branch", "description": "Minimum fraction of overlapping translated k-mers from the read to match to the reference.", - "default": 0.95 + "default": 0.05 }, "bloomfilter_tablesize": { - "type": "integer", + "type": "number", "description": "Maximum table size for bloom filter creation", - "fa_icon": "fas fa-code-branch" + "fa_icon": "fas fa-code-branch", + "default": 100000000 } } }, @@ -487,14 +488,14 @@ ], "properties": { "save_translate_csv": { - "type": "string", - "description": "Path to save the coding scores as a csv", - "default": "False" + "type": "boolean", + "description": "Save the coding scores as a csv", + "help_text": "Saving the translate results for each dataset makes it take extra long, it is recommended for debugging purposes only." }, "save_translate_json": { - "type": "string", - "description": "Path to save summarization of coding/\" \"noncoding/other categorizations, the \" \"min/max/mean/median/stddev of Jaccard scores, and other as a json", - "default": "False" + "type": "boolean", + "description": "Save summarization of coding/noncoding/other categorizations, the min/max/mean/median/stddev of Jaccard scores, and other as a json", + "help_text": "Saving the translate results for each dataset makes it take extra long, it is recommended for debugging purposes only." } } } \ No newline at end of file From ab6d07a26b31af585286c3cbc4c55d397ecec4a7 Mon Sep 17 00:00:00 2001 From: maxibor Date: Thu, 17 Mar 2022 12:46:01 +0100 Subject: [PATCH 2/2] set to false if params is null --- main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.nf b/main.nf index 94756edf..9ae4bdfa 100644 --- a/main.nf +++ b/main.nf @@ -464,10 +464,10 @@ Channel.from( peptide_molecules ) .into { ch_peptide_molecules; ch_peptide_molecules_for_compare } // Parse sketch value and style parameters -sketch_num_hashes = params.sketch_num_hashes -sketch_num_hashes_log2 = params.sketch_num_hashes_log2 -sketch_scaled = params.sketch_scaled -sketch_scaled_log2 = params.sketch_scaled_log2 +sketch_num_hashes = params.sketch_num_hashes ? params.sketch_num_hashes : false +sketch_num_hashes_log2 = params.sketch_num_hashes_log2 ? params.sketch_num_hashes_log2 : false +sketch_scaled = params.sketch_scaled ? params.sketch_scaled : false +sketch_scaled_log2 = params.sketch_scaled_log2 ? params.sketch_scaled_log2 : false have_sketch_value = params.sketch_num_hashes || params.sketch_num_hashes_log2 || params.sketch_scaled || params.sketch_scaled_log2 if (!have_sketch_value && !params.split_kmer) {