Using previously calculated PCs in GENESIS
1
0
Entering edit mode
@stephanie-m-gogarten-5121
Last seen 27 days ago
University of Washington

This question was sent by email:

I am using the GENESIS package, and I have a question regarding the usage of pcair function.

Is there a way to load previously calculated PC values onto pcair function and then use these values to predict PC values for a new set of samples. I know that pcair normally works like when you specify related and unrelated set. But since I already got the PC values from the reference set, I do not want to run everything  from scratch.

Could you please let me know if this option is available and where can I find it?
 

genesis snprelate • 897 views
ADD COMMENT
0
Entering edit mode
@stephanie-m-gogarten-5121
Last seen 27 days ago
University of Washington

You can use the SNPRelate package to project relatives onto existing PCs. You would first need to represent your PCs as a snpgdsPCA object, which is a list with elements sample.id, snp.id, eigenval, and eigenvect. See the man pages for snpgdsPCA, snpgdsPCASNPLoading and snpgdsPCASampLoading for more details.

library(SNPRelate)
gds <- snpgdsOpen("myfile.gds")
pca.unrel < snpgdsPCA(gds, sample.id=unrels)
snp.load <- snpgdsPCASNPLoading(pca.unrel, gdsobj=gds)
samp.load <- snpgdsPCASampLoading(snp.load, gdsobj=gds, sample.id=rels)
ADD COMMENT

Login before adding your answer.

Traffic: 1057 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6