I am trying to reformat the reference legend files to make them compatible with bcftools.
Essentially, I need to go from this:
id position a0 a1 TYPE AFR AMR EAS EUR SAS ALL
1:123:A:T 123 A T SNP 0.01 0.01 0 0 0 0.01
1:679:A:T 123 A T SNP 0.01 0.01 0 0 0 0.01
to this:
id position a0 a1 TYPE AFR AMR EAS EUR SAS ALL
1:123_A_T 123 A T SNP 0.01 0.01 0 0 0 0.01
1:679_A_T 123 A T SNP 0.01 0.01 0 0 0 0.01
ideally using bash.