lsfEdgeRcommand: Return the LSF command to run the edgeR script

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

lsfEdgeRcommandR Documentation

Return the LSF command to run the edgeR script

Description

Return the LSF command to run the edgeR script

Usage

lsfEdgeRcommand(
  dgeList,
  designContrast,
  outdir = "edgeR_output",
  outfilePrefix = "an-unnamed-project-",
  mps = FALSE,
  limmaVoom = FALSE,
  appendGmt = NULL,
  qos = c("long", "preempty", "short"),
  rootPath = "~/apps/geneexpression",
  debug = FALSE,
  bsubFile = NULL
)

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.

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 LSF Available values include long, short, and preempty.

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.

bsubFile

NULL or character string, file name that contains LSF jobs. If NULL, a file will be generated within the current directory following the pattern of outfilePrefix.bsub.

This function wraps the function edgeRcommand to return the command needed to start a LSF 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)
 myDesCon <- DesignContrast(designMatrix=myDesign, contrastMatrix=myContrast)
 lsfEdgeRcommand(y, designContrast=myDesCon,
     outfilePrefix="test", outdir=tempdir())
 ## remove the bsub file
 file.remove("test.bsub")


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