Closed Ray569743422 closed 3 years ago
I guess maf and p-values are provided in the result. You can read SNP positions and other variant information from the .bim (using e.g. bigreadr::fread()
) file which comes together with the .bed and .fam files.
Thanks for your fast reply. I still have a question.
1.Is each line of .bim file corresponding to the line of x$pvalues ?For example, the first line of .bim file is corresponding to the first line of x$pvalue ? 2. Is there a method for selecting best K value or just by the screeplot?
They should be in the same order, yes.
Looking at the screeplot is a good solution (sometimes better to use a log-scale for the y-axis). In addition, looking at PC scores can be useful to see if they actually show any population structure.
Thanks for your reply!
How can I merge these information into a new dataframe then save it ?