else:
cnt = 0
for R1 in repReads:
- cnt = R1.aligned_m_reads()[1]
- if cnt > 0:
- str += "<div style='background-color:"+getBgColor(cnt,EXP)+";font-size:140%'>"
- str += "%1.2f" % (cnt/1000000.0)+" M"
- else: str += "<div style='background-color:#ff3300;width:100%;font-size:140%'>0 Reads"
+ rres = R1.aligned_m_reads()
+ # Check data sanlty
+ if rres[2] != 'OK':
+ str += '<div style="border:solid red 2px">'+rres[2]
+ else:
+ cnt = rres[1]
+ if cnt > 0:
+ str += "<div style='background-color:"+getBgColor(cnt,EXP)+";font-size:140%'>"
+ str += "%1.2f" % (cnt/1000000.0)+" M"
+ else: str += "<div style='background-color:#ff3300;width:100%;font-size:140%'>0 Reads"
str += "<div style='font-size:70%'>"+R1.library_id+", "+R1.condition.nickname+"</div>"
str += "</div>"
str += '</td>'
else:
cnt = 0
for R1 in repReads:
- cnt = R1.aligned_m_reads()[1]
- if cnt > 0:
- str += "<div style='background-color:"+getBgColor(cnt,EXP)+";font-size:140%'>"
- str += "%1.2f" % (cnt/1000000.0)+" M"
- else: str += "<div style='background-color:#ff3300;width:100%;font-size:140%'>0 Reads"
+ rres = R1.aligned_m_reads()
+ # Check data sanlty
+ if rres[2] != 'OK':
+ str += '<div style="border:solid red 2px">'+rres[2]
+ else:
+ cnt = rres[1]
+ if cnt > 0:
+ str += "<div style='background-color:"+getBgColor(cnt,EXP)+";font-size:140%'>"
+ str += "%1.2f" % (cnt/1000000.0)+" M"
+ else: str += "<div style='background-color:#ff3300;width:100%;font-size:140%'>0 Reads"
str += "<div style='font-size:70%'>"+R1.library_id+", "+R1.condition.nickname+"</div>"
str += "</div>"
str += '</td>'
else:
cnt = 0
for R1 in repReads:
- cnt = R1.aligned_m_reads()[1]
- if cnt > 0:
- str += "<div style='background-color:"+getBgColor(cnt,EXP)+";border:solid #cccccc 1px;font-size:140%'>"
- str += "%1.2f" % (cnt/1000000.0)+" M"
- else: str += "<div style='background-color:#ff3300;border:solid #cccccc 1px;width:100%;font-size:140%'>0 Reads"
+ rres = R1.aligned_m_reads()
+ # Check data sanlty
+ if rres[2] != 'OK':
+ str += '<div style="border:solid red 2px">'+rres[2]
+ else:
+ cnt = rres[1]
+ if cnt > 0:
+ str += "<div style='background-color:"+getBgColor(cnt,EXP)+";border:solid #cccccc 1px;font-size:140%'>"
+ str += "%1.2f" % (cnt/1000000.0)+" M"
+ else: str += "<div style='background-color:#ff3300;border:solid #cccccc 1px;width:100%;font-size:140%'>0 Reads"
str += "<div style='font-size:80%'><a title='View Record' target=_self href=/admin/fctracker/library/?q="+R1.library_id+">"+R1.library_id+"</a>, "+R1.condition.nickname+", "+R1.library_species.common_name+"</div>"
str += "<div style='font-size:70%'>\""+R1.library_name+"\"</div"
str += "</div>"