def test_duplicate_subreads(self):
     """Test that report doesn't crash on duplicate subreads"""
     output_dir = tempfile.mkdtemp(suffix="_mapping_stats")
     with warnings.catch_warnings(record=True) as w:
         report = to_report(self.bam_file, output_dir)
         shutil.rmtree(output_dir)
         self.assertTrue(w >= 4)
 def test_duplicate_subreads(self):
     """Test that report doesn't crash on duplicate subreads"""
     output_dir = tempfile.mkdtemp(suffix="_mapping_stats")
     with warnings.catch_warnings(record=True) as w:
         report = to_report(self.bam_file, output_dir)
         shutil.rmtree(output_dir)
         self.assertTrue(w >= 4)
 def setUpClass(cls):
     cls.output_dir = tempfile.mkdtemp(suffix="_mapping_stats")
     t = tempfile.NamedTemporaryFile(
         delete=False, suffix="mapping_report.json")
     t.close()
     cls.report_json = t.name
     cls.report = to_report(cls._get_input_file(), cls.output_dir)
     cls.report.write_json(cls.report_json)
     assert isinstance(cls.report, Report)
     log.info(pprint.pformat(cls.report.to_dict()))
     for table in cls.report.tables:
         log.info(str(table))
 def setUpClass(cls):
     cls.output_dir = tempfile.mkdtemp(suffix="_mapping_stats")
     t = tempfile.NamedTemporaryFile(delete=False,
                                     suffix="mapping_report.json")
     t.close()
     cls.report_json = t.name
     cls.report = to_report(cls._get_input_file(), cls.output_dir)
     cls.report.write_json(cls.report_json)
     assert isinstance(cls.report, Report)
     log.info(pprint.pformat(cls.report.to_dict()))
     for table in cls.report.tables:
         log.info(str(table))
    def setUpClass(cls):
        _to_p = lambda x: os.path.join(_GMAP_DATA_DIR, x)
        cls.output_dir = tempfile.mkdtemp(suffix="_mapping_stats")
        cls.input_fofn = _to_p('input.fofn')
        cls.aligned_reads_cmph5 = _to_p('aligned_reads.cmp.h5')
        t = tempfile.NamedTemporaryFile(
            delete=False, suffix="mapping_report.json")
        t.close()
        cls.report_json = t.name

        cls.report = to_report(cls.aligned_reads_cmph5, cls.output_dir)
        if isinstance(cls.report, Report):
            log.info(pprint.pformat(cls.report.to_dict()))
            for table in cls.report.tables:
                log.info(str(table))
    def setUpClass(cls):
        _to_p = lambda x: op.join(_GMAP_DATA_DIR, x)
        cls.output_dir = tempfile.mkdtemp(suffix="_mapping_stats")
        cls.input_fofn = _to_p('input.fofn')
        cls.aligned_reads_cmph5 = _to_p('aligned_reads.cmp.h5')
        t = tempfile.NamedTemporaryFile(delete=False,
                                        suffix="mapping_report.json")
        t.close()
        cls.report_json = t.name

        cls.report = to_report(cls.aligned_reads_cmph5, cls.output_dir)
        if isinstance(cls.report, Report):
            log.info(pprint.pformat(cls.report.to_dict()))
            for table in cls.report.tables:
                log.info(str(table))