source("modules/Loading/Loading.R")
source("modules/Calibration/Calibration.R")
source("modules/Anomalies/Anomalies.R")
source("modules/Skill/Skill.R")
source("modules/Saving/Saving.R")
source("modules/Visualization/Visualization.R")

args = commandArgs(trailingOnly = TRUE)
recipe_file <- args[1]
recipe <- read_atomic_recipe(recipe_file)
# Load datasets
data <- Loading(recipe)
# Calibrate datasets
data <- Calibration(recipe, data)
# Compute anomalies
data <- Anomalies(recipe, data)
# Compute skill metrics 
skill_metrics <- Skill(recipe, data)
# Compute percentiles and probability bins
probabilities <- Probabilities(recipe, data)
# Plot data
Visualization(recipe, data, skill_metrics, probabilities,
	      significance = T)
