Ejemplo n.º 1
0
    def generatedNames(self):
        try:
            # open dataset on generated BAM file, read in names
            dataset = PacBioBam.DataSet(self.generatedBamFn)
            entireFile = PacBioBam.EntireFileQuery(dataset)
            names_out = []
            for record in PacBioBam.Iterate(entireFile):
                names_out.append(record.FullName())
            return names_out

        except RuntimeError:
            self.assertTrue(False)  # should not throw
Ejemplo n.º 2
0
    def originalNames(self):
        # loop over original file, store names, write to generated file
        try:
            file = PacBioBam.BamFile(self.ex2BamFn)
            writer = PacBioBam.BamWriter(self.generatedBamFn, file.Header())

            dataset = PacBioBam.DataSet(self.ex2BamFn)
            entireFile = PacBioBam.EntireFileQuery(dataset)

            names_in = []
            for record in PacBioBam.Iterate(entireFile):
                names_in.append(record.FullName())
                writer.Write(record)
            return names_in

        except RuntimeError:
            self.assertTrue(False)  # should not throw