#/bin/bash

for i in `seq 1 22; echo X; echo Y; echo MT`
do
  cat ../TogoVar.vep.out.20210308.chr${i}.tab 			|\
  awk '$1 !~ "#" && $1 ~ "tgv" && $21 ~ /^[0-9]+$/{print $1"\t"$21}' 
done > tgvid2hgnc.tsv.tmp

cat tgvid2hgnc.tsv.tmp | awk '{print $1,$2,$1"_"$2}' | sort -k 3 | uniq | awk '{print $1"\t"$2}' > tgvid2hgnc.tsv && rm tgvid2hgnc.tsv.tmp
