kevinblighe / PCAtools

PCAtools: everything Principal Components Analysis
329 stars 67 forks source link

difference between PCA with and witout metadata #30

Closed Manonanthini closed 4 years ago

Manonanthini commented 4 years ago

Hi Kevin, Thanks for the package. I am a beginner. I would like to know two things i need

  1. If i run PCA for gene expression with metadata (Age,BMI,Sex etc.), shall i consider like i have adjusted the expression data with these covariates?
  2. If I want to get the correlated PCA object in eigencorplot(),is there any other way other than plotting. Please reply. Thanks in advance.
kevinblighe commented 4 years ago

Hi, thanks for using this package. Let me answer your questions:

"If i run PCA for gene expression with metadata (Age,BMI,Sex etc.), shall i consider like i have adjusted the expression data with these covariates?"

No, PCAtools performs no adjustment for any covariates.

"If I want to get the correlated PCA object in eigencorplot(),is there any other way other than plotting. Please reply. Thanks in advance."

To obtain the actual correlation values, you just need to perform a standard correlation between pcaobj$rotated and pcaobj$metadata.