Exemplo n.º 1
0
    def test_roundtrip_sequence(self):
        with io.StringIO() as fh:
            _sequence_to_genbank(_genbank_to_sequence(self.single_rna_fp), fh)
            obs = fh.getvalue()

        with open(self.single_rna_fp) as fh:
            exp = fh.read()

        self.assertEqual(obs, exp)
Exemplo n.º 2
0
 def test_genbank_to_sequence(self):
     for i, exp in enumerate(self.multi):
         obs = _genbank_to_sequence(self.multi_fp, seq_num=i+1)
         exp = Sequence(exp[0], metadata=exp[1], lowercase=True,
                        interval_metadata=exp[2])
         self.assertEqual(exp, obs)