+
+ def aligned_reads(self):
+ res = getLibReads(self.library_id)
+ rc = "%1.2f" % (res[1]/1000000.0)
+ # Color Scheme: green is more than 10M, blue is more than 5M, orange is more than 3M and red is less. For RNAseq, all those thresholds should be doubled
+ if res[0] > 0:
+ bgcolor = '#ff3300' # Red
+ rc_thr = [10000000,5000000,3000000]
+ if self.experiment_type == 'RNA-seq':
+ rc_thr = [20000000,10000000,6000000]
+
+ if res[1] > rc_thr[0]:
+ bgcolor = '#66ff66' # Green
+ else:
+ if res[1] > rc_thr[1]:
+ bgcolor ='#00ccff' # Blue
+ else:
+ if res[1] > rc_thr[2]:
+ bgcolor ='#ffcc33' # Orange
+ tstr = '<div style="background-color:'+bgcolor+';color:black">'
+ tstr += res[0].__str__()+' Lanes, '+rc+' M Reads'
+ tstr += '</div>'
+ else: tstr = 'not processed yet'
+ return tstr
+ aligned_reads.allow_tags = True
+