Skip to content

Commit 514fa6d

Browse files
committed
almost working
1 parent de9d6fa commit 514fa6d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

R/clean_Spectronaut.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,10 @@
202202
default = NA_character_
203203
)]
204204

205-
spec_input[, PeptideSequence := gsub(heavy_brackets_escaped_pattern, "", PeptideSequence, perl = TRUE)]
205+
for (i in seq_along(heavyLabels)) {
206+
escaped = gsub("([\\[\\]])", "\\\\\\1", heavyLabels[i], perl = TRUE)
207+
spec_input[, PeptideSequence := gsub(escaped, bare_amino_acids[i], PeptideSequence, perl = TRUE)]
208+
}
206209

207210
spec_input
208211
}

0 commit comments

Comments
 (0)