generateNull_intl: Permutation test for the derived scores of each sample

Description Usage Arguments Value Author(s) See Also

View source: R/permuTest.R

Description

This function generates a number of random gene sets that have the same number of genes as the scored gene set. It scores each random gene set and returns a matrix of scores for all samples. The empirical scores are used to calculate the empirical p-values and plot the null distribution. The implementation uses BiocParallel::bplapply() for easy access to parallel backends. Note that one should pass the same values to the upSet, downSet, centerScore and knownDirection arguments as what they provide for the simpleScore() function to generate a proper null distribution.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
generateNull_intl(
  upSet,
  downSet = NULL,
  rankData,
  subSamples = NULL,
  centerScore = TRUE,
  knownDirection = TRUE,
  B = 1000,
  ncores = 1,
  seed = sample.int(1e+06, 1),
  useBPPARAM = NULL
)

Arguments

downSet

A GeneSet object, down regulated gene set

rankData

matrix, outcome of function rankGenes()

centerScore

A Boolean, specifying whether scores should be centered around 0, default as TRUE

knownDirection

A boolean flag, it deterimines whether the scoring method should derive the scores in a directional mannar when the gene signature only contains one set of gene set (passing the gene set via upSet). It is default as TRUE but one can set the argument to be FALSE to derive the score for a single gene set in a undirectional way. This parameter becomes irrelevant when both upSet and downSet are provided.

B

integer, the number of permutation repeats or the number of random gene sets to be generated, default as 1,000

ncores,

integer, the number of CPU cores the function can use

seed

integer, set the seed for randomisation

useBPPARAM,

the backend the function uses, if NULL is provided, the function uses the default parallel backend which is the first on the list returned by BiocParallel::registered() i.e BiocParallel::registered()[[1]] for your machine. It can be changed explicitly by passing a BPPARAM

Value

A matrix of empirical scores for all samples

Author(s)

Ruqian Lyu

See Also

Post about BiocParallel browseVignettes("BiocParallel")


singscore documentation built on Nov. 8, 2020, 8:27 p.m.