diff --git a/CHANGELOG.md b/CHANGELOG.md index 12f8789d..04f64f02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - DeepLC retention time prediction - MS2PIP peak intensity prediction - Added OpenMS FileFilter to clean mzml after parsing to remove artifacts like empty spectra or precursors with charge 0 +- Made file extension check case insensitive +- Added option to provide a default comet parameters file - Optimize resource allocations ### `Fixed` diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 583058a9..9154eb41 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -25,7 +25,7 @@ class RowChecker: """ - VALID_FORMATS = (".raw", ".mzML", ".d") + VALID_FORMATS = (".raw", ".mzml", ".d") def __init__( self, @@ -93,7 +93,7 @@ def _validate_filename(self, row): def _validate_ms_format(self, filename): """Assert that a given filename has one of the expected MS extensions.""" - assert any(filename.endswith(extension) for extension in self.VALID_FORMATS), ( + assert any(filename.lower().endswith(extension) for extension in self.VALID_FORMATS), ( f"The file has an unrecognized extension: {filename}\n" f"It should be one of: {', '.join(self.VALID_FORMATS)}" ) diff --git a/modules/local/openms_cometadapter.nf b/modules/local/openms_cometadapter.nf index 1d440db0..4360ffab 100644 --- a/modules/local/openms_cometadapter.nf +++ b/modules/local/openms_cometadapter.nf @@ -23,6 +23,7 @@ process OPENMS_COMETADAPTER { def args = task.ext.args ?: '' def mods = params.fixed_mods != " " ? "-fixed_modifications ${params.fixed_mods.tokenize(',').collect { "'${it}'"}.join(" ")}" : "-fixed_modifications" + def params_file = params.default_params_file_comet != " " ? "-default_params_file ${params.default_params_file_comet}" : "" def xions = params.use_x_ions ? "-use_X_ions true" : "" def zions = params.use_z_ions ? "-use_Z_ions true" : "" def aions = params.use_a_ions ? "-use_A_ions true" : "" @@ -36,6 +37,7 @@ process OPENMS_COMETADAPTER { -database $fasta \\ -threads $task.cpus \\ -pin_out ${prefix}.tsv \\ + $params_file \\ $args \\ $mods \\ $xions \\ diff --git a/nextflow.config b/nextflow.config index 7e1de664..2d18b1e2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -36,6 +36,7 @@ params { fragment_bin_offset = 0.0 fragment_mass_tolerance = 0.01 instrument = 'high_res' + default_params_file_comet = ' ' klammer = false max_rt_alignment_shift = 300 number_mods = 3 diff --git a/nextflow_schema.json b/nextflow_schema.json index a2972c02..b8d4e452 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -337,6 +337,11 @@ "type": "string", "fa_icon": "fas fa-train-track", "description": "MS2pip model name defined (https://github.com/compomics/ms2pip#specialized-prediction-models)" + }, + "default_params_file_comet": { + "type": "string", + "fa_icon": "fas fa-file-code", + "description": "Default Comet params file. All parameters of this take precedence." } } },