create.processing.env: Create processing environment

View source: R/create_processing_env.R

create.processing.envR Documentation

Create processing environment

Description

This function creates a new environment called run.env to store all user-set variables with the option to save as an RDA file for easy reading-in to a future session.

Usage

run.env

Arguments

base.dir

character; path to working directory. It is helpful to make this explicit (rather than using '.') for generating SGE_Array commands.

raw.seq.dirs

character; path to raw FASTQs directory or a named vector of paths to raw FASTQs directories. If a vector, symlink.raw.fastqs will preppend name of path to sample names to keep them distinct.

interactive

logical; TRUE = run command interactively, no swarm computing possible, FALSE = generate SGE_Batch or SGE_Array commands to submit manually. Default is FALSE

job.queue

character; the queue to that jobs will be sent to, for generating SGE commands. Default is NULL.

jobs.dir

character; path to write command files to for submission to the scheduler from the appropriate machine, e.g., "/home/micro/stagamak/Jobs". Default is ".".

max.cores

integer; maximum cores to take advantage of (when utilizing swarm processing this number will be divided by max.concurrent jobs to determine the per-job number of cores). Default is 1.

max.concurrent.jobs

integer; maximum concurrent jobs to run. If interactive == TRUE, this will be forced to 1. Default is 1.

link.dir

character; path to directory wherein you want to make symlinks to raw FASTQs. If set to NULL, will use the base.dir. Default is NULL.

store.dir

character; path to directory where all output will be stored. If set to NULL, will use the base.dir. Default is NULL.

temp.dir

character; path to a directory where output will first be written before moving to the permanent output directory, if NULL, output is written directly to store.dir. Default is NULL.

max.memory

character; maximum memory to set for jobs submitted to SGE_Batch or SGE_Array. Must take the form of e.g. "10G" or "50G" Setting to NULL means this parameter is not specified in the command. Default is NULL.

qsub.options

character; further qsub arguments you want included in the SGE_Batch or SGE_Array commands, e.g., get email at end of job with "'-m ae -M yourname@example.com'". This argument must be in double and single quotes like example to be parsed correctly. Setting to NULL means this parameter i snot specified in the command. Default is NULL.

save.env.dir

character; if not NULL, will create and save this environment in the provided directory (if directory does not already exist, it will be created in base.dir) with the date and time of creation in the file name. Default is NULL.

samples

character; a vector of sample names. Can be left NULL and symlink.raw.fastqs will grab sample names from the raw fastq file names. Default NULL.

bin.path

character; the path to the Rscript and other tool executables you want to use when generating commands. If NULL, will just include e.g. 'Rscript -e ...' or 'humann ...' in the commands, no specific path, which will call the Rscript first in your PATH. If not, NULL, will append that path to the tool command, e.g. 'PATH/TO/Rscript -e ...' or 'PATH/TO/humann ...'

...

additional variables you want to set here

Format

An object of class environment of length 0.

See Also

assign, new.env, call_match, symlink.raw.fastqs


kstagaman/sharpton-lab-metaGTx.processing documentation built on Oct. 2, 2022, 4:39 p.m.