This works perfectly! I was wondering if I could modify the command in such a way that (added to the question are the last row and column) I separately pick the Type of variant without bothering about the Exon column.
I tried sort -t $'\t' -k1,1 -k6,6gr inputFile | sort -t $'\t' -uk1,1 --merge and sort -t $'\t' -k1,1 -k6,6gr inputFile | sort -t $'\t' -uk6,6 --merge, both with and without the -u option, but I only retrieve 3_prime_UTR ( while I'm trying to retrieve both3_prime_UTR and upstream_gene_variant). This is not a key requirement, it's just out of curiosity, so put in too much time with this.
Thank again :)