the only used function here is makeFCSheet. the other are used for testings.
authorRami Rauch <rrauch@stanford.edu>
Wed, 20 Aug 2008 19:41:22 +0000 (19:41 +0000)
committerRami Rauch <rrauch@stanford.edu>
Wed, 20 Aug 2008 19:41:22 +0000 (19:41 +0000)
htswfrontend/htswfrontend/exp_track/views.py

index 37383f29286d77c85678e82cecc329d1ce06d8fe..38880166cd00fe644624c4d382608f288ec74a9d 100755 (executable)
@@ -2,6 +2,7 @@
 #from django.template import Context, loader
 #shortcut to the above modules
 from django.shortcuts import render_to_response, get_object_or_404
+#from htswfrontend.fctracker.models import *
 from htswfrontend.exp_track.models import *
 from django.http import HttpResponse
 from django.core.exceptions import ObjectDoesNotExist
@@ -32,3 +33,28 @@ def makeFCSheet(request,fcid):
     pass
   lanes = ['1','2','3','4','5','6','7','8']
   return render_to_response('exptrack/flowcellSheet.html',{'fc': rec})
+
+def test_Libs(request):
+  str = ''
+  str += '<table border=1><tr><th>Lib ID</th><th>Current Libaray Name (Free Text)</th><th>Auto-composed Libaray Name (antibody + celline + libid + species + [replicate])</th></tr>'
+  allLibs = Library.objects.all()
+  #allLibs = Library.objects.filter(antibody__isnull=False)
+  for L in allLibs:
+    str += '<tr>'
+    str += '<td>'+L.library_id+'</td><td>'+L.library_name+'</td>'   
+    str += '<td>'
+    str += L.experiment_type+'_'
+    if L.cell_line.cellline_name != 'Unknown':
+      str += L.cell_line.cellline_name+'_'
+
+    try:
+      if L.antibody is not None:
+        str += L.antibody.nickname + '_'
+    except Antibody.DoesNotExist:
+      pass
+  
+    str += 'Rep'+L.replicate.__str__()
+    str += '</td></tr>' 
+
+  str += '</table>'
+  return HttpResponse(str)