Beispiel #1
0
Datei: api.py Projekt: alecw/TS
    def get_barcode(self, request, **kwargs):
        metric = request.GET.get('metric',False)
        result = self.get_object_list(request).get(pk=kwargs["pk"])

        if result is None:
            return HttpGone()

        barcodeSummary = "alignment_barcode_summary.csv"
        barcode = barcodeData(os.path.join(result.get_report_dir(),barcodeSummary),metric)
        if not barcode:
            return HttpBadRequest()

        return self.create_response(request, barcode)
Beispiel #2
0
def graph_iframe(request,pk):
    """
    Make a Protovis graph from the requested metric, 
    !!! Used by Default_Report.php (TS/pipeline/web/db/writers/combinedReport.php, TS/pipeline/web/db/writers/format_whole.php)
    !!! Similar functionality exists in ResultsResources.get_barcode()
    """
    metric = request.GET.get('metric',False)

    result = shortcuts.get_object_or_404(models.Results, pk=pk)

    barcodeSummary = "alignment_barcode_summary.csv"
    data = barcodeData(os.path.join(result.get_report_dir(),barcodeSummary),metric)

    ctxd = { "data" : json.dumps(data) }
    context = template.RequestContext(request, ctxd)

    return shortcuts.render_to_response("rundb/reports/classic/ion_graph_iframe.html", context_instance=context)
Beispiel #3
0
def graph_iframe(request, pk):
    """
    Make a Protovis graph from the requested metric,
    !!! Used by Default_Report.php (TS/pipeline/web/db/writers/combinedReport.php, TS/pipeline/web/db/writers/format_whole.php)
    !!! Similar functionality exists in ResultsResources.get_barcode()
    """
    metric = request.GET.get('metric', False)

    result = shortcuts.get_object_or_404(models.Results, pk=pk)

    barcodeSummary = "alignment_barcode_summary.csv"
    data = barcodeData(os.path.join(result.get_report_dir(), barcodeSummary),
                       metric)

    ctxd = {"data": json.dumps(data)}
    context = template.RequestContext(request, ctxd)

    return shortcuts.render_to_response(
        "rundb/reports/classic/ion_graph_iframe.html",
        context_instance=context)