Entering edit mode
10.3 years ago
kumar.vinod81
▴
340
I am doing PCA analysis through SNPRelate. Its Generating the PCA plot but completely blank without any error. What to do?
Other question is that how can I add population information in my .gds file as I am working on a plant species. SNPRelate tutorial example file is working very smoothly but I its not user friendly for others.
Can you post the piece of code that you are using ?
Note: Results are generated from .gds file
One possibility could be the eigenvectors EV1 or EV2 contains NaN as values. You can check the actual value by just typing pca$eigenvect[,1] or pca$eigenvect[,2]
but values are there in file as you look at my previous comment
Then the problem is with the
col=as.integer(tab$pop)
as I could not see any column pop in the tab data structure.How can I add this column in my data, because in SNPRelate documentation, it is not written.
SNPrelate is an R package. To add the column you just have to add a column to a data.frame. There are several websites explaining this, e.g. this one might help you: https://stackoverflow.com/questions/10150579/adding-a-column-to-a-data-frame