Beispiel #1
0
    def test_seqdump(self):
        s = 'MELSVLLFLALLTGLLLLLVQRHPNTHDRLPPGPRPLPLLGNLLQMDRRGLLKSFLRFREKYGDVFTVHLGPRPVVMLCGVEAIREALVDKAEAFSGRGKIAMVDPFFRGYGVIFANGNRWKVLRRFSVTTMRDFGMGKRSVEERIQEEAQCLIEELRKSKGALMDPTFLFQSITANIICSIVFGKRFHYQDQEFLKMLNLFYQTFSLISSVFGQLFELFSGFLKYFPGAHRQVYKNLQEINAYIGHSVEKHRETLDPSAPKDLIDTYLLHMEKEKSNAHSEFSHQNLNLNTLSLFFAGTETTSTTLRYGFLLMLKYPHVAERVYREIEQVIGPHRPPELHDRAKMPYTEAVIYEIQRFSDLLPMGVPHIVTQHTSFRGYIIPKDTEVFLILSTALHDPHYFEKPDAFNPDHFLDANGALKKTEAFIPFSLGKRICLGEGIARAELFLFFTTILQNFSMASPVAPEDIDLTPQECGVGKIPPTYQIRFLPR'
        seq = bs.ProteinSeq(
            s, 'NP_000758.1 cytochrome P450 2B6 precursor [H**o sapiens]')

        b = bs.blast('bioseq/res/seqdump.txt', 3)
        seqs, scores = b.best_n_alignments(seq)
        self.assertEqual(scores,
                         [484, 484, 479, 477, 453, 451, 451, 450, 449, 449])
Beispiel #2
0
 def test_2(self):
     b = bs.blast('bioseq/res/seqBlast.txt', w=11, fasta=False)
     q = "cgacgacgacgacgaatgatg"
     r = b.best_alignment(q)
     self.assertEqual(r, (0, 0, 21, 21, 4))
Beispiel #3
0
 def test_fasta_constructor(self):
     b = bs.blast()
     self.assertEqual(b.w, 3)
     self.assertEqual(len(b.db), 21)
Beispiel #4
0
 def test_1(self):
     b = bs.blast('bioseq/res/seqBlast.txt', w=11, fasta=False)
     q = "gacgcctcgcgctcgcgcgctgaggcaaaaaaaaaaaaaaaaaaaatcggatagctagctgagcgctcgatagcgcgttcgctgcatcgcgtatagcgctgaagctcccggcgagctgtctgtaaatcggatctcatctcgctctatcct"
     r = b.best_alignment(q)
     self.assertEqual(r, (1, 38, 149, 108, 3))
Beispiel #5
0
 def test_constructor(self):
     b = bs.blast('bioseq/res/seqBlast.txt', fasta=False)
     self.assertEqual(b.w, 3)
     self.assertEqual(b.db, self.expected_db)