Exemplo n.º 1
0
 def test_write_xls(self):
     """Reporter: can write to an XLS file
     """
     self._make_working_dir()
     reporter = Reporter()
     reporter.add("Test Document",title=True)
     reporter.add("Lorem ipsum")
     report_xls = os.path.join(self.wd,"report.xls")
     reporter.write_xls(report_xls)
     self.assertTrue(os.path.isfile(report_xls))
 def test_write_xls(self):
     """Reporter: can write to an XLS file
     """
     self._make_working_dir()
     reporter = Reporter()
     reporter.add("Test Document",title=True)
     reporter.add("Lorem ipsum")
     report_xls = os.path.join(self.wd,"report.xls")
     reporter.write_xls(report_xls)
     self.assertTrue(os.path.isfile(report_xls))
Exemplo n.º 3
0
                            mismatches=opts.mismatches,
                            reporter=reporter)
        else:
            for lane in lanes:
                if lane not in counts.lanes:
                    logging.error("Requested analysis for lane %d but "
                                  "only have counts for lanes %s" %
                                  (lane,
                                   ','.join([str(l) for l in counts.lanes])))
                    sys.exit(1)
                report_barcodes(counts,
                                lane=lane,
                                cutoff=cutoff,
                                sample_sheet=opts.sample_sheet,
                                mismatches=opts.mismatches,
                                reporter=reporter)
        if opts.report_file is not None:
            print "Writing report to %s" % opts.report_file
            reporter.write(filen=opts.report_file)
        else:
            reporter.write()
        if opts.xls_file is not None:
            print "Writing XLS to %s" % opts.xls_file
            reporter.write_xls(opts.xls_file)
        if opts.html_file is not None:
            print "Writing HTML to %s" % opts.html_file
            reporter.write_html(opts.html_file)
    # Output counts if requested
    if opts.counts_file_out is not None:
        counts.write(opts.counts_file_out)
            report_barcodes(counts,
                            cutoff=cutoff,
                            sample_sheet=opts.sample_sheet,
                            mismatches=opts.mismatches,
                            reporter=reporter)
        else:
            for lane in lanes:
                if lane not in counts.lanes:
                    logging.error("Requested analysis for lane %d but "
                                  "only have counts for lanes %s" %
                                  (lane,
                                   ','.join([str(l) for l in counts.lanes])))
                    sys.exit(1)
                report_barcodes(counts,
                                lane=lane,
                                cutoff=cutoff,
                                sample_sheet=opts.sample_sheet,
                                mismatches=opts.mismatches,
                                reporter=reporter)
        if opts.report_file is not None:
            print "Writing report to %s" % opts.report_file
            reporter.write(filen=opts.report_file)
        else:
            reporter.write()
        if opts.xls_file is not None:
            print "Writing XLS to %s" % opts.xls_file
            reporter.write_xls(opts.xls_file)
    # Output counts if requested
    if opts.counts_file_out is not None:
        counts.write(opts.counts_file_out)