Question: Plotting file eigenvec
6
gravatar for danielestrife
5.5 years ago by
Italy
danielestrife70 wrote:

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

plink pca gwas • 5.3k views
ADD COMMENTlink modified 4 weeks ago by zx87548.3k • written 5.5 years ago by danielestrife70

Relevant post: Gwas Stepwise Tutorial

ADD REPLYlink written 5.5 years ago by zx87548.3k
10
gravatar for chrchang523
5.5 years ago by
chrchang5235.7k
United States
chrchang5235.7k wrote:

This is straightforward in R.

  1. Load the .eigenvec file. E.g. eigenvec_table <- read.table('plink.eigenvec')

  2. 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])

ADD COMMENTlink modified 4 weeks ago by zx87548.3k • written 5.5 years ago by chrchang5235.7k

Hi Chris, Why there is a "#" in the header of plink2.eigenvec? when R read "plink2.eigenvec", "#" line will be ignored

ADD REPLYlink written 4 weeks ago by Shicheng Guo7.8k
1

That depends on how you read the file with R.

For consistency with VCF, practically all plink2-output header lines start with ‘#’.

ADD REPLYlink written 4 weeks ago by chrchang5235.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1721 users visited in the last hour