Entering edit mode
9.1 years ago
AB
▴
360
Hi everyone,
I have RNA-Seq data from 22 samples and 3 batches. I used bioconductor to generate the RPKM values. I want to see if there is any batch effect in my dataset. How do i use RPKM matrix as an input to perform PCA ? Any help is appreciated.
Thanks,
apoorva
That worked. Thank you very much
feel free to mark this problem as solved, and up-vote my solution :D
Note that there is a distinction between plotting the component loadings (as done above and held in
rotation
) and plotting the rotated data multiplied by the component loadings (held inx
). Both my own and that of DESeq2 plot the data held in the x variable: A: PCA plot from read count matrix from RNA-SeqHi,
I am trying to make a PCA plot. I have 17 samples, how can I make it ?
text(pca$rotation[,1],pca$rotation[,2], row.names(pca$rotation), cex=0.5, pos=4)
When I type the codes above, I receive different results. I mean positions of samples are changing according to the parameter in the code below:
plot(pca$rotation[,1],pca$rotation[,2]
these two codes show different positions of samples.
Yes, they will likely differ. You are plotting the 1st and 2nd components in one, whilst, in the other, the 1st and 17th components.
Take a look here: A: PCA plot from read count matrix from RNA-Seq