def _read_seq(line): """Turns a sequence line into a UniGeneSeqRecord. BEWARE: first level delimiter is ';' and second level delimiter is '=', but '=' can also appear inside the _value_ of the second level! """ first_level = semi_splitter(line) second_level = map(equal_pairs, first_level) return UniGeneSeqRecord(second_level)
def _read_protsim(line): """Turns a protsim line into a UniGeneProtSim record. BEWARE: first level delimiter is ';' and second level delimiter is '=', but '=' can also appear inside the _value_ of the second level! """ first_level = semi_splitter(line) second_level = list(map(equal_pairs, first_level)) return UniGeneProtSimRecord(second_level)
def _read_protsim(line): """Turns a protsim line into a UniGeneProtSim record. BEWARE: first level delimiter is ';' and second level delimiter is '=', but '=' can also appear inside the _value_ of the second level! """ first_level = semi_splitter(line) second_level = map(equal_pairs, first_level) return UniGeneProtSimRecord(second_level)
def _read_seq(line): """Turns a sequence line into a UniGeneSeqRecord. BEWARE: first level delimiter is ';' and second level delimiter is '=', but '=' can also appear inside the _value_ of the second level! """ first_level = semi_splitter(line) second_level = list(map(equal_pairs, first_level)) return UniGeneSeqRecord(second_level)
def _expressions_setter(obj, field, val): """Sets specified field to a list of expressions""" setattr(obj, field, semi_splitter(val))
def _read_expression(line): """Turns a semicolon-delimited expression line into list of expressions""" return semi_splitter(line)