2
$\begingroup$

I understand what GWAS is and I'm able to perform certain tests with the p-values, etc. But what I am having a hard time wrapping my head around is what PCA on GWAS means.

So let's say I have 100,000 individuals and genotype data for 10 million SNPs. And I'm analyzing this for 10 different diseases. I also have p-value information for each of the 10 diseases for the 10 million SNPs.

At my work, they were throwing around the following phrases. I'm not quite sure what exactly it means.

  1. "Perform PCA on GWAS." Does this mean, I'm performing PCA on the genotype data or p-value data? I've done PCA on classic machine learning problems like "iris." But I'm not able to quite wrap my head around what PCA information tells me in terms of this genetic data.
  2. "PCA on individual diseases vs. PCA on entire GWAS" What exactly is the difference. I realize this is a broken statement, but they said we have two sets of PCs. One on the individual diseases which are unique, and then PCs on the entire GWAS for all 10 diseases.

Sorry if my questions is not properly asked, I realize it's probably heavily abusing notation.

Added clarifications:

  1. So, my matrix has 100k rows and 10 million columns. Then, PC1, for example, is a vector with 100k values, each value corresponding to each individual. What exactly does PC1 value that's associated with the first individual tell me with regards to the PC1 value that's associated with 2nd individual, and so on. My current understanding if you think of a number line that represents PC1, then each of the PC values (corresponding to each individual) represents where on the number line that individual falls.

  2. How exactly does this eliminate/account for variation in population stratification?

$\endgroup$
  • $\begingroup$ The questions are quite easy. What's your sample distribution? What is the sample size of healthy individuals and diseased individuals per disease? $\endgroup$ – Michael G. May 1 at 17:57
  • $\begingroup$ I have about 95,000 healthy individuals and 5k diseased. @MichaelG. $\endgroup$ – Jonathan May 1 at 18:04
  • $\begingroup$ Oh.. hugely imbalanced, that is difficult. You mention 10 diseases, is that 500 per disease? This last question is quite important $\endgroup$ – Michael G. May 1 at 18:26
  • $\begingroup$ Sorry, I should have been more clear. For each of the 10 diseases, we have event data for 100k individuals. So for the first disease, 95k of them are healthy. But for instance, one of the traits has 30k individuals with the trait and 70k without. And we're looking at the same 100k individuals across all 10 diseases. @MichaelG. $\endgroup$ – Jonathan May 1 at 18:28
  • $\begingroup$ I think I get it. Let compose an answer. The overlapping populations sound a bit tricky $\endgroup$ – Michael G. May 1 at 18:31
2
$\begingroup$

From my memory of what a statistician told me, a PCA aims to determine independent linear combinations of variables (i.e. genotypes) that account for the most variation in the dataset. With 10 million SNPs, the vectors describing the genotypes of all individuals reside somewhere inside a 10-million-dimension hypersphere, and the first principle component determines the best vantage point / angle from outside that sphere that will create the greatest spread of data when data is projected onto a perpendicular / orthogonal axis. The second principle component is the perpendicular / orthogonal axis that will create the second-greatest spread of data.

Aside: There's some wonderful linear algebra (which I've forgotten) that makes it very quick (computationally) to do this angle calculation, exploiting the nature of linear transformations and orthogonality.

The point of the PCA for GWAS is to identify (and preferably exclude) differences that might be due to the structure of populations, rather than the disease of interest. It's fairly common for researchers to do a PCA on the entire set of genotype data, then use the first 5, 10, or 20 principal components as covariates in the association model.

There's an underlying assumption that the majority of genetic variation is due to population structure - if this is not the case, then the disease would have to be extremely omnigenetic, with almost the entirety of the genome contributing to the disease. The approach also won't deal with all the population structure (because there may be non-linear contributions of genotypes to population structure), but it will get rid of the largest problems.

Additional to this, I'd recommend the following things:

Structure Visualisation

Carry out a STRUCTURE analysis or PCA on the combined cases and controls, and display the results of the first two principle components, labelling, colouring, or otherwise indicating both groups. As an additional check, it may be useful to do addititional PCAs for cases and controls separately.

If they appear different, it suggests that the cases and controls were drawn from separate population clusters, which should be commented on in the discussion of the paper. There's no need to panic and find more data, just make the observation.

Subsampling

Carry out association tests on an equal-sized subsample of both datasets. This will mean that area-under-the-curve statistics can be properly interpreted. If you've got unbalanced datasets, use a little bit less than the smaller of the two groups (e.g. for 5k diseased and 95k healthy, use a random subsample of 4.5k from both groups).

Multiple testing / Internal validation

Run the association tests multiple times (with different subsamples), recording the individuals that were subsampled for future reference / reproducibility.

If an association is only present in one of the many different subsamples, it should be ignored as a spurious result. It means that there is some association that is not generalisable to all (or most) of the cases and controls. These variants might be interesting in themselves on an individual level, but not in a general population.

I explain some of this in more detail in the following preprint (which I'm not planning to submit to any journal, due to it being a bit stale and needing a lot of work to fix up):

Bootstrap Distillation: Non-parametric Internal Validation of GWAS Results by Subgroup Resampling

$\endgroup$
  • $\begingroup$ I've added in a clarification, please see OP $\endgroup$ – Jonathan May 2 at 4:21
  • $\begingroup$ Note that in this context "independent" should be "orthogonal". There's another dimensionality reduction method called Independent Component Analysis where the variables are linear combinations of input variables that are maximally statistically independent of each other. Everything else here is good advice $\endgroup$ – James Hawley May 7 at 15:41
  • $\begingroup$ I did mention orthogonal, just not in the introductory sentence. $\endgroup$ – gringer May 7 at 19:26
1
$\begingroup$

PCA = principle component analysis and a multivariate statistic, today it is trendily retermed "unsupervised learning" and here is likely being deployed for individuals within your data set. It works by identifying the maximum variance within multidimensional space, shearing it and describing this as the first principle component. The second principle component is sections the variance at 90o to the first in all axes (orthogonal is the posh word), and so on ... The maximum information is within the first two components and they are sometimes plotted on x and y axes to look for potential clusters within your data. In this case the first few components are all that is needed because you not identifying the genes of interest just checking the data looks sound.

Point 1 PCA on all GWAS is attempting to assess that the genetic variation between diseased and healthy people is evening spread across the genome. For example if your diseased population came from e.g. the indigenous people of Western Samoa (purely as an example), which has a very defined genetic heritage (at least for HLA) then most of the SNPs will be unrelated to the disease your are attempting to identify. This will mean you have to redefine the healthy population, the null distribution, to screen out the artefacts. In this case a better representation would be to select healthy individuals from Western Samoa as your comparison. So within the first two components you want to see lots of mixing between your patients vs healthy people. If the patients are clumping (clustering) thats bad here and you have to find out why.

PCA has weaknesses BTW for complicated reasons which are boring, but it is often not assessed directly but via a tSNE analysis and then plotted on two axes.

Point 2 If PCA from point 1 looks cool, then you might split the data set into diseased and another one of healthy and perform a PCA on each but now look at the SNPs ... not the people. I hope that makes sense. If you compare the PCA plot of SNPs between these two groups, the differences MIGHT and I stress might highlight the SNPs of interest, i.e. the SNPs causing your disease. However and its a big however the number of SNPs you are dealing with is huge and if you are manually going through all that data to assess anomalous clusters, or outliers to make a list of candidate SNPs for further analysis (@gringer describes some of the further options above) - I wish you good health and long life, and you will need it because you will be very old at the end of that optical analysis.

What you really do is an additional analysis (I would deploy tSNE) to assess the differences between the two PCA plots and end up with a third plot indicating the differences between all the other PCA plots. In this context it is complicated to deploy and would be nested within a tSNE analyse of all components which is what I alluded to in point 1.

Point 2 - issues Generally if someone thought I was going to eye-ball 50000 SNPs between two graphs, or throw them back a reanalysis which conceptually made their brain hurt ... their gonna have conceptualise real hard.

Summary Having said all that PCA is merely an exploratory tool and is not the defining significance test required, to find the "one SNP" which will explain your disease.


The imbalance of the data set makes advanced SNP identification statistically difficult, but the 30:70 split is okay. However a subsample of the healthy population, which is what Point 1 is all about, would likely correct for this imbalance.


On the question of mixing Point 1, what you don't want to see is your diseased patients forming a "blob", or even a circle, or any sort of defined cluster against the spread of healthy patients on a scatterplot of PC1 Vs PC2. Perhaps I should have said if your patients don't cluster on the output to Point 1 that's good. There are statistics that identify clusters on a PC1 PC2 scatter plot, and you want it to fail that test.

$\endgroup$
  • $\begingroup$ I'm a bit confused on point 1. I've added clarification in my question. $\endgroup$ – Jonathan May 2 at 4:19
  • $\begingroup$ What exactly would "a lot of mixing between patients and healthy people" look like in terms of PC plots? How would I identify this? $\endgroup$ – Jonathan May 2 at 4:34
  • $\begingroup$ Nevermind, I totally understand what you're saying now, thank you! $\endgroup$ – Jonathan May 2 at 5:14
  • $\begingroup$ I'll add a more detailed explanation and think of an example $\endgroup$ – Michael G. May 2 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.