Using GNU awk
gawk -F '[=;]' '
NR == 1 {for (i=1; i<NF; i+=2) keys[$i]}
{for (i=1; i<NF; i+=2) value[$i][NR]values[$i][NR] = $(i+1)}
END {
PROCINFO["sorted_in"] = "@ind_str_asc"
for (key in keysvalues) printf "%s\t", key
print ""
for (line=1; line<=NR; line++) {
for (key in keysvalues) printf "%s\t", value[key][line]
print ""
}
}
' filename
AC AC_AFR AC_AMR AC_Adj AC_EAS AC_FIN AC_Het
126 0 0 126 120 0 112
12683 4578 559 12680 2104 501 91966
I'm using 2 field separator characters here, so all the odd-numbered fields are the keys, and all the even-numbered fields are the values.