#/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" && $4 ~ "ENSG" {print $1"\t"$4}'
done > tgvid2ensembl.tsv.tmp

cat tgvid2ensembl.tsv.tmp | awk '{print $1"@@@"$2}' | sort | uniq | sed -e 's/@@@/\t/g' > tgvid2ensembl.tsv && rm tgvid2ensembl.tsv.tmp

