diff options
author | Alexander Kabui | 2022-01-31 00:35:34 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-02-02 10:59:34 +0300 |
commit | f92f8eccc39dc190cb7c8dd1c99f2bd57c3d2323 (patch) | |
tree | 06fdd5ea64174669668b762011403ea9f999eedd /scripts | |
parent | 233490ab0169bd2d2bda8a210fcc4c3e690d6cdf (diff) | |
download | genenetwork3-f92f8eccc39dc190cb7c8dd1c99f2bd57c3d2323.tar.gz |
match case string input to boolean
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ctl_analysis.R | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/ctl_analysis.R b/scripts/ctl_analysis.R index 175feed..9d27ffe 100644 --- a/scripts/ctl_analysis.R +++ b/scripts/ctl_analysis.R @@ -22,12 +22,19 @@ json_file_path # add validation for the files input <- fromJSON(file = json_file_path) -cat("The input data is \n") +cat("The input data is \n") genoData <- input$genoData phenoData <- input$phenoData + +parametric <- switch( + input$parametric, + "True" = TRUE, + "False" = FALSE + + ) # create the matixes # genotypes Matrix of genotypes. (individuals x markers) @@ -44,7 +51,7 @@ pheno_matrix = t(matrix(as.numeric(unlist(phenoData$traits)), nrow=length(phenoD # # Use a data frame to store the objects -ctls <- CTLscan(geno_matrix,pheno_matrix,nperm=input$nperm,strategy=input$strategy,parametric=input$parametric,nthreads=3,verbose=TRUE) +ctls <- CTLscan(geno_matrix,pheno_matrix,nperm=input$nperm,strategy=input$strategy,parametric=parametric,nthreads=3,verbose=TRUE) |