Created
September 16, 2013 16:52
-
-
Save standage/6583304 to your computer and use it in GitHub Desktop.
Script for analyzing Maker output and comparing AED vs eAED scores
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import re | |
| aedgt = 0 | |
| eaedgt = 0 | |
| perfect = 0 | |
| nosupport = 0 | |
| for line in sys.stdin: | |
| if "\tmRNA\t" in line: | |
| m = re.search("ID=([^;]+);.+;_AED=([^;]+);_eAED=([^;]+)", line) | |
| print ",".join([m.group(1),m.group(2),m.group(3)]) | |
| if m.group(2) > m.group(3): | |
| aedgt += 1 | |
| elif m.group(3) > m.group(2): | |
| eaedgt += 1 | |
| if m.group(2) == "0.00" and m.group(3) == "0.00": | |
| perfect += 1 | |
| elif m.group(3) == "1.00": | |
| nosupport += 1 | |
| print >> sys.stderr, "AED score > eAED score %d times" % aedgt | |
| print >> sys.stderr, "AED score < eAED score %d times" % eaedgt | |
| print >> sys.stderr, "Transcripts with perfect congruence to aligned evidence: %d" % perfect | |
| print >> sys.stderr, "Transcripts with no support from aligned evidence: %d" % nosupport |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment