File: decideTestsPerLabel.Rd

package info (click to toggle)
r-bioc-scran 1.18.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,856 kB
  • sloc: cpp: 960; sh: 13; makefile: 2
file content (74 lines) | stat: -rw-r--r-- 3,069 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/decideTestsPerLabel.R
\name{decideTestsPerLabel}
\alias{decideTestsPerLabel}
\alias{summarizeTestsPerLabel}
\title{Decide tests for each label}
\usage{
decideTestsPerLabel(
  results,
  method = c("separate", "global"),
  threshold = 0.05,
  pval.field = NULL,
  lfc.field = "logFC"
)

summarizeTestsPerLabel(results, ...)
}
\arguments{
\item{results}{A \linkS4class{List} containing the output of \code{\link{pseudoBulkDGE}}.
Each entry should be a DataFrame with the same number and order of rows,
containing at least a numeric \code{"PValue"} column (and usually a \code{"logFC"} column).

For \code{summarizeTestsPerLabel}, this may also be a matrix produced by \code{decideTestsPerLabel}.}

\item{method}{String specifying whether the Benjamini-Hochberg correction should be applied across all clustesr
or separately within each label.}

\item{threshold}{Numeric scalar specifying the FDR threshold to consider genes as significant.}

\item{pval.field}{String containing the name of the column containing the p-value in each entry of \code{results}.
Defaults to \code{"PValue"}, \code{"P.Value"} or \code{"p.value"} based on fields in the first entry of \code{results}.}

\item{lfc.field}{String containing the name of the column containing the log-fold change.
Ignored if the column is not available Defaults to \code{"logFC"} if this field is available.}

\item{...}{Further arguments to pass to \code{decideTestsPerLabel} if \code{results} is a List.}
}
\value{
For \code{decideTestsPerLabel},
an integer matrix indicating whether each gene (row) is significantly DE between conditions for each label (column).

For \code{summarizeTestsPerLabel},
an integer matrix containing the number of genes of each DE status (column) in each label (row).
}
\description{
Decide which tests (i.e., genes) are significant for differential expression between conditions in each label,
using the output of \code{\link{pseudoBulkDGE}}.
This mimics the \code{\link{decideTests}} functionality from \pkg{limma}.
}
\details{
If a log-fold change field is available and specified in \code{lfc.field}, values of \code{1}, \code{-1} and \code{0}
indicate that the gene is significantly upregulated, downregulated or not significant, respectively.
Note, the interpretation of \dQuote{up} and \dQuote{down} depends on the design and contrast in \code{\link{pseudoBulkDGE}}.

Otherwise, if no log-fold change is available or if \code{lfc.field=NULL},
values of \code{1} or \code{0} indicate that a gene is significantly DE or not, respectively. 

\code{NA} values indicate either that the relevant gene was low-abundance for a particular label and filtered out,
or that the DE comparison for that label was not possible (e.g., no residual d.f.).
}
\examples{
example(pseudoBulkDGE)
head(decideTestsPerLabel(out))
summarizeTestsPerLabel(out)

}
\seealso{
\code{\link{pseudoBulkDGE}}, which generates the input to this function.

\code{\link{decideTests}}, which inspired this function.
}
\author{
Aaron Lun
}