Skip to content

Instantly share code, notes, and snippets.

@standage
Created September 16, 2013 16:52
Show Gist options
  • Select an option

  • Save standage/6583304 to your computer and use it in GitHub Desktop.

Select an option

Save standage/6583304 to your computer and use it in GitHub Desktop.
Script for analyzing Maker output and comparing AED vs eAED scores
#!/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