diff --git a/modules/local/openms/isobaricanalyzer/main.nf b/modules/local/openms/isobaricanalyzer/main.nf index c4c7596d..b15cedc2 100644 --- a/modules/local/openms/isobaricanalyzer/main.nf +++ b/modules/local/openms/isobaricanalyzer/main.nf @@ -35,15 +35,19 @@ process ISOBARICANALYZER { } // Read the matrix file and format it into the command-line format + // Read the matrix file, skipping lines that start with '#' and process the matrix def matrix_lines = new File(params.plex_corr_matrix_file).readLines() .findAll { !it.startsWith('#') && it.trim() } // Skip lines starting with '#' and empty lines .drop(1) // Assuming the first non-comment line is a header .collect { line -> def values = line.split('/') - return "${values[1]}/${values[2]}/${values[3]}/${values[4]}" + return "\"${values[1]}/${values[2]}/${values[3]}/${values[4]}\"" } - def correction_matrix = matrix_lines.join(", ") - isotope_correction += " -${meta.labelling_type}:correction_matrix \"${correction_matrix}\"" + + // Join the matrix lines into a format for the C++ tool + def correction_matrix = matrix_lines.join(", ") + + isotope_correction += " -${meta.labelling_type}:correction_matrix ${correction_matrix}" } """