Select the first sequence matching the identifier
This commit is contained in:
parent
e5a7b726a9
commit
e694ee3292
|
@ -24,9 +24,9 @@ parse_data <- function(files) {
|
||||||
return(list(sequences, vj_segments, vdj_dataframe))
|
return(list(sequences, vj_segments, vdj_dataframe))
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO Test if grep can return more than one match
|
|
||||||
get_vj_sequence <- function(identifier, names, sequences) {
|
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]))
|
return(as.character(sequences[row]))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue