Description Usage Arguments Details Value Functions Examples
View source: R/setup_BioLockR.R
Set BioLockJ Essential File Paths
1 2 3 4 5 6 7 8 9 | get_BLJ_JAR()
get_BLJ_PROJ()
set_BLJ_JAR(path, remember = TRUE, doublecheck = TRUE)
set_BLJ_PROJ(path, remember = TRUE, doublecheck = TRUE)
setup_BioLockR()
|
path |
a full file path. Location must already exist. |
remember |
TRUE/FALSE: Should this value be remembered for future sessions. If true, the value is appended to the $HOME/.Renviron file, which can be edited using: usethis::edit_r_environ() |
doublecheck |
(only used if remember==TRUE) should an interactive response be required before saving value to a file. |
The BioLockR package is way to interact with the BioLockJ java program. At a minimim, it requires java and the path to the jar file in the BioLockJ folder: .../BioLockJ/dist/BioLockJ.jar
set_BLJ_JAR and set_BLJ_PROJ set variables BLJ_JAR and BLJ_PROJ respectively. These values can be retrieved via set_BLJ_JAR and set_BLJ_PROJ in the same session and (if remember=TRUE in the set method) in later sessions.
setup_BioLockR() launches an interactive mode that promps the user for the required settings. The same setup can be done prgrammatically by using set_BLJ_JAR() and set_BLJ_PROJ() with doublecheck=FALSE.
set_BLJ_JAR() and set_BLJ_PROJ() will prompt about using the settings for future sessions (unless doublecheck=FALSE). This interactive session is designed for an initial setup, and automatically uses remember=TRUE and doublecheck=FALSE when seting BLJ_JAR and BLJ_PROJ.
Unlike set_BLJ_JAR(), this method checks for java and also tests the jar file by attempting to get the BioLockJ version from it. This check is skipped if java is not accessible.
If you have BioLockJ installed, you have a variable $BLJ, and likley $BLJ_RPOJ. These may not be detected in an R session, or an Rstudio R session. If these are detected, they are used; otherwise they must be set manually.
In some cases, an R session launched from the terminal may have access to the variables, while a session launched in Rstudio does not. In this case, run setup_BioLockR() from the terminal R session, and subsequent sessions in Rstudio will have the paths.
get_BLJ_JAR: The path to the BioLockJ jar file
get_BLJ_PROJ: the path to the BioLockJ project directory
set_BLJ_JAR: boolean; TRUE if path is set for current session
set_BLJ_PROJ: boolean; TRUE if path is set for current session
setup_BioLockR: no return value
get_BLJ_JAR
: get the BioLockJ.jar file path
get_BLJ_PROJ
: get the BioLockJ projects directory path
set_BLJ_JAR
: set the BioLockJ.jar file path
set_BLJ_PROJ
: set the BioLockJ projects directory path
setup_BioLockR
: launch interactive setup mode
1 2 3 4 5 6 7 8 9 10 | # set_BLJ_JAR("/path/to/BioLockJ/dist/BioLockJ.jar")
# get_BLJ_JAR()
# set_BLJ_PROJ("~/Documents/BioLockJ/pipelines")
# get_BLJ_PROJ()
# >[1] "~/Documents/BioLockJ/pipelines"
set_BLJ_JAR("path/to/BioLockJ/dist/BioLockJ.jar")
set_BLJ_PROJ( "path/to/projects/dir" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.