Question: IMPUTE2: change names of specific SNPs
0
gravatar for m93
2.1 years ago by
m93170
m93170 wrote:

I have some files generated through IMPUTE2. They all look like so:

--- 8:50000031:C:T 50000031 C T 1 0 0 1 0 0 1 0 0 1 0 0 1
--- 8:50000032:G:A 50000032  C T 1 0 0 1 0 0 1 0 0 1 0 0 1

Associated with each file, I have a list of SNPs for which I would like to change the name. For example:

rs556779 50000031
rs556780 50000032

So based on the second column (SNP position), I wish to identify the SNP in my impute file and replace its name. The output file of my example would therefore look like this:

--- rs556779 50000031 C T 1 0 0 1 0 0 1 0 0 1 0 0 1
--- rs556780 50000032  C T 1 0 0 1 0 0 1 0 0 1 0 0 1

I am not sure how best to do this, but a solution in bash would be ideal. Many thanks.

names snps impute2 • 680 views
ADD COMMENTlink written 2.1 years ago by m93170
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: 1090 users visited in the last hour