BEGIN { FS="\t"; a=0; b=0; both=0; neither=0 } FNR==1 { next } { hasA = ($12 != ".") hasB = ($13 != ".") if (hasA && hasB) both++ else if (hasA) a++ else if (hasB) b++ else neither++ } END { print "Method A only (gene body window): " a print "Method B only (nearest TSS): " b print "Both methods: " both print "Neither (dot): " neither }