def test_single_protobuf_data(): filename = "test_data/test_single" bd = jeweler_pb2.BraceletData() bd.name = "TEST" zleveldb.write_single_protobuf_data(filename, bd) bd = jeweler_pb2.BraceletData() zleveldb.load_single_protobuf_data(filename, bd) assert("TEST" == bd.name)
def __init__(self, filename): self.filename = filename self.data = jeweler_pb2.CuffcompareData() self.pseudo_set = pseudo.PseudoSet() if False: zleveldb.load_single_protobuf_data(self.protobuf_file, self.data) else: self.load_cuffcompare_raw_data(self.data) zleveldb.write_single_protobuf_data(self.protobuf_file, self.data) self.index = dict() self.gene2num_exon = dict() self.transcript2num_exon = dict() self.build_index()