lsfEdgeR: Send an edgeR analysis job to SLF

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

lsfEdgeRR Documentation

Send an edgeR analysis job to SLF

Description

Send an edgeR analysis job to SLF

Usage

lsfEdgeR(
  dgeList,
  designContrast,
  outdir = "edgeR_output",
  outfilePrefix = "an-unnamed-project-",
  overwrite = c("ask", "overwrite", "append", "no"),
  mps = FALSE,
  limmaVoom = FALSE,
  appendGmt = NULL,
  qos = c("short", "interactive", "long"),
  rootPath = "~/apps/geneexpression",
  debug = FALSE
)

Arguments

dgeList

An DGEList object with counts, genes, and samples

designContrast

The DesignContrast object to model the data

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.

overwrite

If ask, the user is asked before an existing output directory is overwritten. If yes, the job will start and an existing directory will be overwritten anyway. If no, and if an output directory is present, the job will not be started.

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 slurmEdgeRcommand and then 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 long (useful if the job is expected to run more than three hours.) using srun and the 'interaction' queue of jobs instead of using sbatch.

rootPath

Character string, the directory of geneexpression scripts, under which bin/ngsDge_edgeR.Rscript is found.

debug

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

Value

A list of two items, command, the command line call, and output, the output of the SLURM command in bash

Note

Even if the output directory is empty, if overwrite is set to no (or if the user answers no), the job will not be started.

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)
 ## \dontrun{
 ## lsfEdgeR(y, designMatrix=myDesign, contrastMatrix=myContrast,
 ##  outfilePrefix="test", outdir=tempdir())
 ## }


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