Skip to content

Commit

Permalink
Merge pull request #90 from saezlab/development
Browse files Browse the repository at this point in the history
Development into main
  • Loading branch information
ChristinaSchmidt1 authored Jan 14, 2025
2 parents 00ffcfd + 3b5166a commit 9280d7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Authors@R: c(
person("Dimitrios", "Prymidis", role = "aut"),
person("Denes", "Turei", role = "aut",
comment = c(ORCID = "0000-0002-7249-9379")),
person("Macabe", "Daley", role = "aut"),
person("Macabe", "Daley", role = "aut",
comment = c(ORCID = "0000-0002-8026-7068"))),
person("Julio", "Saez-Rodriguez", role = "aut",
comment = c(ORCID = "0000-0002-8552-8976")),
person("Christian", "Frezza", role = "aut",
Expand Down
5 changes: 3 additions & 2 deletions R/GetPriorKnoweldge.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#' @title KEGG
#' @description Import and process KEGG.
#' @importFrom utils read.csv
#' @importFrom KEGGREST keggGet keggList
#' @return A data frame containing the KEGG pathways for ORA.
#'
#' @examples
Expand All @@ -51,7 +52,7 @@ LoadKEGG <- function(){
message("Cached file loaded from: ", File_path)
}else{# load from KEGG
# 1. Make a list of all available human pathways in KEGG
Pathways_H <- as.data.frame(keggList("pathway", "hsa")) # hsa = human
Pathways_H <- as.data.frame(KEGGREST::keggList("pathway", "hsa")) # hsa = human

# 2. Initialize the result data frame
KEGG_H <- data.frame(KEGGPathway = character(nrow(Pathways_H)),
Expand All @@ -66,7 +67,7 @@ LoadKEGG <- function(){

tryCatch({#try-catch block is used to catch any errors that occur during the query process
# Query the pathway information
query <- keggGet(path)
query <- KEGGREST::keggGet(path)

# Extract the necessary information and store it in the result data frame
KEGG_H[k, "KEGGPathway"] <- Pathways_H[k,]
Expand Down

0 comments on commit 9280d7c

Please sign in to comment.