diff shm_csr.py @ 7:ad9be244b104 draft

Uploaded
author davidvanzessen
date Mon, 07 Nov 2016 03:04:07 -0500
parents 275ab5175fd6
children 4e596473c25c
line wrap: on
line diff
--- a/shm_csr.py	Tue Nov 01 10:48:38 2016 -0400
+++ b/shm_csr.py	Mon Nov 07 03:04:07 2016 -0500
@@ -247,9 +247,12 @@
 	
 
 def get_xyz(lst, gene, f, fname):
+	
 	x = int(round(f(lst)))
 	y = valuedic[gene + "_" + fname]
 	z = str(round(x / float(y) * 100, 1)) if y != 0 else "0"
+	if gene == "unmatched":
+		print x, y, z
 	return (str(x), str(y), z)
 
 dic = {"RGYW": RGYWCount, "WRCY": WRCYCount, "WA": WACount, "TW": TWCount}
@@ -271,8 +274,8 @@
 				else:
 					x, y, z = get_xyz([curr[x] for x in [y for y, z in genedic.iteritems() if geneMatcher.match(z)]], gene, func, fname)
 					o.write("," + x + "," + y + "," + z)
-
 			x, y, z = get_xyz([y for x, y in curr.iteritems() if not genedic[x].startswith("unmatched")], "total", func, fname)
+			#x, y, z = get_xyz([y for x, y in curr.iteritems()], "total", func, fname)
 			o.write("," + x + "," + y + "," + z + "\n")