How to determine if any samples are outliers in PCA? What is the criteria?
1
0
Entering edit mode
Yijing • 0
@d0a8eb95
Last seen 14 months ago
Germany

Hello everyone,

I use the following code to plot PCA:

tpm <- (assays(se)$abundance[apply(assays(se)$abundance, MARGIN = 1, FUN = function(x) sd(x) != 0),])  
logtpm <- log2(tpm + 1)
tpm_centered <- t(logtpm-rowMeans(logtpm))
pca <- prcomp(tpm_centered , scale=TRUE, center=TRUE)
pca_df <- data.frame(pca$x, colData(se))
ggplot(pca_df, aes(x = PC1, y = PC2, color = TissueArea)) +
  geom_point() +
  labs(x = "PC1", y = "PC2", color = "TissueArea")

But I do not know how to label the outliers and also I do not know what is the criterial for outliers. Do you have any experience or tutorial to share? Many thanks! enter image description here

"PCA" miaSim • 585 views
ADD COMMENT
1
Entering edit mode
ATpoint ★ 4.5k
@atpoint-13662
Last seen 14 hours ago
Germany

I would suggest posting at at biostars. This is not obviously related to Bioconductor.

ADD COMMENT

Login before adding your answer.

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