Skip to content

Commit

Permalink
added test correction tmtplex
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Oct 4, 2024
1 parent dbf7cd5 commit d1d8820
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/local/openms/isobaricanalyzer/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}

"""
Expand Down

0 comments on commit d1d8820

Please sign in to comment.