write_swarmfile: Prepares the swarmfile/script file for Stage 1 of the GGIR...

write_stage1_swarmfileR Documentation

Prepares the swarmfile/script file for Stage 1 of the GGIR analysis

Description

Pay close attention to the parameters passed in. Currently, the code assumes that each job takes 120 minutes to run. This is to ensure that enough time is allocate to run the job.

Usage

write_stage1_swarmfile(
  script_dir = tools::R_user_dir("biowR", "cache"),
  cwa_root,
  results_root,
  json_args = "",
  f0,
  f1,
  n_core,
  ht = FALSE
)

write_stage2_5_swarmfile(
  script_dir = tools::R_user_dir("biowR", "cache"),
  output_dir,
  json_args,
  f0,
  f1,
  n_core,
  ht = FALSE
)

rewrite_stage1_swarmfile(
  script_dir = tools::R_user_dir("biowR", "cache"),
  cwa_root,
  results_root,
  json_args = "",
  indices,
  files,
  ht = FALSE
)

rewrite_stage2_5_swarmfile(
  script_dir = tools::R_user_dir("biowR", "cache"),
  output_dir,
  json_args,
  indices,
  ht = FALSE
)

Arguments

script_dir

The directory where the scripts are written.

cwa_root

The directory where the accelerometer files are stored.

results_root

The root for the results directory.

json_args

An optional json file with parameters for GGIR

f0

The start index

f1

The end index. The file with index f1 is run.

n_core

The number of jobs you would like to swarm at once.

ht

If you want to use hyper threading, set ht to TRUE.

output_dir

The output_<study$gt; directory in the result_root

indices

A vector of file indices to (re)analyze

files

The files names to (re)analyze. directory from stage 1

Details

Because CRAN policy does not allow the scripts to be placed in the user's home directory without permission, the default location of the scripts is in tools::R_user_dir("biowR","cache"), which on biowulf is ~/.cache/R/biowR. I would suggest setting the script_dir argument to something useful.

Value

invisibly returns the name of the swarmfile


episphere/biowR documentation built on Dec. 6, 2023, 1:44 a.m.