Skip to content

Commit

Permalink
removing jsonvalidate for now because installing it on the servers wi…
Browse files Browse the repository at this point in the history
…ll be a nightmare
  • Loading branch information
cband committed Mar 9, 2020
1 parent 385a199 commit bd14ea7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Imports:
doParallel,
parallel,
configr,
R.utils,
jsonvalidate
R.utils
License: GNU Affero General Public License v3.0
Encoding: UTF-8
LazyData: true
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ import(doParallel)
import(parallel)
import(configr)
import(R.utils)
import(jsonvalidate)
#import(jsonvalidate)
11 changes: 11 additions & 0 deletions R/generate_genomic_annotations.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ generate_genomic_annotations = function(sample_id, sample_path, config_file, reg
if (!file.exists(config_file)) {
stop("invalid config file provided to generate_genomic_annotations")
}

### NOTE: Removing json validation because installing 'jsonvalidate' on juno is a nightmare.
### Need to figure out an alternative or somehow install it.
# json_validation_status = jsonvalidate::json_validate(values$config_file,
# system.file("data/config_schema.json", package="facetsPreview"),
# verbose=T)
# if (!json_validation_status) {
# print(json_validation_status)
# stop('Error parsing config file')
# }

config = configr::read.config(config_file)
source(config$facets_qc_script)
library(facetsSuite, lib.loc = config$facets_suite_lib)
Expand Down
24 changes: 13 additions & 11 deletions inst/application/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,19 @@ function(input, output, session) {
return(NULL)
}

json_validation_status = jsonvalidate::json_validate(values$config_file,
system.file("data/config_schema.json", package="facetsPreview"),
verbose=T)
if (!json_validation_status) {
showModal(modalDialog( title = "config file parsing error",
'likely missing or incorrectly set parameters in config file. check console for error information',
easyClose = TRUE))
print(json_validation_status)
stop('Error parsing config file')
stopApp(1)
}
### NOTE: Removing json validation because installing 'jsonvalidate' on juno is a nightmare.
### Need to figure out an alternative or somehow install it.
# json_validation_status = jsonvalidate::json_validate(values$config_file,
# system.file("data/config_schema.json", package="facetsPreview"),
# verbose=T)
# if (!json_validation_status) {
# showModal(modalDialog( title = "config file parsing error",
# 'likely missing or incorrectly set parameters in config file. check console for error information',
# easyClose = TRUE))
# print(json_validation_status)
# stop('Error parsing config file')
# stopApp(1)
# }

values$config = configr::read.config(values$config_file)

Expand Down

0 comments on commit bd14ea7

Please sign in to comment.