Question: Find particular SNPs affecting PCA
gravatar for lovestowell
4.0 years ago by
United States
lovestowell10 wrote:

Hey there,

I have a set of ~13K SNPs across 16 individuals, 8 from each of two different species. Individuals were sequenced in two different sequencing runs. I am using the R package SNPRelate to calculate relatedness between pairs and to visualize the individuals in PCA space. The problem is that PCA is separating not only by species but also by sequencing run. This pattern persists even if I remove SNPs that are missing in many individuals.

I would like to find the particular SNPs that are separating the different sequencing runs and remove them from analyses. Any suggestions on finding the SNPs that are contributing to this pattern?



snprelate snp pca myposts • 1.0k views
ADD COMMENTlink modified 4.0 years ago by mkulecka310 • written 4.0 years ago by lovestowell10
gravatar for mkulecka
4.0 years ago by
European Union
mkulecka310 wrote:

Your PCA object should contain something like matrix of variable loadings. If you extract it, you could see which variables are strongly correleated with PC1, PC2 etc. For example, for object of class prcomp it can be done like this:

#pcobj is PCA object
v <- pcobj$rotation
v <-
v <- v[with(v,order(PC1)),]
v <- rbind(head(v),tail(v)) #correlation can be either negative or positive
ADD COMMENTlink modified 5 weeks ago by RamRS25k • written 4.0 years ago by mkulecka310
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1910 users visited in the last hour