Search
Question: Using previously calculated PCs in GENESIS
0
gravatar for Stephanie M. Gogarten
20 days ago by
University of Washington
Stephanie M. Gogarten560 wrote:

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?
 

ADD COMMENTlink modified 20 days ago • written 20 days ago by Stephanie M. Gogarten560
0
gravatar for Stephanie M. Gogarten
20 days ago by
University of Washington
Stephanie M. Gogarten560 wrote:

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 COMMENTlink modified 20 days ago • written 20 days ago by Stephanie M. Gogarten560
Please log in to add an answer.

Help
Access

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