Skip to content

Commit

Permalink
Merge pull request #39 from bzhanglab/unused-argument-fix
Browse files Browse the repository at this point in the history
Update idMappingMetabolites.R to address warning
  • Loading branch information
iblacksand authored Mar 7, 2024
2 parents acd660a + 388512d commit 5bc8283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/idMappingMetabolites.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ add_prefix <- function(x, sourceIdType) {
uppers <- c("LIPIDMAPS", "CAS")
if (toupper(sourceIdType) %in% uppers) {
return(unlist(sapply(x, function(y) {
if (grepl(":", y, FIXED = TRUE)) {
if (grepl(":", y)) {
return(y)
}
return(paste0(toupper(sourceIdType), ":", toupper(y)))
})))
} else {
return(unlist(sapply(x, function(y) {
if (grepl(":", y, fixed = TRUE) && sourceIdType != "swisslipids") {
if (grepl(":", y) && sourceIdType != "swisslipids") {
return(y)
}
return(paste0(sourceIdType, ":", y))
Expand Down

0 comments on commit 5bc8283

Please sign in to comment.