Skip to content

Principal Component Analysis

Principal component analysis (PCA) is a statistical tool that transforms a set of correlated variables into a smaller number of uncorrelated variables called principal components (PCs). The first PC captures as much of the variation as possible, and the succeeding PCs account for a decreasing fraction of the remaining variance. Another application of PCA is to use PCs derived from genetic markers to represent population structure8. This method requires much less computing time than maximum likelihood estimation. As most marker data are characters, numericalization must be performed first. A common approach for converting character marker scores is to set one of the homozygotes to 0, the other homozygote to 2, and the heterozygote to 1. For haploids, the conversion can be simply performed by coding one allele as 0 and the other as 1. The TRANSFORM function in TASSEL converts the major allele to 0. All the other alleles are collapsed to a single class and coded as 1. PCA requires that all variables should have variation and should not have missing values. As a result, filtering genotype to eliminate monomorphic markers and imputing missing values may be necessary. Imputing missing values can be done before or after numericalization. Here we demonstrate how to generate PCs from the genotype file in the tutorial data.

  1. Remove monomorphic sites: Make sure TASSEL is in Data mode. Highlight the genotype and click Site. Set the minimum frequency to 0.05 and have “Remove minor SNP status” checked. Click Filter.
  2. Numericalization: Highlight the filtered genotype and click Transform. Use the default option of “Collapse non major alleles.” Click Create data set.
  3. Imputation of missing values: Highlight the numerical genotype and click Transform and then click Impute Tab. Use the default options. Click Create data set.
  4. PCA: Highlight the imputed numerical genotype, click Transform, and then click PCA Tab. Change the default option to “Components=3” by choosing Components and type 3 in the text box. Click Create data set.

Three items will be added to the data tree after running PCA. The first are the PCs. The second are the eigenvalues. And, the last are the eigenvectors. Here we use the Chart Function in the Result mode to graph the first three PCs, the individual eigenvalue contributions (sometimes called a skree plot) and the cumulative eigenvalue contributions. The eigenvalues are of interest because they equal the variance explained by each of the PCs.