Mercurial > repos > siwaa > sms
comparison eval_only_stics_on_sms.R @ 0:ab62b4ecd5b9 draft default tip
"planemo upload for repository https://forgemia.inra.fr/quaysofthestics/sticsquays/-/tree/master/tools commit 5e434da355bade7d12364ccbd84b53848e6fa4c5"
author | siwaa |
---|---|
date | Mon, 18 Jul 2022 10:54:39 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ab62b4ecd5b9 |
---|---|
1 library(SticsRFiles) | |
2 library(SticsOnR) | |
3 library(dplyr) | |
4 library(stringr) | |
5 library(parallel) | |
6 | |
7 print("==================================") | |
8 | |
9 print(paste0("Cores=", detectCores())) | |
10 | |
11 print("==================================") | |
12 | |
13 native_wd_path <- getwd() | |
14 | |
15 # Initializations: set path here | |
16 | |
17 sms_path_V9 <- paste0(getwd(), "/Stics_Tests/branches/Stics_Tests_for_Stics_v92") | |
18 | |
19 sms_idesticsr_path <- "/home/rstudio/IDESticsR" | |
20 | |
21 invisible(sapply(list.files(file.path(sms_idesticsr_path),pattern = "*[R|r]$", full.names = TRUE), source)) | |
22 | |
23 javastics <- paste0(getwd(), "/JavaSTICS-1.41-stics-9.2") | |
24 | |
25 path_typoFR <- file.path(sms_path_V9, "typo_usms_FR_14_12_2017_pour_tri_evaluation_officielle.csv") | |
26 path_typo <- file.path(sms_path_V9, "typo_usms.csv") | |
27 | |
28 # Select corresponding USMs | |
29 plant_files <- NULL | |
30 | |
31 USM_list_file <- paste0(native_wd_path,"/USMlist.csv") | |
32 | |
33 UsmMetadata <- read.csv(USM_list_file,header=T, sep=";",stringsAsFactors = FALSE) | |
34 | |
35 # to guess the plant | |
36 plant <- UsmMetadata$plant1[1] | |
37 | |
38 if (plant == "corn") {plant <- "maize"} | |
39 | |
40 USM_names <- UsmMetadata$usm | |
41 | |
42 workspace <- paste0(native_wd_path, "/work") | |
43 | |
44 res <- evaluate_SMS(sms_path=sms_path_V9, javastics=javastics, workspace=workspace, | |
45 workspace_prev=NULL, | |
46 workspace_ref=NULL, path_typo=path_typo, | |
47 eval_folder=paste0("eval_",plant), usms=USM_names, | |
48 param_values=NULL, plant=plant, plant_files=plant_files, | |
49 var_names=NULL, | |
50 nb_cores=1, do_create_workspace=TRUE, | |
51 do_run=TRUE, do_eval=TRUE, do_generate_report=TRUE, | |
52 report_path=file.path(paste0(native_wd_path, "/EvaluationReports"),str_to_title(plant)), | |
53 stics_eval_version=NULL, stics_ref_version=NULL, | |
54 sms_version=NULL) |