<p>First of all, PCA is a technique for dimension reduction. Basically, the goal is to compare tens of thousands of SNPs in Drosophila. Now if you only have 2 SNPs, you can plot them on a 2D scatter plot. If you have 3 SNPs, you may try a 3D plot. But now imagine you have 30,000 SNPs, but you CANNOT plot a 30000-dimensional plot. To visualize this high dimensional data, what we can do is to perform dimensional reduction like PCA. PCA tries to find a set of orthogonal coordinations that explains most of the variation in the data (if there no variation, there is no information contained in the data, which essentially means there is no data). The idea is that PC1 carries most variation can be explained, and PC2 carries the second most... For lower PCs like PC50 or PC60, they probably only carry noise in the data. Therefore, the higher PCs (PC1, PC2 and so on) effectively summarizes the useful information in the data. So you can visualize the &quot;structure&quot; of the data in a 2D PCA plot.</p>
<p>By looking at the distance between points on a PCA plot, you can tell how similar the two data points are. But if you see two populations that are perfectly separated on PCA plot, it does not mean that the 2 population differ completely at every SNP, because PCA is a summarization of all SNP included.</p>

CC BY-SA 4.0
2020-12-19T00:55:09.583Z
I understood that PCA is performed to reduce dimensions. I didn't get  ""Now if you only have 2 SNP....."". let say I got 2 SNP and I want to plot that on scatter plot. What will the x and y-axis be?  And why with every SNPS dimensions are increasing. As you said that for 3 SNPs, I can use a 3d plot. What is the relation between SNPs and dimension?
Ashar
CC BY-SA 4.0
2020-12-19T01:07:29.837Z
one more question: Let say there are two population of drosophila A and B collected from 2 different locations. Both populations contain 5 isolates each.  After performing Variant calling analysis (for both populations at once) I got a VCF file showing that I have 5000snps. Here how would I know how many SNPs belong to each population? ( I am assuming 5000snps is detected from both 2 population collectively)
Ashar
CC BY-SA 4.0
2020-12-19T12:52:49.460Z
@Ashar please try not to ask additional questions in the comments. Add on any minor points to the main question or create a new question. This makes it easier for other people to search for questions. Thanks.
user438383
CC BY-SA 4.0
2020-12-19T20:49:06.633Z
SNPs don't belong to one population. Most of them differ by allele frequency between two population, unless one SNP is fixed in one population (which is very rare).
Phoenix Mu
CC BY-SA 4.0
2020-12-18T23:25:00.890Z
2020-12-18T23:25:00.890Z
Phoenix Mu
<p>What is the biology behind SNP based PCA analysis to study population structure?  I am reading some articles where they used PCA analysis to compare isolates of drosophila that is collected from a different location. AND by PCA they found that SNP is different between all populations. What does that mean? (what it tell you about population structure/genetics?)</p>

<snp><pca>
Biology behind PCA analysis based on SNP
# Biology behind PCA analysis based on SNP

(Asked by: username_0 on 2020-12-18)

What is the biology behind SNP based PCA analysis to study population structure? I am reading some articles where they used PCA analysis to compare isolates of drosophila that is collected from a different location. AND by PCA they found that SNP is different between all populations. What does that mean? (what it tell you about population structure/genetics?)

**Tags:** snp, pca

---

## 1 answers

### Answer by username_1 on 2020-12-18. Score: 1

First of all, PCA is a technique for dimension reduction. Basically, the goal is to compare tens of thousands of SNPs in Drosophila. Now if you only have 2 SNPs, you can plot them on a 2D scatter plot. If you have 3 SNPs, you may try a 3D plot. But now imagine you have 30,000 SNPs, but you CANNOT plot a 30000-dimensional plot. To visualize this high dimensional data, what we can do is to perform dimensional reduction like PCA. PCA tries to find a set of orthogonal coordinations that explains most of the variation in the data (if there no variation, there is no information contained in the data, which essentially means there is no data). The idea is that PC1 carries most variation can be explained, and PC2 carries the second most... For lower PCs like PC50 or PC60, they probably only carry noise in the data. Therefore, the higher PCs (PC1, PC2 and so on) effectively summarizes the useful information in the data. So you can visualize the "structure" of the data in a 2D PCA plot.

By looking at the distance between points on a PCA plot, you can tell how similar the two data points are. But if you see two populations that are perfectly separated on PCA plot, it does not mean that the 2 population differ completely at every SNP, because PCA is a summarization of all SNP included.

> **Comments:**
> **username_0**: I understood that PCA is performed to reduce dimensions. I didn't get  ""Now if you only have 2 SNP....."". let say I got 2 SNP and I want to plot that on scatter plot. What will the x and y-axis be?  And why with every SNPS dimensions are increasing. As you said that for 3 SNPs, I can use a 3d plot. What is the relation between SNPs and dimension?  
> **username_0**: one more question: Let say there are two population of drosophila A and B collected from 2 different locations. Both populations contain 5 isolates each.  After performing Variant calling analysis (for both populations at once) I got a VCF file showing that I have 5000snps. Here how would I know how many SNPs belong to each population? ( I am assuming 5000snps is detected from both 2 population collectively)  
> **username_2**: @Ashar please try not to ask additional questions in the comments. Add on any minor points to the main question or create a new question. This makes it easier for other people to search for questions. Thanks.  
> **username_1**: SNPs don't belong to one population. Most of them differ by allele frequency between two population, unless one SNP is fixed in one population (which is very rare).  

---

