This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Remove prefix chrom:position before rsIDs

Hi,

I have plink files with SNPs annotated like "exm" or with chromosomal position followed by the rsID,

6:33960611:rs2495990    0       33960611        A       G    
6:33962404:rs2130410    0       33962404        A       C       

Does anyone know how I can change the bim file so that it only contains the rsID?

Any help is appreciated!

plink regex bim snp

Just wondering how did you solve this problem?

1 answer

Presumably cut -f 3 -d ":" would work. It's just splitting each line by : and keeping the resulting 3rd column.

just leaving the result of that command here for illustration:

rs2495990    0       33960611        A       G
rs2130410    0       33962404        A       C

Log in to answer this question.