Files
annotate/detectors/cds/tools/chlorodb/subdb/lib/db.annot.awk
alain viari e4d6a8484d cds/tools/chlorodb added
Former-commit-id: 0579e878a69b7c285ca71870e9ca5730649a2fda
Former-commit-id: 7cced5b488441d87bf070a9a444317db0e048880
2015-11-13 17:41:18 +01:00

40 lines
564 B
Awk

#
/^>/ {
N++
na = split($1, a, "@")
if (a[na-1] > NEXMAX) NEXMAX = a[na-1]
NEX[a[na-1]]++
ANNOT[$NF]++
}
END {
na = split(FILENAME, a, "/")
na = split(a[na], a, "\\.")
printf("%s %d ", a[1], N)
s = ""
for (i = 1 ; i <= NEXMAX ; i ++) {
if (NEX[i] != 0)
s = s "" i ":" NEX[i] "_"
}
gsub("_+$", "", s)
printf("%s ", s)
s = (NEXMAX == 1) ? "MONEX" : "POLYEX"
printf("%s ", s)
nmax = 0
amax = "none"
for (e in ANNOT) {
if (ANNOT[e] > nmax) {
nmax = ANNOT[e]
amax = e
}
}
print amax
}