classComparison {classComparison} | R Documentation |
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.
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)
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 |
isPaired |
logical. If |
HasBlock |
logical. If |
HasDuplic |
logical. If |
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.
|
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 |
DoUnivariatePermTest |
logical. If |
NumPermUnivariate |
numeric specifying the number of permutations for the univariate permutation tests. Default is 10000. |
GlobalTest |
logical. If |
NumPermMultivariate |
numeric specifying the number of permutations for the multivariate tests. Default is 1000. |
DoFoldThresh |
logical. If |
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 |
generateHTML |
logical. If |
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.
A list includes the following objects:
classifierTable
: a data frame with the performance of classifiers.
workPath
: the path for Fortran and other intermediate output files.
outputPath
: the path for final result output files.
Following functions were disabled:
Create the chromosome distribution plot.
Perform GO Observed vs Expected analysis.
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)