added a flag for data submission status
authorRami Rauch <rrauch@stanford.edu>
Fri, 30 Jan 2009 00:09:09 +0000 (00:09 +0000)
committerRami Rauch <rrauch@stanford.edu>
Fri, 30 Jan 2009 00:09:09 +0000 (00:09 +0000)
htswfrontend/htswfrontend/htsw_reports/reports.py

index 012175909ea08e4d8193d84bc8279b3c58260090..844b7ff2f95f355fe378c6e83ff12352dd1ef81a 100755 (executable)
@@ -74,7 +74,7 @@ def report1(request):
 
   bgc = '#ffffff' 
   pbgc = '#f7f7f7'
-  str += '<br/><br/><table border=1 cellspacing="2">'
+  str += '<br/><br/><table border=1>'
   str += '<tr><th style="text-align:right">PROJECT</th><th colspan='+(Reps*len(CLLs)).__str__()+' style="text-align:center">'+AFL+' '+AFL_CNT+' <span style="font-size:140%">'+EXP+'</span></th></tr>'
   str += '<tr><th style="text-align:right">CELL LINE</th>'
   for H in CLLs: 
@@ -114,7 +114,10 @@ def report1(request):
               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 style='font-size:70%'>"+R1.library_id+", "+R1.condition.nickname
+          if R1.libtags().find('Data submitted to DCC') != -1:
+            str += "<div style='border:solid #666666 1px;background-color:#FFFFFF'>data submitted</div>"
+          str += "</div>"
           str += "</div>"
       str += '</td>'
     tbgc = bgc
@@ -148,10 +151,13 @@ def report1(request):
             else:
               cnt = rres[1]
               if cnt > 0:
-                str += "<div style='background-color:"+getBgColor(cnt,EXP)+";font-size:140%'>"
+                str += "<div style='background-color:"+getBgColor(cnt,EXP)+";font-size:140%;margin:2px'>"
                 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 style='font-size:70%'>"+R1.library_id+", "+R1.condition.nickname
+            if R1.libtags().find('Data submitted to DCC') != -1:
+              str += "<div style='border:solid #666666 1px;background-color:#FFFFFF'>data submitted</div>"
+            str += "</div>"
             str += "</div>"
         str += '</td>'
       tbgc = bgc
@@ -216,7 +222,7 @@ def report_RM(request): #for RNA-Seq and Methyl-Seq
     str += '  | '
     str += '<a target=_self href="/htsw_reports/report_RM?exp=RNA-seq&aflid='+AFL_Id+'"><b>RNA-Seq</b> Report</a>'
 
-  str += '<br/><br/><table border=1 cellspacing="2">'
+  str += '<br/><br/><table border=1>'
   str += '<tr><th colspan='+(Reps*len(CLLs)).__str__()+' style="text-align:center">'+AFL+' '+AFL_CNT+'  <span style="font-size:140%">'+EXP+'</span></th></tr>'
   str += '<tr>'
   bgc = '#ffffff'
@@ -260,7 +266,10 @@ def report_RM(request): #for RNA-Seq and Methyl-Seq
               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 style='font-size:70%'>\""+R1.library_name+"\""
+          if R1.libtags().find('Data submitted to DCC') != -1:
+            str += "<div style='width:75%;border:solid #666666 1px;background-color:#FFFFFF'>data submitted</div>"
+          str += "</div>"
           str += "</div>"
       str += '</td>'
     tbgc = bgc