Skip to contents

Submits a custom R script as a job to DNAnexus for execution. This function prepares and executes R scripts in the DNAnexus environment using the Jupyter workstation app.

Usage

dx_submit_r_job(
  script_path,
  script_args = NULL,
  instance_type = NULL,
  priority = "normal",
  session_name = NULL,
  tag = NULL,
  include_ofhelper = TRUE,
  remote_inputs = NULL,
  app_id = "dxjupyterlab"
)

Arguments

script_path

Character string specifying the path to the R script to be executed

script_args

Character. An optional vector of command line arguments to supply to the script that can then be processed within the script e.g. via [commandArgs()]

instance_type

Character string specifying the DNAnexus instance type. If NULL (default), uses the lowest instance from the rate card.

priority

Character string specifying job priority ("low", "normal", "high"). Default is "normal".

session_name

Character string specifying the job name. Default is 'r_job_<timestamp>'.

tag

Character string for tagging the job. Default uses timestamp.

include_ofhelper

Logical. If TRUE (default), includes the complete ofhelper package source code to ensure all required functions are available.

remote_inputs

Character vector of DNAnexus file paths to be downloaded into the worker. Default is NULL.

app_id

Character. App ID of the Jupyter Workstation DNAnexus App. Defaults to an ID that might be subject to change.

Value

Job ID of the submitted DNAnexus job

Examples

if (FALSE) { # \dontrun{
# Submit an R script with default settings
# job_id <- submit_r_job("path/to/my_script.R")

# Submit with custom parameters
# job_id <- submit_r_job(
#   script_path = "analysis.R",
#   instance_type = "azure:mem2_ssd1_v2_x4",
#   priority = "high",
#   session_name = "my_analysis_job"
# )

# Submit with remote input files
# job_id <- submit_r_job(
#   script_path = "analysis.R",
#   remote_inputs = c("file-xxxxx", "file-yyyyy")
# )
} # }