IMPUTE2: change names of specific SNPs
0
0
Entering edit mode
6.6 years ago
m98 ▴ 420

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.

impute2 SNPs names • 1.8k views
ADD COMMENT

Login before adding your answer.

Traffic: 2052 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6