classComparison {classComparison}R Documentation

Class Comparison between Groups of Arrays

Description

This function is used for comparing two or more pre-defined classes. The classes to be compared are in a vector. The vector can be any set of numerical, character or character string data. If an entry for a particular sample is left blank in the vector, that sample will be omitted from the class comparison analysis.

Usage

classComparison(exprData, geneIds, ClassVariableName, ClassVariableValues,
  geneFilter, IsSingleChannel, isPaired = FALSE, HasBlock = FALSE,
  HasDuplic = FALSE, GroupVariable = NULL, BlockVariable = NULL,
  duplic = NULL, BlockVariableName = NULL,
  ProportionOp = "optUnivariateTest", UnivarSignifLevel = 0.001,
  MaxProportionFD = 0.1, ConfLevel = 80, SignifLFDR = 0.05,
  DoRandomVariance = TRUE, DoUnivariatePermTest = FALSE,
  NumPermUnivariate = 10000, GlobalTest = FALSE,
  NumPermMultivariate = 1000, DoFoldThresh = FALSE,
  NumFoldThreshold = 2, NumAlphaPairwise = 0.01,
  IngenuityRefClass = "Automatically create the combination output",
  projectPath, outputName = "ClassComparison", generateHTML = FALSE)

Arguments

exprData

matrix of gene expression data for samples. Rows are genes and columns are arrays. Its column names must be provided.

geneIds

matrix/data frame of gene identifiers, such as Gene Symbols, Unique Ids, Clone Ids, Entrez Ids.

ClassVariableName

character string of the sample class variable name.

ClassVariableValues

vector of sample classes.

geneFilter

vector of 1/0's of the same length as genes. 1 means to keep the gene while 0 means to exclude the gene.

IsSingleChannel

logical. If TRUE, the data are single channel data, such as Affymatrix data.

isPaired

logical. If TRUE, samples are paired.

HasBlock

logical. If TRUE, samples have block variables.

HasDuplic

logical. If TRUE, samples need to average over replicate variables.

GroupVariable

vector of pairing variables for samples.

BlockVariable

vector of block variables for samples.

duplic

vector of average over repicate variables for samples.

BlockVariableName

character string of the block variable name.

ProportionOp

character string of the method used to find gene lists.

  • "optUnivariateTest": Univariate tests.

  • "optProportion": Multivariate permutation tests.

  • "optLocalFDR": Local False Discovery Rate tests.

UnivarSignifLevel

numeric for a significance level of univariate tests. Default is 0.001.

MaxProportionFD

numeric for maximum proportion of false discoveries. Default is 0.1.

ConfLevel

numeric for multivariate permutation tests, between 0 and 100 percent. Default is 80.

SignifLFDR

numeric for a significance level of local False discovery rate tests. Default is 0.05.

DoRandomVariance

logical. If TRUE, use the random variance model for univariate tests. Default is TRUE.

DoUnivariatePermTest

logical. If TRUE, perform univariate permutation tests. Default is FALSE.

NumPermUnivariate

numeric specifying the number of permutations for the univariate permutation tests. Default is 10000.

GlobalTest

logical. If TRUE, perform P-value for global tests. Default is FALSE.

NumPermMultivariate

numeric specifying the number of permutations for the multivariate tests. Default is 1000.

DoFoldThresh

logical. If TRUE, restrct gene list based on fold change threshold. Default is FALSE.

NumFoldThreshold

numeric specifying the fold change threshold. Default is 2.

NumAlphaPairwise

numeric specifying the P-value threshold for pairwise difference. Default is 0.01.

IngenuityRefClass

character string of the reference class name for Ingenuity output. Default is "Automatically create the combination output".

projectPath

character string specifying the full project path.

outputName

character string specifying the output file folder name. The folder is in the projectPath. Default is "ClassComparison".

generateHTML

logical. If TRUE, show an HTML file with detailed class comparison results in the system default browser.

Details

The Class Comparison between Groups of Arrays function computes a t-test or F-test separately for each gene using the normalized log-ratios for cDNA arrays and the normalized log-intensities for one color oligonucleotide arrays. The F-test is a generalization of the two-sample t-test for comparing values among groups. It has the option of using the random variance version of the t-test or F-test. They provide for sharing information among genes of the within-class variance in log-ratios or log signals. The class comparison function computes the number of genes that are differentially expressed among the classes at the statistical significance level selected in the F-test and creates a gene list containing information about the significant genes.

It implements the Class Comparison between Groups of Arrays tool in BRB-ArrayTools.

Please see the BRB-ArrayTools manual (https://brb.nci.nih.gov/BRB-ArrayTools/Documentation.html) for details.

Value

A list includes the following objects:

Note

Following functions were disabled:

See Also

test.classComparison

Examples


dataset<-"Brca"
# Gene IDs
geneIds <- read.delim(system.file("extdata", paste0(dataset, "_GENEID.txt")
  , package = "classComparison"), as.is = TRUE, colClasses = "character") 
# Expression data, and here are log ratio.
x <- read.delim(system.file("extdata", paste0(dataset, "_LOGRAT.TXT")
  , package = "classComparison"), header = FALSE)
# Gene filter information, 1 - pass the filter, 0 - filtered
geneFilter <- scan(system.file("extdata", paste0(dataset, "_FILTER.TXT")
  , package = "classComparison"), quiet = TRUE)
# Class information
expDesign <- read.delim(system.file("extdata", paste0(dataset, "_EXPDESIGN.txt")
  , package = "classComparison"), as.is = TRUE)
# Pick the first column as the array IDs.
arrayIds <- expDesign[, 1]
exprData <- x
colnames(exprData) <- expDesign[, 1]
# Pick the 3rd column as the class variable.
nColumn = 3
ClassVariableName = gsub("[.]"," ",colnames(expDesign)[nColumn])
ClassVariableValues <- expDesign[, nColumn]
projectPath <- tempdir()
outputName = "ClassComparison"
singleChannel <- ifelse(dataset == "Pomeroy", TRUE, FALSE)
generateHTML = TRUE
resList <- classComparison(exprData=exprData,
                             geneIds=geneIds,
                             ClassVariableName=ClassVariableName,
                             ClassVariableValues=ClassVariableValues,
                             geneFilter=geneFilter,
                             IsSingleChannel=singleChannel,
                             projectPath=projectPath,
                             outputName=outputName,
                             generateHTML=generateHTML)


[Package classComparison version 0.3 Index]