Exemplo n.º 1
0
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)
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
 def load_mismatch_analyzer(self):
     data = jeweler_pb2.TranscriptMismatcherAnalyzerData()
     zleveldb.load_single_protobuf_data(self.shop_info.mismatch_analyzer_file, data)
     ret = dict()
     for d in data.location_result:
         if d.coverage < 7:
             continue
         if d.num_mismatches < 5:
             continue
         if d.pvalue > 0 and math.log10(d.pvalue) > -19:
             continue
         if d.gene_id not in ret:
             ret[d.gene_id] = set()
         ret[d.gene_id].add(d.genome_location)
     return ret