Пример #1
0
def _read_sts(line):
    """Reads STS lines: format is in the full docstring.

    Format:
    Name|Chromosome|StsId|Segment|SequenceKnown|Evidence
    """
    return MappedRecord(sts_wrapper(line))
Пример #2
0
def _read_sts(line):
    """Turns an STS line (without label) into a record.

    Infuritatingly, STS lines are not semicolon-delimited, and spaces appear
    in places they shouldn't. This was the case as of 10/9/03: expect this
    'feature' to be unstable!
    """
    filtered = line.replace('=', ' ')
    return MappedRecord(list(ByPairs(filtered.split())))
Пример #3
0
def _read_cdd(line):
    """Reads CDD lines: format is Name|Key|Score|EValue|BitScore."""
    return MappedRecord(cdd_wrapper(line))
Пример #4
0
def _read_map(line):
    """Reads MAP lines: format is Location|Source|Type."""
    return MappedRecord(map_wrapper(line))
Пример #5
0
def _read_rell(line):
    """Reads RELL lines: format is Description|Id|IdType|Printable"""
    return MappedRecord(rell_wrapper(line))
Пример #6
0
def _read_accnum(line):
    """Reads ACCNUM lines: format is Accession|Gi|Strain|Start|End."""
    return MappedRecord(accnum_wrapper(line))
Пример #7
0
def _read_contig(line):
    """Reads CONTIG lines. Format described in full docstring.
    
    Accession|Gi|Strain|From|To|Orientation|Chromosome|Assembly
    """
    return MappedRecord(contig_wrapper(line))
Пример #8
0
def _read_accession(line):
    """Reads accession lines: format is Accession | Gi | Strain."""
    return MappedRecord(accession_wrapper(line))
Пример #9
0
def _read_go(line):
    """Reads GO lines. Format: Category|Term|EvidenceCode|GoId|Source|PubMedId"""
    return MappedRecord(go_wrapper(line))
Пример #10
0
def _read_extannot(line):
    """Reads EXTANNOT lines. format: Category|Term|EvidenceCode|Source|PubMedId"""
    return MappedRecord(extannot_wrapper(line))
Пример #11
0
def _read_grif(line):
    """Reads GRIF lines: format is PubMedId|Description."""
    return MappedRecord(grif_wrapper(line))
Пример #12
0
def _read_comp(line):
    """Reads COMP lines: format is in the full docstring.

    TaxonId|Symbol|Chromosome|Position|LocusId|ChromosomeSelf|SymbolSelf|MapName
    """
    return MappedRecord(comp_wrapper(line))
Пример #13
0
 def test_init_data(self):
     """MappedRecord should work like normal dict init"""
     exp = {'a': 3, 'b': 4}
     self.assertEqual(MappedRecord({'a': 3, 'b': 4}), exp)
     self.assertEqual(MappedRecord(a=3, b=4), exp)
     self.assertEqual(MappedRecord([['a', 3], ['b', 4]]), exp)
Пример #14
0
 def test_init_empty(self):
     """MappedRecord empty init should work OK"""
     g = MappedRecord()
     self.assertEqual(g, {})
Пример #15
0
 def setUp(self):
     """Define a few standard MappedRecords"""
     self.empty = MappedRecord()
     self.single = MappedRecord({'a': 3})
     self.several = MappedRecord(a=4, b=5, c='a', d=[1, 2, 3])