Extract first 3 PC for all confounding variables to be used as covariates
0
0
Entering edit mode
3.6 years ago
hp16 ▴ 10

We are performing typical RNAseq workflow, so we have generated a counts matrix with genes as rows and samples as columns. We have a metadata file which contains all the samples as rows and the confounding variables as columns. We have identified a total of 7 confounding variables (biological and technical) such as age, sex, RIN, etc. that we have determined are confounding. We would like to perform PCA to extract the first 3 PC for all confounding variables, and then use the extracted PC1, PC2, PC3 as covariates for differential expression. Our question is how we could implement the data in the metadata file to the prcomp function, or another PCA R package that has this functionality? Thank you.

Confounding PCA Covariate prcomp Variable • 947 views
ADD COMMENT
0
Entering edit mode

Hello, if you post the code you have working so far, I should be able to clean it up.

ADD REPLY
0
Entering edit mode

Do not delete posts that have received feedback. Engage with the people that invest effort in your problem.

ADD REPLY

Login before adding your answer.

Traffic: 3804 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