Exemplo n.º 1
0
 def replacement(self, template, e):
     r = dna_type()
     base_to_string = str.__str__
     for t in template:
         tt = type(t)
         if tt is Base:
             r.append(base_to_string(t))
         elif tt is Reference:
             if t.n < len(e):
                 begin, end = e[t.n]
             else:
                 begin, end = 0, 0
             if t.level == 0:
                 r.extend(self.dna[begin:end])
             else:
                 p = protect(self.dna[begin:end], t.level)
                 self.cost += len(p)
                 r.extend(p)
         elif tt is Length:
             if t < len(e):
                 begin, end = e[t]
             else:
                 begin, end = 0, 0
             r.extend(asnat(end - begin))
     return r
def genelist_integrity():
    gene = genes.printgenetable
    push_true = dna.push_to_blue_prefix('P')
    integrity_prefix = dna.replace_procedure_prefix(host_gene, gene, push_true) 
    
    for page in range(15):
        listpage_prefix = genes.gene_table_page_nr.patch_prefix(
                                                        dna.asnat(page, length=24))
        #genelist_prefix += guide_page_prefix(42)
        
        dna.create_and_run_prefix(listpage_prefix + integrity_prefix + \
                                  host_activation_prefix,
                        'data/guide/genelist_integrity/{0:02}'.format(page))