Hi Chris, Why there is a "#" in the header of plink2.eigenvec? when R read "plink2.eigenvec", "#" line will be ignored
Plotting file eigenvec
Good morning,
I'm doing a research on GWAS and I've obtained some file .eigenvec and .eigenval after executing the command --pca on PLINK 1.9.
How can I plot those files? What software can i use for this purpose?
Thank you in advance
• 10,371 views
•
link
1 answer
This is straightforward in R.
Load the .eigenvec file. E.g.
eigenvec_table <- read.table('plink.eigenvec')Use
plot()on the columns you're interested in. Top eigenvector will be in column 3, second eigenvector will be in column 4, etc., so if you want a set of pairwise plots covering the top 4 eigenvectors, use e.g.plot(eigenvec_table[3:6])
• 0 views
•
link
Log in to answer this question.
Relevant post: Gwas Stepwise Tutorial
Thank you that's what I need