def transform_incoming(self, son, collection): for (key, value) in son.items(): if isinstance(value, SeqRecord): son[key] = simplifySeqRecord(value) elif isinstance(value, dict): son[key] = self.transform_incoming(value, collection) return son
def transform_incoming(self,son,collection): for (key,value) in son.items(): if isinstance(value,SeqRecord): son[key] = simplifySeqRecord(value) elif isinstance(value,dict): son[key] = self.transform_incoming(value,collection) return son
def encode_chain(chain): document = simplifySeqRecord(chain) if hasattr(chain,'v'): document['v'] = chain.v if hasattr(chain,'d'): document['d'] = chain.d if hasattr(chain,'j'): document['j'] = chain.j if hasattr(chain,'junction_nt'): document['junction_nt'] = chain.junction_nt if hasattr(chain,'junction_aa'): document['junction_aa'] = chain.junction_aa if hasattr(chain,'num_mutations'): document['num_mutations'] = chain.num_mutations return document
def encode_chain(chain): document = simplifySeqRecord(chain) if hasattr(chain, 'v'): document['v'] = chain.v if hasattr(chain, 'd'): document['d'] = chain.d if hasattr(chain, 'j'): document['j'] = chain.j if hasattr(chain, 'junction_nt'): document['junction_nt'] = chain.junction_nt if hasattr(chain, 'junction_aa'): document['junction_aa'] = chain.junction_aa if hasattr(chain, 'num_mutations'): document['num_mutations'] = chain.num_mutations return document