Beispiel #1
0
 def test_list_adder(self):
     """list_adder should add items to list, creating if necessary"""
     d = dummy()
     list_adder(d, 'x', 3)
     self.assertEqual(d.x, [3])
     list_adder(d, 'x', 'abc')
     self.assertEqual(d.x, [3, 'abc'])
     list_adder(d, 'y', [2,3])
     self.assertEqual(d.x, [3, 'abc'])
     self.assertEqual(d.y, [[2,3]])
Beispiel #2
0
def _sts_adder(obj, field, val):
    """Appends the current STS-type record to specified field"""
    list_adder(obj, field, _read_sts(val))
Beispiel #3
0
def _generic_adder(obj, field, line):
    """Adds line to relevant field, unparsed"""
    list_adder(obj, field, line.strip())
Beispiel #4
0
def _contig_adder(obj, field, line):
    """Adds contig to relevant field"""
    list_adder(obj, field, _read_contig(line))
Beispiel #5
0
def _go_adder(obj, field, line):
    """Adds go to relevant field"""
    list_adder(obj, field, _read_go(line))
Beispiel #6
0
def _extannot_adder(obj, field, line):
    """Adds pmid to relevant field"""
    list_adder(obj, field, _read_extannot(line))
Beispiel #7
0
def _grif_adder(obj, field, line):
    """Adds grif to relevant field"""
    list_adder(obj, field, _read_grif(line))
Beispiel #8
0
def _accnum_adder(obj, field, line):
    """Adds accnum to relevant field"""
    list_adder(obj, field, _read_accnum(line))
Beispiel #9
0
def _cdd_adder(obj, field, line):
    """Adds cdd to relevant field"""
    list_adder(obj, field, _read_cdd(line))
Beispiel #10
0
def _comp_adder(obj, field, line):
    """Adds comp to relevant field"""
    list_adder(obj, field, _read_comp(line))
Beispiel #11
0
def _sts_adder(obj, field, line):
    """Adds sts to relevant field"""
    list_adder(obj, field, _read_sts(line))
Beispiel #12
0
def _map_adder(obj, field, line):
    """Adds map to relevant field"""
    list_adder(obj, field, _read_map(line))
Beispiel #13
0
def _rell_adder(obj, field, line):
    """Adds rell to relevant field"""
    list_adder(obj, field, _read_rell(line))
Beispiel #14
0
def _seq_adder(obj, field, val):
    """Appends the current Sequence-type record to specified field"""
    list_adder(obj, field, _read_seq(val))
Beispiel #15
0
def _assembly_adder(obj, field, line):
    """Adds assembly to relevant field"""
    list_adder(obj, field, commas(line))
Beispiel #16
0
def _protsim_adder(obj, field, val):
    """Appends the current ProtSim record to specified field"""
    list_adder(obj, field, _read_protsim(val))
Beispiel #17
0
def _accession_adder(obj, field, line):
    """Adds accessions to relevant field"""
    list_adder(obj, field, _read_accession(line))