This is a test version of Biostars. For the public version, visit https://www.biostars.org.
IMPUTE2: change names of specific SNPs

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

0 answers

No answers yet.

Log in to answer this question.