Skip to content

Commit

Permalink
updated scripts for new pfocr folders
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderPico committed Sep 23, 2024
1 parent c971114 commit cf7f6c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shiny_run/scripts/build_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build_db <- function(gmt.list, db.name){
if(http_error(r.info)){
stop("Failed to fetch PFOCR getFigureInfo.")
}
json_content <- content(r.info, as = "text", encoding = "UTF-8")
json_content <- httr::content(r.info, as = "text", encoding = "UTF-8")
json_list <- fromJSON(json_content, flatten = TRUE)
df.pfocr <- as.data.frame(json_list) %>%
dplyr::mutate(term = paste(figureInfo.pmcid,figureInfo.number,sep = "__")) %>%
Expand Down
2 changes: 1 addition & 1 deletion shiny_run/scripts/build_db_ghaction.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for(o in orgs){
if(http_error(r.info)){
stop("Failed to fetch PFOCR getFigureInfo.")
}
json_content <- content(r.info, as = "text", encoding = "UTF-8")
json_content <- httr::content(r.info, as = "text", encoding = "UTF-8")
json_list <- fromJSON(json_content, flatten = TRUE)
df.pfocr <- as.data.frame(json_list) %>%
dplyr::mutate(term = paste(figureInfo.pmcid,figureInfo.number,sep = "__")) %>%
Expand Down
2 changes: 1 addition & 1 deletion shiny_run/scripts/fetch_gmts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ wget -O "shiny_run/databases/gmts/wp_hs_"${DATE}".gmt" "https://data.wikipathway
wget -O "shiny_run/databases/gmts/wp_mm_"${DATE}".gmt" "https://data.wikipathways.org/current/gmt/wikipathways-"${WP_REL}"-gmt-Mus_musculus.gmt"

##PFOCR
PFOCR_DATE=$(curl --silent https://data.wikipathways.org/pfocr/ | grep -oP '<a class=file-link href="\K\d+' | tail -n 1)
PFOCR_DATE=$(curl --silent https://data.wikipathways.org/pfocr/current/ | grep 'pfocr-[0-9]\{8\}-gmt-Homo_sapiens\.gmt' | sed -E 's/.*pfocr-([0-9]{8})-gmt-Homo_sapiens\.gmt.*/\1/' | tail -n 1)
wget -O "shiny_run/databases/gmts/pfocr_hs_"${DATE}".gmt" "https://data.wikipathways.org/pfocr/"${PFOCR_DATE}"/pfocr-"${PFOCR_DATE}"-gmt-Homo_sapiens.gmt"
wget -O "shiny_run/databases/gmts/pfocr_mm_"${DATE}".gmt" "https://data.wikipathways.org/pfocr/"${PFOCR_DATE}"/pfocr-"${PFOCR_DATE}"-gmt-Mus_musculus.gmt"

Expand Down

0 comments on commit cf7f6c1

Please sign in to comment.