Skip to content

Commit 32b771a

Browse files
committed
Complete netDEG documentation
1 parent f05563a commit 32b771a

File tree

5 files changed

+78
-12
lines changed

5 files changed

+78
-12
lines changed

R/deg_rationet.R

+34-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
#' netDEG: Differentially expressed gene identification method
22
#'
3+
#' Perform netDEG for two group samples.
4+
#'
5+
#' @param ref.expr.matrix The reference expression matrix. Each row represents a gene and each column represents a sample.
6+
#' @param expr.matrix The test expression matrix. Each row represents a gene and each column represents a sample.
7+
#' @param p.edge The expected probability of edges in the expression ratio network for a normal sample.
8+
#' @param summarize Character vector indicating how to summarize the results. Available methods are \code{c("gene", "sample")}.
9+
#' @param log.expr Logical variable indicating whether the input expression matrix is in logarithmic scale.
10+
#' @param use.parallel Logical variable indicating to use the BiocParallel package to accelerate computation.
11+
#'
12+
#' @return This function will return a list with the following components:
13+
#' \item{up}{A numeric matrix with same dimension as \code{expr.matrix}, containing the p-values of up-regulation test.}
14+
#' \item{down}{A numeric matrix with same dimension as \code{expr.matrix}, containing the p-values of down-regulation test.}
15+
#' \item{twoside}{A numeric matrix with same dimension as \code{expr.matrix}, containing the p-values of twoside test.}
16+
#' \item{gene}{A list containing the gene-wise summaried results, containing three components: \code{up}, \code{down},
17+
#' and \code{twoside}. Available if the corresponding method is specified in \code{summarize} argument.}
18+
#' \item{sample}{A list containing the sample-wise summaried results, containing three components: \code{up}, \code{down},
19+
#' and \code{twoside}. Available if the corresponding method is specified in \code{summarize} argument.}
20+
#'
321
#' @export
4-
netDEG <- function(ref.expr.matrix, expr.matrix, p.edge = 0.1, log.expr = FALSE,
5-
summarize = c("gene", "sample"), use.parallel = FALSE)
22+
netDEG <- function(ref.expr.matrix, expr.matrix, p.edge = 0.1, summarize = c("gene", "sample"),
23+
log.expr = FALSE, use.parallel = FALSE)
624
{
725
if (use.parallel && requireNamespace("BiocParallel"))
826
{
@@ -71,8 +89,19 @@ netDEG <- function(ref.expr.matrix, expr.matrix, p.edge = 0.1, log.expr = FALSE,
7189
return(results)
7290
}
7391

74-
#' Calculate netDEG statistics and p-values
92+
#' Calculate netDEG p-values
93+
#'
94+
#' Perform the single or two side tests and calculate the p-values.
95+
#'
96+
#' @param ref.ratio.dist The expression ratio distribution profile returned by \code{get_ratio_distribution} or \code{get_ratio_distribution2}.
97+
#' @param expr.val Numeric vector of gene expression values in the sample.
98+
#' @param log.expr Logical variable indicating whether the input expression vector is in logarithmic scale.
7599
#'
100+
#' @return This function will return a list with the following components:
101+
#' \item{up}{A numeric vector containing the p-values of up-regulation test.}
102+
#' \item{down}{A numeric vector containing the p-values of down-regulation test.}
103+
#' \item{twoside}{A numeric vector containing the p-values of twoside test.}
104+
#'
76105
#' @export
77106
netDEG_pvalue <- function(ref.ratio.dist, expr.val, log.expr = FALSE)
78107
{
@@ -92,7 +121,7 @@ netDEG_pvalue <- function(ref.ratio.dist, expr.val, log.expr = FALSE)
92121
#' and estimate the parameters of negative binomial distribution from reference expression data.
93122
#'
94123
#' @param ref.expr.matrix The reference expression matrix. Each row represents a gene and each column represents a sample.
95-
#' @param p.edge The total lower and upper quantiles of expression ratios for each pair of genes.
124+
#' @param p.edge The expected probability of edges in the expression ratio network for a normal sample.
96125
#' @param log.expr Logical variable indicating whether the input expression matrix is in logarithmic scale.
97126
#' @param use.parallel Logical variable indicating to use the BiocParallel package to accelerate computation.
98127
#'
@@ -124,7 +153,7 @@ get_ratio_distribution <- function(ref.expr.matrix, p.edge = 0.1, log.expr = FAL
124153
#' and estimate the parameters of negative binomial distribution from reference expression data.
125154
#'
126155
#' @param ref.expr.matrix The reference expression matrix. Each row represents a gene and each column represents a sample.
127-
#' @param p.edge The total lower and upper quantiles of trimmed expression ratios for each pair of genes.
156+
#' @param p.edge The expected probability of edges in the expression ratio network for a normal sample.
128157
#' @param p.trim The percentage of lower or upper extreme values to be trimmed from the expression ratios for each pair of genes.
129158
#' @param log.expr Logical variable indicating whether the input expression matrix is in logarithmic scale.
130159
#' @param use.parallel Logical variable indicating to use the BiocParallel package to accelerate computation.

man/get_ratio_distribution.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_ratio_distribution2.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/netDEG.Rd

+27-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/netDEG_pvalue.Rd

+15-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)