Esempio n. 1
0
 def test_squeeze_none(self):
     """
     Threshold of 0.001 - nothing should be squeezed.
     """
     result = list(transform.squeeze(self.sequences, 1.01))
     self.assertEqual([str(i.seq) for i in self.sequences],
             [str(i.seq) for i in result])
Esempio n. 2
0
 def test_squeeze_none(self):
     """
     Threshold of 0.001 - nothing should be squeezed.
     """
     result = list(transform.squeeze(self.sequences, 1.01))
     self.assertEqual([str(i.seq) for i in self.sequences],
             [str(i.seq) for i in result])
Esempio n. 3
0
    def test_basic_squeeze(self):
        result = list(transform.squeeze(self.sequences, 1.0))

        self.assertEqual([4, 4, 4], [len(i) for i in result])
        self.assertEqual([i.id for i in self.sequences], [i.id for i in result])
        expected = [
            seqrecord('sequence_1', 'ACG-'),
            seqrecord('sequence_2', '-CGT'),
            seqrecord('sequence_3', '-TAG'),
        ]

        self.assertEqual([str(i.seq) for i in expected],
                [str(i.seq) for i in result])
Esempio n. 4
0
    def test_basic_squeeze(self):
        result = list(transform.squeeze(self.sequences, 1.0))

        self.assertEqual([4, 4, 4], [len(i) for i in result])
        self.assertEqual([i.id for i in self.sequences], [i.id for i in result])
        expected = [
            seqrecord('sequence_1', 'ACG-'),
            seqrecord('sequence_2', '-CGT'),
            seqrecord('sequence_3', '-TAG'),
        ]

        self.assertEqual([str(i.seq) for i in expected],
                [str(i.seq) for i in result])