Update the django app to report "raw reads" for a sequence lane.
authorDiane Trout <diane@caltech.edu>
Tue, 5 May 2009 19:21:30 +0000 (19:21 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 5 May 2009 19:21:30 +0000 (19:21 +0000)
I still need to figure out how to allow downloading of the
"result" files.

htsworkflow/frontend/samples/views.py
htsworkflow/frontend/templates/samples/library_detail.html

index 478c547030e57a8a303ad9f2c0db4627b38aadc4..86c15117e8c2440d3ff7d088053a054f2047c8ff 100644 (file)
@@ -142,9 +142,12 @@ def result_fc_cnm_eland_lane(request, fc_id, cnm, lane):
     
     filepath = erd[lane]
     
-    f = opener.autoopen(filepath, 'r')
+    #f = opener.autoopen(filepath, 'r')
+    # return HttpResponse(f, mimetype="application/x-elandresult")
+
+    f = open(filepath, 'r')
+    return HttpResponse(f, mimetype='application/x-bzip2')
     
-    return HttpResponse(f, mimetype="application/x-elandresult")
 
 
 def bedfile_fc_cnm_eland_lane_ucsc(request, fc_id, cnm, lane):
@@ -219,7 +222,10 @@ def _summary_stats(flowcell_id, lane_id):
                 eland_summary.flowcell_id = flowcell_id
                 eland_summary.clusters = gerald_summary[end][lane_id].cluster
                 eland_summary.cycle_width = cycle_width
-                eland_summary.summarized_reads = runfolder.summarize_mapped_reads(eland_summary.genome_map, eland_summary.mapped_reads)
+               if hasattr(eland_summary, 'genome_map'):
+                    eland_summary.summarized_reads = runfolder.summarize_mapped_reads( 
+                                                       eland_summary.genome_map, 
+                                                       eland_summary.mapped_reads)
 
                 # grab some more information out of the flowcell db
                 flowcell = FlowCell.objects.get(flowcell_id=fc_id)
index fbaf1a0c85dbc7c95401494faf3ed756ed449471..4c5c2b889e678a65edd3fb94eef06c0a2a6ddbab 100644 (file)
 <hr/>
 <h2>Count of multi-reads</h2>
 {% for lane in lane_summary_list %}
-<h3>
-  {{lane.cycle_width}} {{ lane.flowcell_id }} lane {{ lane.lane_id }} 
-  {% if lane.end %} end {{ lane.end }}{% endif %}
-</h3>
+  {% 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 %}