slurmEdgeRcommand: Return the SLURM command to run the edgeR script

View source: R/edgeR-slurm-lsf.R

slurmEdgeRcommandR Documentation

Return the SLURM command to run the edgeR script

Description

Return the SLURM command to run the edgeR script

Usage

slurmEdgeRcommand(
  dgeList,
  designMatrix,
  contrastMatrix,
  outdir = "edgeR_output",
  outfilePrefix = "an-unnamed-project-",
  mps = FALSE,
  limmaVoom = FALSE,
  appendGmt = NULL,
  qos = c("short", "interactive", "normal"),
  params = "",
  debug = FALSE
)

Arguments

dgeList

An DGEList object with counts, genes, and samples

designMatrix

The design matrix to model the data

contrastMatrix

The contrast matrix matching the design matrix

outdir

Output directory of the edgeR script. Default value "edgeR_output".

outfilePrefix

Prefix of the output files. It can include directories, e.g. "data/outfile-". In case of NULL, temporary files will be created.

mps

Logical, whether molecular-phenotyping analysis is run.

limmaVoom

Logical, whether the limma-voom model is run instead of the edgeR model

appendGmt

NULL or character string, path to an additional GMT file for gene-set analysis. The option is passed to edgeRcommand.

qos

Character, specifying Quality of Service of Slurm. Available values include short (recommended default, running time cannot exceed 3 hours), interactive (useful if you wish to get the results from an interactive session), and normal (useful if the job is expected to run more than three hours.) using srun and the 'interaction' queue of jobs instead of using sbatch.

params

Character, further parameters to pass to sbatch, for instance "–partition ANOTHER_PARITION"

debug

Logical, if TRUE, the source code of Rscript is used instead of the installed version. The option is passed to edgeRcommand.

This function wraps the function edgeRcommand to return the command needed to start a SLURM job.

It uses outdir to specify slurm output and error files as in the same directory of outdir. And the job name is set as the name of the output directory.

See Also

edgeRcommand

Examples


 mat <- matrix(rnbinom(100, mu=5, size=2), ncol=10)
 rownames(mat) <- sprintf("gene%d", 1:nrow(mat))
 myFac <- gl(2,5, labels=c("Control", "Treatment"))
 y <- edgeR::DGEList(counts=mat, group=myFac)
 myDesign <- model.matrix(~myFac); colnames(myDesign) <- levels(myFac)
 myContrast <- limma::makeContrasts(Treatment, levels=myDesign)
 slurmEdgeRcommand(y, designMatrix=myDesign, contrastMatrix=myContrast,
     outfilePrefix="test", outdir=tempdir())


bedapub/ribiosNGS documentation built on Feb. 10, 2025, 12:34 a.m.