limma_find_markers: Find markers by limma's pairwise moderated t-tests

View source: R/limma_find_markers.R

limma_find_markersR Documentation

Find markers by limma's pairwise moderated t-tests

Description

Perform limma's pairwise moderated t-tests, find sepcifically up or down-regulated markers for each group.

Usage

limma_find_markers(
  object,
  grp,
  direction = "up",
  nsim = 1e+07 - 2,
  seed = 100,
  design = NULL,
  add.means = !is.null(grp),
  adjust.method = "BH",
  weights = NA,
  trend = FALSE,
  block = NULL,
  correlation = NULL,
  treat.lfc = NULL,
  moderated = TRUE
)

Arguments

object

Matrix-like data object containing log-ratios or log-expression values, with rows corresponding to features (e.g. genes) and columns to samples. Must have row names that are non-duplicated and non-empty.

grp

Vector of sample groups. These must be valid variable names in R and the same length as ncol(object).

direction

Either "up" or "down".

nsim

Numeric number of simulations.

seed

Random seed.

design

Design matrix of the experiment, with rows corresponding to samples and columns to coefficients to be estimated.

add.means

Logical indicating if (unweighted) group means per row should be added to the output.

adjust.method

Method used to adjust the p-values for multiple testing. Options, in increasing conservatism, include "none", "BH", "BY", and "holm". See p.adjust for the complete list of options. A NULL value will result in the default adjustment method, which is "BH".

weights

Non-negative observation weights. Can be a numeric matrix of individual weights of same size as the object, or a numeric vector of sample weights with length ncol(object), or a numeric vector of gene weights with length equal to nrow(object). Set to NULL to ignore object$weights. weights=NA (with length one) doesn't pass weights to limma.

trend

Logical; should an intensity-trend be allowed for the prior variance? Default is that the prior variance is constant.

block

Vector specifying a blocking variable on the samples. Has length = ncol(object). Must be NULL if ndups > 1.

correlation

Inter-duplicate or inter-technical replicate correlation. Must be given if ndups>1 or !is.null(block).

treat.lfc

Vector of logFC passed to treat lfc. It is recycled as needed to match rows of object. If given, length(contrast.v) must be 1. McCarthy & Smyth suggest a 10 which is treat.lfc=log2(1.1).

moderated

Logical; should eBayes be used? Otherwise an unmoderated version for limma to produce ordinary least squares statistics is used.

Value

Data frame.


jdreyf/jdcbioinfo documentation built on May 6, 2024, 8:19 a.m.