Main Content

mattest

Perform two-sample t-test to evaluate differential expression of genes from two experimental conditions or phenotypes

Syntax

PValues = mattest(DataX, DataY)
[PValues, TScores] = mattest(DataX, DataY)
[PValues, TScores, DFs] = mattest(DataX, DataY)
... = mattest(..., 'VarType', VarTypeValue, ...)
... = mattest(..., 'Permute', PermuteValue, ...)
... = mattest(..., 'Bootstrap', BootstrapValue, ...)
... = mattest(..., 'Showhist', ShowhistValue, ...)
... = mattest(..., 'Showplot', ShowplotValue, ...)
... = mattest(..., 'Labels', LabelsValue, ...)

Input Arguments

DataX, DataY

DataMatrix object or a matrix of gene expression values where each row corresponds to a gene and each column corresponds to a replicate. DataX and DataY must have the same number of rows and are assumed to be normally distributed in each class with equal variances.

DataX contains data from one experimental condition and DataY contains data from a different experimental condition. For example, DataX could be expression values from cancer cells, and DataY could be expression values from normal cells.

VarTypeValueCharacter vector that specifies the variance type of the test. VarTypeValue can be 'equal' or 'unequal' (default). If set to 'equal', mattest performs the test assuming the two samples have equal variances. If set to 'unequal', mattest performs the test assuming the two samples have unknown and unequal variances.
PermuteValueControls whether permutation tests are run, and if so, how many. Choices are true, false (default), or any integer greater than 2. If set to true, the number of permutations is 1000.
BootstrapValueControls whether bootstrap tests are run, and if so, how many. Choices are true, false (default), or any integer greater than 2. If set to true, the number of bootstrap tests is 1000.
ShowhistValue

Controls the display of histograms of t-score distributions and p-value distributions. Choices are true or false (default).

ShowplotValue

Controls the display of a normal t-score quantile plot. Choices are true or false (default). In the t-score quantile plot, data points with t-scores > (1 - 1/(2N)) or < 1/(2N) display with red circles. N is the total number of genes.

LabelsValueCell array of character vectors or string vector containing labels (typically gene names or probe set IDs) for each row in DataX and DataY. The labels display if you click a data point in the t-score quantile plot.

Output Arguments

PValues

One of the following:

  • Column vector of p-values for each gene in DataX and DataY (if both inputs are matrices).

  • DataMatrix object with row names the same as the first input DataMatrix object and a column name of p-values (if at least one input is a DataMatrix object).

TScoresColumn vector of t-scores for each gene in DataX and DataY.
DFsColumn vector containing the degree of freedom for each gene in DataX and DataY.

Description

PValues = mattest(DataX, DataY) performs an unpaired t-test for differential expression with a standard two-tailed and two-sample t-test on every gene in DataX and DataY and returns a p-value for each gene. DataX and DataY are either a DataMatrix object or a matrix of gene expression values, in which each row corresponds to a gene, and each column corresponds to a replicate. DataX contains data from one experimental condition and DataY contains data from another experimental condition. DataX and DataY must have the same number of rows and are assumed to be normally distributed in each class. PValues is a column vector of p-values for each gene, or, if at least one of the inputs is a DataMatrix object, a DataMatrix object with row names the same as the first input DataMatrix object and a column name of p-values.

[PValues, TScores] = mattest(DataX, DataY) also returns a t-score for each gene in DataX and DataY. TScores is a column vector of t-scores for each gene.

[PValues, TScores, DFs] = mattest(DataX, DataY) also returns DFs, a column vector containing the degree of freedom for each gene across both data sets, DataX and DataY.

... = mattest(..., 'PropertyName', PropertyValue, ...) calls mattest with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:

... = mattest(..., 'VarType', VarTypeValue, ...) specifies the variance type of the test. VarTypeValue can be 'equal' or 'unequal' (default). If set to 'equal', mattest performs the test assuming the two samples have equal variances. If set to 'unequal', mattest performs the test assuming the two samples have unknown and unequal variances.

... = mattest(..., 'Permute', PermuteValue, ...) controls whether permutation tests are run, and if so, how many. PermuteValue can be true, false (default), or any integer greater than 2. If set to true, the number of permutations is 1000.

... = mattest(..., 'Bootstrap', BootstrapValue, ...) controls whether bootstrap tests are run, and if so, how many. BootstrapValue can be true, false (default), or any integer greater than 2. If set to true, the number of bootstrap tests is 1000.

... = mattest(..., 'Showhist', ShowhistValue, ...) controls the display of histograms of t-score distributions and p-value distributions. When ShowhistValue is true, mattest displays histograms. Default is false.

... = mattest(..., 'Showplot', ShowplotValue, ...) controls the display of a normal t-score quantile plot. When ShowplotValue is true, mattest displays a quantile-quantile plot. Default is false. In the t-score quantile plot, the black diagonal line represents the sample quantile being equal to the theoretical quantile. Data points of genes considered to be differentially expressed lie farther away from this line. Specifically, data points with t-scores > (1 - 1/(2N)) or < 1/(2N) display with red circles. N is the total number of genes.

... = mattest(..., 'Labels', LabelsValue, ...) controls the display of labels when you click a data point in the t-score quantile plot. LabelsValue is a cell array of character vectors or string vector containing labels (typically gene names or probe set IDs) for each row in DataX and DataY.

Examples

  1. Load the MAT-file, included with the Bioinformatics Toolbox™ software, that contains Affymetrix® data from a prostate cancer study, specifically probe intensity data from Affymetrix HG-U133A GeneChip® arrays. The two variables in the MAT-file, dependentData and independentData, are two matrices of gene expression values from two experimental conditions.

    load prostatecancerexpdata
  2. Calculate the p-values and t-scores for the gene expression values in the two matrices and display a normal t-score quantile plot.

    [pvalues,tscores] = mattest(dependentData, independentData,...
                        'showplot',true);
  3. Calculate the p-values and t-scores again using permutation tests (1000 permutations) and displaying histograms of t-score distributions and p-value distributions.

    [pvalues,tscores] = mattest(dependentData,independentData,...
                        'permute',true,'showhist',true,...
                        'showplot',true);
  4. Calculate the p-values and t-scores again using bootstrap tests (2000 tests) and displaying histograms of t-score distributions and p-value distributions.

    [pvalues,tscores] = mattest(dependentData,independentData,...
                        'bootstrap',2000,'showhist',true,...
                        'showplot',true);

The prostatecancerexpdata.mat file used in this example contains data from Best et al., 2005.

References

[1] Review Literature: Huber, W., von Heydebreck, A., Sültmann, H., Poustka, A., and Vingron, M. (2002). Variance stabilization applied to microarray data calibration and to the quantification of differential expression. Bioinformatics 18 (Suppl. 1), S96–S104.

[2] Best, C.J.M., Gillespie, J.W., Yi, Y., Chandramouli, G.V.R., Perlmutter, M.A., Gathright, Y., Erickson, H.S., Georgevich, L., Tangrea, M.A., Duray, P.H., Gonzalez, S., Velasco, A., Linehan, W.M., Matusik, R.J., Price, D.K., Figg, W.D., Emmert-Buck, M.R., and Chuaqui, R.F. (2005). Molecular alterations in primary prostate cancer after androgen ablation therapy. Clinical Cancer Research 11, 6823–6834.

Version History

Introduced in R2006a