How do you update plink bim file to remove 'chr' string?
1
0
Entering edit mode
2.8 years ago
MAPK2 ▴ 40

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.1k views
ADD COMMENT
2
Entering edit mode
2.8 years ago

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.
ADD COMMENT

Login before adding your answer.

Traffic: 3133 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