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

plumber reaction endpoint parameter patch #130

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading