This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How do you update plink bim file to remove 'chr' string?

I have a plink (bed, bim, fam) file. The .bim file has chr strings and I would like to remove chr. Is there any inherent command I can use? Is it Ok to just use unix command to remove chr?

head BFILE.bim
1       chr1:925875:A:G 0       925875  G       A
1       chr1:925881:G:A 0       925881  A       G
1       chr1:925912:C:G 0       925912  G       C

Result I want:

1       1:925875:A:G 0       925875  G       A
1       1:925881:G:A 0       925881  A       G
1       1:925912:C:G 0       925912  G       C
plink

1 answer

Two methods:

  1. It's fine to use a Unix one-liner to remove "chr" here.
  2. You could use plink 2.0 --set-all-var-ids to reconstruct the variant IDs.

Log in to answer this question.