Hello there, after reading a few posts here about this particular topic, I guess I solved this 'puzzling' issue and I just need to check that this is the correct way to do this. Essentially, I need to output the PC1 and PC2 from plotPCA function in order to let someone else to play around with an external software these data.
rv <- rowVars(assay(rld)) select <- order(rv, decreasing = TRUE)[seq_len(min(500,length(rv)))] pca <- prcomp(t(assay(rld)[select, ])) intgroup.df <- as.data.frame(colData(rld)[, intgroup, drop = FALSE]) pca$x[,1] pca$x[,2]
Is this the correct way to proceed?
Thanks in advance.