Question: Using previously calculated PCs in GENESIS
0
gravatar for Stephanie M. Gogarten
12 months ago by
University of Washington
Stephanie M. Gogarten680 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?
 

snprelate genesis • 191 views
ADD COMMENTlink modified 12 months ago • written 12 months ago by Stephanie M. Gogarten680
Answer: Using previously calculated PCs in GENESIS
0
gravatar for Stephanie M. Gogarten
12 months ago by
University of Washington
Stephanie M. Gogarten680 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 12 months ago • written 12 months ago by Stephanie M. Gogarten680
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 16.09
Traffic: 157 users visited in the last hour