Skip to content

Commit

Permalink
add new file
Browse files Browse the repository at this point in the history
  • Loading branch information
reedliu committed Apr 14, 2023
1 parent f921fef commit 5c5a8d3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions R/transID.R
Expand Up @@ -62,10 +62,17 @@ transId <- function(id,
id <- replace_greek(id)
keytype <- gentype(id = id, data = all, org = org) %>% tolower()

res <- genInfo(id, org, unique, keepNA,hgVersion) %>%
dplyr::mutate( !! keytype := input_id) %>%
dplyr::select(input_id, all_of(transTo)) %>%
distinct()
if(keytype != 'symbol'){
res <- genInfo(id, org, unique, keepNA,hgVersion) %>%
dplyr::mutate( !! keytype := input_id) %>%
dplyr::select(input_id, all_of(transTo)) %>%
distinct()
}else{
res <- genInfo(id, org, unique, keepNA,hgVersion) %>%
dplyr::select(input_id, all_of(transTo)) %>%
distinct()
}

},
error = function(e) {
message('Maybe your "trans_to" argument is wrong, please check again...')
Expand Down

0 comments on commit 5c5a8d3

Please sign in to comment.