# from fss2mor s/OPZ/(opz)/g s/OFZ/(ofz)/g s/ODZ/(odz)/g s/OHZ/(ohz)/g s/4OPZ/(qopz)/g s/4OFZ/(qofz)/g s/4ODZ/(qodz)/g s/4OHZ/(qohz)/g s/EPZ/(epz)/g s/EFZ/(efz)/g s/EHZ/(ehz)/g s/EDZ/(edz)/g s/OH/(oh)/g s/OD/(od)/g s/4OH/(qoh)/g s/4OD/(qod)/g s/EH/(eh)/g s/ED/(ed)/g s/OP/(op)/g s/OF/(of)/g s/4OP/(qop)/g s/4OF/(qof)/g # from make-consensus-interlin (pre-dynprog): { # Update consensus text: cm = length(curtxt) om = length(oldtxt) # print oldtxt > "/dev/stderr" # print curtxt > "/dev/stderr" if (cm != om) { flagrec(("text length mismatch curloc = " curloc " cm = " cm " om = " om), $0); next } newtxt = "" for (i=1;i<=cm;i++) { ci = substr(curtxt,i,1) oi = substr(oldtxt,i,1) if ((ci == oi) || (ci == "?") || (oi == "!")) { newtxt = (newtxt ci) } else if ((ci == "!") || (oi == "?")) { newtxt = (newtxt oi) } else { newtxt = (newtxt "?") } } oldtxt = newtxt }