[Solved] replace ./. with ‘-‘, 0/0 with value under REF, 1/1 with value under ALT and 0/1 with value under REF/ALT

Gavin Asks: replace ./. with ‘-‘, 0/0 with value under REF, 1/1 with value under ALT and 0/1 with value under REF/ALT

Code:
#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  H84021  BYU11001        BYU11002        BYU11003        BYU11004        BYU11005        BYU11006        BYU11007        BYU11008        BYU11009        BYU11010
15      2132    .       C       T       329.79  PASS    INFO    GT      ./.     ./.     ./.     0/0     0/0     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.
15      2403    .       C       A       574.93  PASS    INFO    GT      ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.
15      2413    .       A       C       47.84   PASS    INFO    GT      ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     0/0     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.     ./.
15      2736    .       G       C       179505  PASS    INFO    GT      0/0     0/0     0/0     0/0     0/0     0/0     ./.     0/0     1/1     1/1     1/1     ./.     0/0     1/1     0/0     1/1     1/1     0/0     0/0     1/1     ./.
15      2762    .       G       C       3812.55 PASS    INFO    GT      0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0
15      2928    .       G       C       98375.8 PASS    INFO    GT      0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0
15      2936    .       G       C       32196.3 PASS    INFO    GT      0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0     0/0

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.