Exemplo n.º 1
0
 def test_incorrectly_paired(self):
     s1 = BytesIO(b'@r1/1\nACG\n+\nHHH\n')
     s2 = BytesIO(b'@wrong_name\nTTT\n+\nHHH\n')
     with raises(FileFormatError) as info:
         with PairedSequenceReader(s1, s2) as psr:
             list(psr)
     assert "Reads are improperly paired" in info.value.message
Exemplo n.º 2
0
 def test_read(self):
     s1 = BytesIO(b'@r1\nACG\n+\nHHH\n')
     s2 = BytesIO(b'@r2\nGTT\n+\n858\n')
     with PairedSequenceReader(s1, s2) as psr:
         assert [
             (Sequence("r1", "ACG", "HHH"), Sequence("r2", "GTT", "858")),
         ] == list(psr)
Exemplo n.º 3
0
    def test_missing_partner2(self):
        s1 = BytesIO(b'@r1\nACG\n+\nHHH\n')
        s2 = BytesIO(b'')

        with raises(FileFormatError) as info:
            with PairedSequenceReader(s1, s2) as psr:
                list(psr)
        assert "There are more reads in file 1 than in file 2" in info.value.message