Add pages to show information about a particular flowcell.
authorDiane Trout <diane@caltech.edu>
Sat, 2 Apr 2011 01:13:59 +0000 (18:13 -0700)
committerDiane Trout <diane@caltech.edu>
Sat, 2 Apr 2011 01:13:59 +0000 (18:13 -0700)
-- in both human and RDFa formats.

Also I implemented get_absolute_url for flowcells & lanes, which
means "view on site" pops up on the flowcell admin page.

Also with modifying the templates for RDFa, many more elements
on the library, flowcell, and flowcell lane detail pages link to
each other.

I moved the table formatting css out of the library page
and into app.css.

I also switched experiments/views.py from using Context to RequestContext
which provides the default media url to the template.

There were a few changes to samples/views.py to get the more informative
object to the template instead of our on-the-fly created lists.

13 files changed:
htsworkflow/frontend/experiments/models.py
htsworkflow/frontend/experiments/views.py
htsworkflow/frontend/samples/models.py
htsworkflow/frontend/samples/urls.py
htsworkflow/frontend/samples/views.py
htsworkflow/frontend/static/css/app.css
htsworkflow/frontend/templates/base.html
htsworkflow/frontend/templates/experiments/flowcell_detail.html [new file with mode: 0644]
htsworkflow/frontend/templates/experiments/flowcell_lane_detail.html [new file with mode: 0644]
htsworkflow/frontend/templates/samples/library_detail.html
htsworkflow/frontend/templates/samples/library_index.html
htsworkflow/frontend/templates/samples/species_detail.html [new file with mode: 0644]
htsworkflow/frontend/urls.py

index 6554405dab8cdfdc13fcd33005660f8499b1ecc8..10599e2174c0330cd2e16908bdf602179ac6f943 100755 (executable)
@@ -88,6 +88,11 @@ class FlowCell(models.Model):
       return u"Paired"
     else:
       return u"Single"
+
+  @models.permalink
+  def get_absolute_url(self):
+      return ('htsworkflow.frontend.experiments.views.flowcell_detail',
+              [str(self.flowcell_id)])
     
 ### -----------------------
 class DataRun(models.Model):
@@ -157,3 +162,8 @@ class Lane(models.Model):
   cluster_estimate = models.IntegerField(blank=True, null=True)                                       
   status = models.IntegerField(choices=LANE_STATUS_CODES, null=True, blank=True) 
   comment = models.TextField(null=True, blank=True)
+
+  @models.permalink
+  def get_absolute_url(self):
+       return ('htsworkflow.frontend.experiments.views.flowcell_lane_detail',
+               [str(self.flowcell.flowcell_id), str(self.lane_number)])
index 7b6d4bae40a8b5886d2796a16d267d28462a473f..b1873638f35664d906f3aab7fb5dbf21e7b03b61 100755 (executable)
@@ -8,7 +8,7 @@ from django.core.exceptions import ObjectDoesNotExist
 from django.core.mail import EmailMessage, mail_managers
 from django.http import HttpResponse
 from django.shortcuts import render_to_response, get_object_or_404
-from django.template import Context
+from django.template import RequestContext
 from django.template.loader import get_template
 
 from htsworkflow.frontend.experiments.models import *
@@ -87,13 +87,14 @@ def startedEmail(request, pk):
     for user_email in email_lane.keys():
         sending = ""
         # build body
-        context = Context({u'flowcell': fc,
-                   u'lanes': email_lane[user_email],
-                   u'runfolder': 'blank',
-                   u'finish_low': estimate_low,
-                   u'finish_high': estimate_high,
-                   u'now': datetime.now(),        
-                  })
+        context = RequestContext(request,
+                                 {u'flowcell': fc,
+                                  u'lanes': email_lane[user_email],
+                                  u'runfolder': 'blank',
+                                  u'finish_low': estimate_low,
+                                  u'finish_high': estimate_high,
+                                  u'now': datetime.now(),        
+                                  })
 
         # build view
         subject = "Flowcell %s" % ( fc.flowcell_id )
@@ -108,14 +109,15 @@ def startedEmail(request, pk):
 
         emails.append((user_email, subject, body, sending))
 
-    verify_context = Context({
-        'emails': emails,
-        'flowcell': fc,
-        'from': sender,
-        'send': send,
-        'site_managers': settings.MANAGERS,
-        'title': fc.flowcell_id,
-        'warnings': warnings,
+    verify_context = RequestContext(
+        request,
+        { 'emails': emails,
+          'flowcell': fc,
+          'from': sender,
+          'send': send,
+          'site_managers': settings.MANAGERS,
+          'title': fc.flowcell_id,
+          'warnings': warnings,
         })
     return HttpResponse(email_verify.render(verify_context))
     
@@ -123,3 +125,29 @@ def finishedEmail(request, pk):
     """
     """
     return HttpResponse("I've got nothing.")
+
+
+def flowcell_detail(request, flowcell_id):
+    fc = get_object_or_404(FlowCell, flowcell_id=flowcell_id)
+
+    print unicode(fc.get_absolute_url())
+    for lane in fc.lane_set.all():
+        print unicode(lane.get_absolute_url())
+        
+    context = RequestContext(request,
+                             {'flowcell': fc})
+    
+    return render_to_response('experiments/flowcell_detail.html',
+                              context)
+
+def flowcell_lane_detail(request, flowcell_id, lane_number):
+    fc = get_object_or_404(FlowCell, flowcell_id=flowcell_id)
+    lane = get_object_or_404(fc.lane_set, lane_number=lane_number)
+
+    context = RequestContext(request,
+                             {'lib': lane.library,
+                              'lane': lane,
+                              'flowcell': fc})
+    
+    return render_to_response('experiments/flowcell_lane_detail.html',
+                              context)
index 8314c71f5e685f2cd44d28805959ddafeb3e5adf..a8201c9c39068477736ab6fbd845e9c3bc161fd8 100644 (file)
@@ -102,6 +102,10 @@ class Species(models.Model):
   class Meta:
     verbose_name_plural = "species"
     ordering = ["scientific_name"]
+
+  @models.permalink
+  def get_absolute_url(self):
+    return ('htsworkflow.frontend.samples.views.species', [str(self.id)])
   
 class Affiliation(models.Model):
   name = models.CharField(max_length=256, db_index=True, verbose_name='Name')
@@ -286,9 +290,6 @@ class Library(models.Model):
   @models.permalink
   def get_absolute_url(self):
     return ('htsworkflow.frontend.samples.views.library_to_flowcells', [str(self.id)])
-    
-  
-    
 
 
 class HTSUser(User):
index 470ab933cccc14168ec453239bf5252bf32c8b9b..eb3fa467aa13dd1b96814696e4846ef3f436d8ba 100644 (file)
@@ -3,4 +3,5 @@ from django.conf.urls.defaults import *
 urlpatterns = patterns('',
     (r"^library/(?P<library_id>\w+)/json", 'htsworkflow.frontend.samples.views.library_json'),
     (r"^species/(?P<species_id>\w+)/json", 'htsworkflow.frontend.samples.views.species_json'),
+    (r"^species/(?P<species_id>\w+)", 'htsworkflow.frontend.samples.views.species'),
 )
index a6286d7313072c706ed2e8225e3fd398d28dd290..c57508fa120efc6645ecb78e58e7b2cefadb943e 100644 (file)
@@ -12,7 +12,7 @@ except ImportError, e:
 from htsworkflow.frontend.auth import require_api_key
 from htsworkflow.frontend.experiments.models import FlowCell, Lane, LANE_STATUS_MAP
 from htsworkflow.frontend.samples.changelist import ChangeList
-from htsworkflow.frontend.samples.models import Library, HTSUser
+from htsworkflow.frontend.samples.models import Library, Species, HTSUser
 from htsworkflow.frontend.samples.results import get_flowcell_result_dict, parse_flowcell_id
 from htsworkflow.frontend.bcmagic.forms import BarcodeMagicForm
 from htsworkflow.pipelines.runfolder import load_pipeline_run_xml
@@ -26,7 +26,7 @@ from htsworkflow.util import opener
 
 from django.core.exceptions import ObjectDoesNotExist
 from django.http import HttpResponse, HttpResponseRedirect, Http404
-from django.shortcuts import render_to_response
+from django.shortcuts import render_to_response, get_object_or_404
 from django.template import RequestContext
 from django.template.loader import get_template
 from django.contrib.auth.decorators import login_required
@@ -68,6 +68,7 @@ def create_library_context(cl):
     #for lib in library_items.object_list:
     for lib in cl.result_list:
        summary = {}
+       summary['library'] = lib
        summary['library_id'] = lib.id
        summary['library_name'] = lib.library_name
        summary['species_name' ] = lib.library_species.scientific_name
@@ -391,13 +392,14 @@ def get_eland_result_type(pathname):
     else:
         return 'unknown'
 
-def _make_eland_results(flowcell_id, lane, interesting_flowcells):
+def _make_eland_results(flowcell_id, lane_number, interesting_flowcells):
     fc_id, status = parse_flowcell_id(flowcell_id)
     cur_fc = interesting_flowcells.get(fc_id, None)
     if cur_fc is None:
       return []
 
     flowcell = FlowCell.objects.get(flowcell_id=flowcell_id)
+    lane = flowcell.lane_set.get(lane_number=lane_number)
     # Loop throw storage devices if a result has been archived
     storage_id_list = []
     if cur_fc is not None:
@@ -421,6 +423,7 @@ def _make_eland_results(flowcell_id, lane, interesting_flowcells):
         result_path = cur_fc[cycle]['eland_results'].get(lane, None)
         result_link = make_result_link(fc_id, cycle, lane, result_path)
         results.append({'flowcell_id': fc_id,
+                        'flowcell': flowcell,
                         'run_date': flowcell.run_date,
                         'cycle': cycle, 
                         'lane': lane, 
@@ -552,9 +555,7 @@ def library_json(request, library_id):
     require_api_key(request)
     # what validation should we do on library_id?
     
-    lib = library_dict(library_id)
-    if lib is None:
-        raise Http404
+    lib = get_object_or_404(Library, library_id=library_id)
 
     lib_json = json.dumps(lib)
     return HttpResponse(lib_json, mimetype='application/json')
@@ -565,6 +566,14 @@ def species_json(request, species_id):
     """
     raise Http404
 
+def species(request, species_id):
+    species = get_object_or_404(Species, id=species_id)
+    
+    context = RequestContext(request,
+                             { 'species': species })
+
+    return render_to_response("samples/species_detail.html", context)
+
 @login_required
 def user_profile(request):
     """
index 32c55e509797b960980c10c017381dbfd145c0bf..fec1733829d7739f9f71fad34f8a858f58657a36 100644 (file)
@@ -31,3 +31,55 @@ div.msg {
     color: white;
     background: #880000;
 }
+
+div.htswdetail {
+    margin: 0;
+    padding: 0;
+}
+div.htswdetail table, div.htswdetail td {
+    border-style: solid;
+}
+div.htswdetail table {
+    border-width: 0 0 1px 1px;
+    border-spacing: 0;
+    border-collapse: collapse;
+}
+div.htswdetail td {
+    margin: 0;
+    padding: 3px;
+    border-width: 1px 1px 0 0;
+}
+div.htswdetail thead {
+    text-align: center;
+}
+div.htswdetail tbody {
+    text-align: left;
+  }
+div.htswdetail h1,
+div.htswdetail h2
+{
+    font-size: 150%;
+}
+
+div.htswdetail h3 {
+     font-size: 125%;
+     margin: 0;
+}
+
+  div.htswdetail h4,
+  div.htswdetail h5,
+  div.htswdetail ul,
+  div.htswdetail ol,
+  div.htswdetail li
+  {
+    list-style: none;
+    margin: 0;   
+  }
+
+  div.htswdetail ul,
+  div.htswdetail ol
+  {
+    margin-bottom: .5em;
+  }
+ /* ]]> */
+</style>
index ed9ffb90c204071b7752c56daf8269701e9a2b61..479f470fd18c897fb9cf03a5af8c02bd9a15efaf 100644 (file)
         <div id="branding">
         {% block branding %}{% endblock %}
         </div>
-        {% if user.is_authenticated and user.is_staff %}
-        <div id="user-tools">{% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="/admin/password_change/">{% trans 'Change password' %}</a> / <a href="/admin/logout/">{% trans 'Log out' %}</a>{% endblock %} 
-        </div>
+        <div id="user-tools">
+        {% if user.is_authenticated %}
+        {% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="/admin/password_change/">{% trans 'Change password' %}</a> / <a href="/admin/logout/">{% trans 'Log out' %}</a>{% endblock %} 
+        {% else %}
+        <a href="/admin/login/">{% trans 'Log in' %}</a>
         {% endif %}
+        </div>
         {% block nav-global %}{% endblock %}
     </div>
     {% endif %}
diff --git a/htsworkflow/frontend/templates/experiments/flowcell_detail.html b/htsworkflow/frontend/templates/experiments/flowcell_detail.html
new file mode 100644 (file)
index 0000000..3c9329c
--- /dev/null
@@ -0,0 +1,58 @@
+{% extends "base_site.html" %}
+{% load adminmedia humanize i18n %}
+{% block extrahead %}
+    <!-- App Stuff -->
+    <link type="text/css" rel="stylesheet" href="/static/css/app.css" />
+    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
+    
+    {% block additional_javascript %}
+    {% endblock %}
+{% endblock %}
+
+{% block content %}
+<div id="flowcell_detail">
+  <h2>About this Flowcell</h2>
+  <b>Flowcell</b>: 
+    <a href="{{flowcell.get_absolute_url}}" property="libns:flowcell_id">{{flowcell.flowcell_id}}</a><br/>
+  <b>Run Date</b>:
+    <span property="libns:date" content="{{flowcell.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ flowcell.run_date }}</span><br/>
+  <b>Type</b>: 
+    <span property="libns:flowcell_type">{{flowcell.flowcell_type}}</span><br/>
+  <b>Read Length</b>:
+    <span property="libns:read_length">{{flowcell.read_length}}</span><br/>
+  <b>Control Lane</b>:
+    <span property="libns:control_lane">{{flowcell.control_lane}}</span><br/>
+
+  <b>Notes</b>:
+    <p property="libns:flowcell_notes">{{flowcell.notes}}</p>
+  <div class="htswdetail">
+    <h2>Lanes</h2>
+    <table>
+      <thead>
+       <tr>
+         <td>Lane</td>
+         <td>Library ID</td>
+         <td>Library Name</td>
+         <td>Species</td>
+         <td>Comment</td>
+       </tr>
+      </thead>
+      <tbody>
+      {% for lane in flowcell.lane_set.all %}
+        <tr rel="libns:has_lane" resource="{{lane.get_absolute_url}}" >
+          <td><a href="{{lane.get_absolute_url}}"> 
+              <span property="libns:lane_number">{{lane.lane_number}}</span></a></td>
+          <td><a href="{{lane.library.get_absolute_url}}" 
+                 rel="libns:library"><span property="libns:library_id"
+              >{{lane.library.id}}</span></a></td>
+          <td><a href="{{lane.library.get_absolute_url}}" rel="libns:library"><span property="libns:name">{{lane.library.library_name}}</span></a></td>
+          <td><a href="{{lane.library.library_species.get_absolute_url}}" rel="libns:species">
+              <span property="libns:species_name">{{ lane.library.library_species.scientific_name }}</span></a></td>
+          <td><span property="libns:comment">{{lane.comment}}</span></td>
+        </tr>
+      {% endfor %}
+      </tbody>
+    </table>
+    </div>
+</div>  
+{% endblock %}
diff --git a/htsworkflow/frontend/templates/experiments/flowcell_lane_detail.html b/htsworkflow/frontend/templates/experiments/flowcell_lane_detail.html
new file mode 100644 (file)
index 0000000..aceb186
--- /dev/null
@@ -0,0 +1,86 @@
+{% extends "base_site.html" %}
+{% load adminmedia humanize i18n %}
+{% block extrahead %}
+    <!-- App Stuff -->
+    <link type="text/css" rel="stylesheet" href="/static/css/app.css" />
+    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
+    
+    {% block additional_javascript %}
+    {% endblock %}
+{% endblock %}
+
+{% block content %}
+<div id="lane_detail">
+  <h2>About this lane</h2>
+  <div rel="libns:flowcell" resource="{{flowcell.get_absolute_url}}">
+  <b>Flowcell</b>: 
+    <a href="{{flowcell.get_absolute_url}}">{{flowcell.flowcell_id}}</a><br/>
+  <b>Run Date</b>:
+    <span property="libns:date" content="{{flowcell.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ flowcell.run_date }}</span><br/>
+  <b>Type</b>: 
+    <span property="libns:flowcell_type">{{flowcell.flowcell_type}}</span><br/>
+  </div>
+  <b>Lane</b>: 
+    <span property="libns:lane_number" datatype="xsd:decimal">{{lane.lane_number}}</span><br/>
+  <b>pM</b>
+    <span property="libns:pM" datatype="xsd:decimal">{{ lane.pM }}</span><br/>
+  <b>Cluster Estimate</b>
+    <span property="libns:cluster_estimate" datatype="xsd:decimal"
+          content="{{lane.cluster_estimate}}">{{ lane.cluster_estimate|intcomma }}</span><br/>
+  <b>Lane Status</b>: 
+    <span property="libns:status">{{ lane.status }}</span><br/>
+  <b>Comment</b>: 
+    <span property="libns:comment">{{ lane.comment }}</span><br/>
+
+
+  <div rel="libns:library" resource="{{lib.get_absolute_url}}">
+  <h2>About the library</h2>
+  <b>Library ID</b>: 
+    <a href="{{lib.get_absolute_url}}" property="libns:library_id">{{ lib.id }}</a><br/>
+  <b>Name</b>: 
+    <span property="libns:name">{{ lib.library_name }}</span>
+  <br/>
+  <b>Species</b>: 
+    <a href="{{lib.library_species.get_absolute_url}}" rel="libns:species"><span property="libns:species_name">{{ lib.library_species.scientific_name }}</span></a>
+  <br/>
+  <b>Concentration</b>: 
+    <span property="libns:concentration">{{ lib.undiluted_concentration }} ng/µl</span>
+  <br/>
+  <b>Gel Cut Size</b>: 
+    <span property="libns:gel_cut">{{ lib.gel_cut_size }}</span>
+  <br/>
+  <b>Insert Size</b>: 
+    <span property="libns:insert_size">{{ lib.insert_size }}</span>
+  <br/>
+  <b>Background or Cell Line</b>:
+     <span property="libns:cell_line">{{ lib.cell_line }}</span>
+  <br/>
+  <b>Replicate</b>: 
+     <span property="libns:replicate">{{ lib.replicate }}</span>
+  <br/>
+  <b>Library Type</b>:
+     <span property="libns:library_type">{{ lib.library_type }}</span>
+  <br/>
+  <b>Experiment Type</b>:
+     <span property="libns:experiment_type">{{ lib.experiment_type }}</span>
+  <br/>
+  <b>Made By</b>: 
+    <span property="libns:made_by">{{ lib.made_by }}</span>
+  <br/>
+  <b>Creation Date</b>
+    <span property="libns:date" content="{{lib.creation_date|date:'Y-m-d'}}T00:00:00" datatype="xsd:dateTime">{{ lib.creation_date }}</span>
+  <br/> 
+  <b>Protocol Stopping Point</b>
+    <span property="libns:stopping_point">{{ lib.stopping_point_name }}</span>
+  <br/> 
+  <b>Affiliations</b>:
+  <ul>
+    {% for individual in lib.affiliations.all %}
+      <li property="libns:affliation" content="{{individual.name}}">
+        {{ individual.name }} ( {{ individual.contact }} )
+      </li>
+    {% endfor %}
+  </ul>
+  </div>
+</div>  
+{% endblock %}
index 0aa83d07528f2f7ea82a9499a8b1c28bf4b74011..35baefc8c043f96122cff7a719c4cffcbf6d4a1f 100644 (file)
@@ -8,70 +8,18 @@
     {% block additional_javascript %}
     {% endblock %}
 
-<style type="text/css">
-  /* <![CDATA[ */
-  div#librarydetail {
-    margin: 0;
-    padding: 0;
-  }
-  div#librarydetail table, div#librarydetail td {
-    border-style: solid;
-  }
-  div#librarydetail table {
-    border-width: 0 0 1px 1px;
-    border-spacing: 0;
-    border-collapse: collapse;
-  }
-  div#librarydetail td {
-    margin: 0;
-    padding: 3px;
-    border-width: 1px 1px 0 0;
-  }
-  div#librarydetail thead {
-    text-align: center;
-    }
-  div#librarydetail tbody {
-    text-align: right;
-  }
-  div#librarydetail h1,
-  div#librarydetail h2
-  {
-    font-size: 150%;
-  }
-
-  div#librarydetail h3 {
-     font-size: 125%;
-     margin: 0;
-  }
-
-  div#librarydetail h4,
-  div#librarydetail h5,
-  div#librarydetail ul,
-  div#librarydetail ol,
-  div#librarydetail li
-  {
-    list-style: none;
-    margin: 0;   
-  }
-
-  div#librarydetail ul,
-  div#librarydetail ol
-  {
-    margin-bottom: .5em;
-  }
- /* ]]> */
-</style>
 {% endblock %}
 
 {% block content %}
-<div id="librarydetail">
+<div id="library_detail">
   <h2>About this library</h2>
   <b>Library ID</b>: {{ lib.id }}<br/>
   <b>Name</b>: 
     <span property="libns:name">{{ lib.library_name }}</span>
   <br/>
   <b>Species</b>: 
-    <span property="libns:species">{{ lib.library_species.scientific_name }}</span>
+    <a href="{{lib.library_species.get_absolute_url}}" rel="libns:species">
+    <span property="libns:species_name">{{ lib.library_species.scientific_name }}</span></a>
   <br/>
   <b>Concentration</b>: 
     <span property="libns:concentration">{{ lib.undiluted_concentration }} ng/µl</span>
       </li>
     {% endfor %}
   </ul>
-  
+  <div class="htswdetail">
   <h2>Raw Result Files</h2>
   <table>
   <thead>
   </thead>
   <tbody>
     {% for result in eland_results %}
-    <tr about="/flowcell/{{result.flowcell_id}}/lane/{{result.lane}}">
+    <tr about="{{result.flowcell.get_absolute_url}}">
       <td property="libns:date" content="{{result.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ result.run_date|date}}</td>
       <td>{{ result.cycle }}</td>
-      <td property="libns:flowcell_id">{{ result.flowcell_id }}</td>
-      <td property="libns:lane">{{ result.lane }}</td>
+      <td><a href="{{result.flowcell.get_absolute_url}}"><span property="libns:flowcell_id">{{ result.flowcell_id }}</span></a></td>
+      <td><a href="{{result.lane.get_absolute_url}}" rel="libns:has_lane"><span property="libns:lane_number" datatype="xsd:decimal">{{ result.lane.lane_number }}</span></a></td>
       <td><a href="{{ result.summary_url }}">Summary</a></td>
       <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
       <td>
     <tbody>
   
       {% for lane in lane_summary_list %}
-      <tr about="/flowcell/{{lane.flowcell_id}}/lane/{{lane.lane_id}}/end/{% if lane.end %}{{ lane.end }}{% endif %}">
+      <tr about="/flowcell/{{lane.flowcell_id}}/{{lane.lane_id}}/{% if lane.end %}#end{{ lane.end }}{% endif %}">
         <td>{{ lane.cycle_width }}</td>
         <td>{{ lane.flowcell_id }}</td>
         <td>{{ lane.lane_id }}</td>
     </thead>
     <tbody>
       {% for lane in lib.lane_set.all %}
-      <tr>
-        <td>{{ lane.flowcell.flowcell_id }}</td>
-        <td>{{ lane.lane_number }}</td>
+      <tr rel="libns:has_lane" resource="{{lane.get_absolute_url}}">
+        <td><a href="{{lane.flowcell.get_absolute_url}}" rel="libns:flowcell">
+            <span property="libns:flowcell_id">{{ lane.flowcell.flowcell_id }}</span></a></td>
+        <td><a href="{{lane.get_absolute_url}}"> 
+            <span property="libns:lane_number"  datatype="xsd:decimal"
+               >{{ lane.lane_number }}</span></a></td>
         <td>{{ lane.comment }}</td>
       </tr>
          {% endfor %}
     </tbody>
   </table>
-  <br/>
-  <hr/>
-  <h2>Count of multi-reads</h2>
-  {% for lane in lane_summary_list %}
-    {% if lane.summarized_reads %}
-    <h3>
-      {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} 
-      {% if lane.end %} end {{ lane.end }}{% endif %}
-    </h3>
-    <ul>
-      {% for name, counts in lane.summarized_reads.items %}
-      <li><b>{{ name }}</b>: {{ counts|intcomma }}</li>
-      {% endfor %}
-    </ul>
-    {% endif %}
-  {% endfor %}
   {% endblock %}
+  </div>
 </div>
 {% endblock %}
index 16cd9a32121106d7584fa151e78388bc274f3584..024a83dfa1a0c019c533b07883e330dec3b1ed8b 100644 (file)
     </thead>
     <tbody >
       {% for lib in library_list %}
-      <tr about="/library/{{lib.library_id}}">
-        <td ><a href="/library/{{ lib.library_id }}">{{ lib.amplified_from }}</a></td>
-        <td ><a href="/library/{{ lib.library_id }}" property="libns:library_id">{{ lib.library_id }}</a></td>
-        <td ><a href="/library/{{ lib.library_id }}" property="libns:species_name">{{ lib.species_name }}</a></td>
-        <td ><a href="/library/{{ lib.library_id }}" property="libns:library_name">{{ lib.library_name }}</a></td>
+      <tr about="{{lib.library.get_absolute_url}}">
+        <td ><a href="{{lib.library.get_absolute_url}}">{{ lib.amplified_from }}</a></td>
+        <td ><a href="{{lib.library.get_absolute_url}}"><span property="libns:library_id">{{ lib.library_id }}</span></a></td>
+        <td ><a href="{{lib.library.library_species.get_absolute_url}}" rel="libns:species"><span property="libns:species_name">{{ lib.species_name }}</span></a></td>
+        <td ><a href="{{ lib.library.get_absolute_url }}"><span property="libns:library_name">{{ lib.library_name }}</span></a></td>
         <td  bgcolor="#00BFFF">{{ lib.lanes_run.0.0 }}</td>      
         <td  bgcolor="#00BFFF">{{ lib.lanes_run.0.1 }}</td>      
         <td  bgcolor="#00BFFF">{{ lib.lanes_run.0.2 }}</td>      
diff --git a/htsworkflow/frontend/templates/samples/species_detail.html b/htsworkflow/frontend/templates/samples/species_detail.html
new file mode 100644 (file)
index 0000000..5e47679
--- /dev/null
@@ -0,0 +1,20 @@
+{% extends "base_site.html" %}
+{% load adminmedia humanize i18n %}
+{% block extrahead %}
+    <!-- App Stuff -->
+    <link type="text/css" rel="stylesheet" href="/static/css/app.css" />
+    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
+    
+    {% block additional_javascript %}
+    {% endblock %}
+{% endblock %}
+
+{% block content %}
+<div id="genome_detail">
+  <h2>About this Genome</h2>
+  <b>Common Name</b>: 
+     <span property="libns:species">{{ species.common_name}}</span><br/>
+  <b>Scientific Name</b>: 
+     <span property="libns:species">{{ species.scientific_name}}</span><br/>
+</div>  
+{% endblock %}
index 7856f0628c62f2f57bfc928f4390e3abbdd49dc9..c9ce79b7e880f277422489bacc4799f477f493bb 100644 (file)
@@ -25,6 +25,11 @@ urlpatterns = patterns('',
     #(r'^admin/(.*)', admin.site.root),
     # Experiments:
     (r'^experiments/', include('htsworkflow.frontend.experiments.urls')),
+    # Flowcell:
+    (r'^flowcell/(?P<flowcell_id>\w+)/(?P<lane_number>\w+)/',
+     'htsworkflow.frontend.experiments.views.flowcell_lane_detail'),
+    (r'^flowcell/(?P<flowcell_id>\w+)/',
+     'htsworkflow.frontend.experiments.views.flowcell_detail'),
     # AnalysTrack:
     #(r'^analysis/', include('htsworkflow.frontend.analysis.urls')),
     # Inventory urls