calculateThreshold: Calculates the correlation threshold.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/calculateThreshold.R

Description

calculateThreshold returns the proportion of prioritised genes from a random selection for supplied threshold. Furthermore, this function also fits a loess curve to the estimated points. This allows the calculation of a threshold for priortisation of genes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
calculateThreshold(
  X,
  exclude,
  index.ref,
  set.size = length(index.ref),
  Weights = NULL,
  thresholds = seq(0.05, 1, 0.05),
  anno = NULL,
  Factor = NULL,
  cpus = 1,
  parallel = FALSE
)

Arguments

X

A matrix of gene expression values.

exclude

A vector of indices of genes to exclude.

index.ref

A vector of indices of reference genes used for prioritisation.

set.size

An integer giving the size of the set of genes that are to be prioritised.

Weights

A object of class Weights or a list of weights. The weights should correspond to Factor. If NULL the unweighted correlations are used.

thresholds

A vector of thresholds; values should be in the range [0,1].

anno

A dataframe or a matrix containing the annotation of arrays in X.

Factor

A character string corresponding to a column name of anno.

cpus

An integer giving the number of cores that are supposed to be used.

parallel

A logical value indicating whether parallel comuting should be used.

Details

The proportion of prioritized random genes is estimated by drawing 1000 random sets of genes and calculating how many would be prioritised at every given threshold. A gene is is prioritised if at least one correlation with a known reference gene is above the given threshold.

Value

calculateThreshold returns an object of class Threshold. An object of class Threshold is a list with the following components:

Author(s)

Saskia Freytag

See Also

funcThresh

Examples

1
2
3
4
5
6
7
Y<-simulateGEdata(500, 500, 10, 2, 5, g=NULL, Sigma.eps=0.1, 
250, 100, intercept=FALSE, check.input=FALSE)
anno<-as.matrix(sample(1:4, dim(Y$Y)[1], replace=TRUE))
colnames(anno)<-"Factor"
weights<-findWeights(Y$Y, anno, "Factor")
calculateThreshold(Y$Y, exclude=seq(251,500,1), index.ref=seq_len(10), 
Weights=weights, anno=anno, Factor="Factor")

RUVcorr documentation built on Nov. 8, 2020, 5:10 p.m.