OVEtstatPermTopM: OVESEG-test statistics after permuting top M groups

Description Usage Arguments Details Value Examples

View source: R/OVEtstatPermTopM.R

Description

This function permutes group labels among highest expressed M groups and then computes new OVESEG-test statistics.

Usage

1
2
3
OVEtstatPermTopM(y, group, groupOrder, M, weights = NULL,
  alpha = "moderated", NumPerm = 999, seed = 111,
  BPPARAM = bpparam())

Arguments

y

a numeric matrix containing log-expression or logCPM (log2-counts per million) values. Data frame or SummarizedExperiment object will be internally coerced into a matrix. Rows correspond to probes and columns to samples. Missing values are not permitted.

group

categorical vector or factor giving group membership of columns of y. At least two categories need to be presented.

groupOrder

an integer matrix with each row giving group indexes ordered based on decreasing expression levels .

M

an integer indicating the number of groups being permutated. The range is [2,K], where K is the total number of groups.

weights

optional numeric matrix containing prior weights for each spot.

alpha

parameter specifying within-group variance estimator to be used. 'moderated': empirical Bayes moderated variance estimator as used in eBayes. Numeric value: a constant value added to pooled variance estimator (α + σ). NULL: no estimator; all variances are set to be 1.

NumPerm

an integer specifying the number of permutation resamplings (default 999).

seed

an integer seed for the random number generator.

BPPARAM

a BiocParallelParam object indicating whether parallelization should be used for permutation resamplings. The default is bpparam().

Details

Top M expressed groups will be involved in permutation. There are C_K^M probe patterns in which probes are highly expressed in certain M groups among the total K groups. Probes of the same pattern share the same shuffled labels.

To improve the time efficiency, some functions within permutation loops are implemented using c++.

Value

a list containing the following components:

tstat.perm

a numeric matrix with each column giving OVESEG-test statistics over the expressions after one permutation.

topidx.perm

a integer matrix with each colulmn giving the highest expressed group index over the expressions after one permutation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(RocheBT)
ppnull <- postProbNull(RocheBT$y, RocheBT$group, detail.return = TRUE)
rperm <- OVEtstatPermTopM(RocheBT$y, RocheBT$group, ppnull$groupOrder, M=2,
                         NumPerm=99, BPPARAM=BiocParallel::SerialParam())
## Not run: 
#parallel computing
rperm <- OVEtstatPermTopM(RocheBT$y, RocheBT$group, ppnull$groupOrder, M=2,
                         NumPerm=99, BPPARAM=BiocParallel::SnowParam())

## End(Not run)

OVESEG documentation built on Nov. 8, 2020, 4:51 p.m.