Hi All,
I want to examine the population structure using genotyped data. Using the smartpca program from the eigensoft package, I calculated principal components of genetic data using 'smartpca -p mydata > pca.log' command. Finally, I have got a lot of stuff in the file name 'pca.log' including removal of outliers (5 iteration), Tracy-Widom statistics, top 10 eigvalues, 10 eigenvector..etc.
Now, i don't have any idea how to plot the population structure in R software package. Does anyone have R script to plot using the first two principal components of genetic ancestry?
Thank you for your time!
First of all, thank you very much for your helpful hint. I have seen it the link and tried to adopt it. However, it is not working. I understood all the outputs from 'smartpca -p Itamba.par > Itamba.out' should be in the file 'Itamba.out'. So, 'Itamba_PCA.evec' and 'Itamba_PCA.eval' were not created as separate output file and I couldn't find inside 'Itamba.out' output file. Is there a way to create these two output files from the main output file ('Itamba.out')? Becuase it has been used separately.
Thank you in advance.
Not all the output is in one file. The output file names are specified in a configuration file. In this example, the configuration file is called Itamba.par and in this file, the file 'Itamba_PCA.evec' (containing the PCs/eigenvectors) should be specified as value for the parameter named 'evecoutname' i.e. as
'evecoutname:'Itamba_PCA.evec'. Same for eigenvalues and parameter 'evaloutname'. These parameters should be required so check that you have specified the correct file name/path and/or that you don't get any error message.
Now, it is fine. I am grateful. I owe you.