Off topic:Principle component ananlysis, variable selection
0
0
Entering edit mode
3.4 years ago

while performing PCA to reduce the dimension of the variable using "Factomine R" package in R. I want to extract the each individual gene contribution towards principle component. using this function "var$contrib:" I extracted the file but I unable to set the cut off I mean upto which cutoff I have to select the genes.

I am also attaching the code:

library("FactoMineR") library("factoextra")

data2 <- read.csv('t_data_processed_1_scale1.csv', header = TRUE) res.pca <- PCA(data2[,1:X]) print(res.pca) var <- get_pca_var(res.pca) var eig.val <- get_eigenvalue(res.pca) eig.val write.csv(eig.val,"feature_eigval_tissue.csv")

fviz_contrib(res.pca, choice = "var", axes = 1, top = 10)

featureCos2=var$cos2 write.csv(featureCos2,"featureCos2_tissue_new.csv") featureContrib=var$contrib write.csv(featureContrib,"featureContrib_tissue_new.csv")
Gene selection PCA • 433 views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 1212 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