1
1
# ' netDEG: Differentially expressed gene identification method
2
2
# '
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
+ # '
3
21
# ' @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 )
6
24
{
7
25
if (use.parallel && requireNamespace(" BiocParallel" ))
8
26
{
@@ -71,8 +89,19 @@ netDEG <- function(ref.expr.matrix, expr.matrix, p.edge = 0.1, log.expr = FALSE,
71
89
return (results )
72
90
}
73
91
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.
75
99
# '
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
+ # '
76
105
# ' @export
77
106
netDEG_pvalue <- function (ref.ratio.dist , expr.val , log.expr = FALSE )
78
107
{
@@ -92,7 +121,7 @@ netDEG_pvalue <- function(ref.ratio.dist, expr.val, log.expr = FALSE)
92
121
# ' and estimate the parameters of negative binomial distribution from reference expression data.
93
122
# '
94
123
# ' @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 .
96
125
# ' @param log.expr Logical variable indicating whether the input expression matrix is in logarithmic scale.
97
126
# ' @param use.parallel Logical variable indicating to use the BiocParallel package to accelerate computation.
98
127
# '
@@ -124,7 +153,7 @@ get_ratio_distribution <- function(ref.expr.matrix, p.edge = 0.1, log.expr = FAL
124
153
# ' and estimate the parameters of negative binomial distribution from reference expression data.
125
154
# '
126
155
# ' @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 .
128
157
# ' @param p.trim The percentage of lower or upper extreme values to be trimmed from the expression ratios for each pair of genes.
129
158
# ' @param log.expr Logical variable indicating whether the input expression matrix is in logarithmic scale.
130
159
# ' @param use.parallel Logical variable indicating to use the BiocParallel package to accelerate computation.
0 commit comments