Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #130 from ncats/jb_rxn_plumbing
Browse files Browse the repository at this point in the history
plumber reaction endpoint parameter patch
  • Loading branch information
tsheils authored Jan 30, 2024
2 parents a262670 + 1b8f4ff commit 88abcd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/ramp-server/db.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ port <- config$db_port

#pkg.globals <- setConnectionToRaMP(dbname=dbname,username=username,conpass=conpass,host = host)

# this call is used specifically for connection to MySQL/MariaDB databases.
rampDB <<- RaMP:::.RaMP(driver = RMariaDB::MariaDB(), dbname = dbname,
username = username, conpass = conpass,
host = host, port = as.integer(port))
Expand Down
6 changes: 4 additions & 2 deletions apps/ramp-server/plumber.R
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ function(
analytes,
namesOrIds,
onlyHumanMets,
humanProtein,
includeTransportRxns,
rxnDirs
) {
Expand All @@ -589,6 +590,7 @@ function(
analytes=analytes,
namesOrIds = 'ids',
onlyHumanMets = onlyHumanMets,
humanProtein = humanProtein,
includeTransportRxns,
rxnDirs = rxnDirs
)
Expand All @@ -599,7 +601,7 @@ function(
return(
list(
data = result,
function_call = paste0("RaMP::getReactionsForAnalytes(db=RaMPDB, analytes=c(",analyteStr,"), namesOrIDs='ids', onlyHumanMets=",onlyHumanMets,", includeTransportRxns=",includeTransportRxns,", rxnDirs=c(",rxnDirs,")")
function_call = paste0("RaMP::getReactionsForAnalytes(db=RaMPDB, analytes=c(",analyteStr,"), namesOrIDs='ids', onlyHumanMets=",onlyHumanMets,", humanProtein=",humanProtein,", includeTransportRxns=",includeTransportRxns,", rxnDirs=c(",rxnDirs,")")
)
)
}
Expand All @@ -608,7 +610,7 @@ function(
#' getReactionClassesForAnalytes returns reactions class and EC numbers for a collection of input compound ids
#'
#' @param analytes
#' @param multiParticipantCount
#' @param multiRxnParticipantCount
#' @param humanProtein
#' @post /api/reaction_classes_from_analytes
#' @serializer json list(digits = 6)
Expand Down

0 comments on commit 88abcd7

Please sign in to comment.