diff --git a/src/alignment.r b/src/alignment.r index 50cc1ff..d5f3e17 100644 --- a/src/alignment.r +++ b/src/alignment.r @@ -24,9 +24,9 @@ parse_data <- function(files) { return(list(sequences, vj_segments, vdj_dataframe)) } -# TODO Test if grep can return more than one match get_vj_sequence <- function(identifier, names, sequences) { - row <- grep(names, pattern = identifier) + matches <- grep(names, pattern = identifier) + row <- matches[1] return(as.character(sequences[row])) }