Skip to content

Commit

Permalink
Merge pull request #191 from nf-osi/syn_id_regex
Browse files Browse the repository at this point in the history
minor fix for syn ID detection
  • Loading branch information
anngvu authored Sep 24, 2024
2 parents ecb884f + 8485592 commit b7687f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/basic_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dt_read <- function(file) {
bare_syn_id <- function(uri) {
not_na <- which(!is.na(uri))
x <- uri[not_na]
syn <- regmatches(x, regexpr("syn[0-9]{8,12}", x))
syn <- regmatches(x, regexpr("syn[0-9]{7,12}", x))
uri[not_na] <- syn
return(uri)
}
Expand All @@ -64,7 +64,7 @@ bare_syn_id <- function(uri) {
#' @param id Id string.
#' @keywords internal
is_valid_syn_id <- function(id) {
result <- grepl("^syn[0-9]{8,12}$", id)
result <- grepl("^syn[0-9]{7,12}$", id)
result
}

Expand Down

0 comments on commit b7687f2

Please sign in to comment.