def test_sequence_alignment(): u = mda.Universe(PSF) reference = u.atoms mobile = u.select_atoms("resid 122-159") aln = align.sequence_alignment(mobile, reference) assert len(aln) == 5, "return value has wrong tuple size" seqA, seqB, score, begin, end = aln assert_equal(seqA, reference.residues.sequence(format="string"), err_msg="reference sequence mismatch") assert mobile.residues.sequence( format="string") in seqB, "mobile sequence mismatch" assert_almost_equal(score, 54.6) assert_array_equal([begin, end], [0, reference.n_residues])
def test_sequence_alignment(): u = mda.Universe(PSF) reference = u.atoms mobile = u.select_atoms("resid 122-159") aln = align.sequence_alignment(mobile, reference) assert_equal(len(aln), 5, err_msg="return value has wrong tuple size") seqA, seqB, score, begin, end = aln assert_equal(seqA, reference.residues.sequence(format="string"), err_msg="reference sequence mismatch") assert_(mobile.residues.sequence(format="string") in seqB, "mobile sequence mismatch") assert_almost_equal(score, 54.6) assert_array_equal([begin, end], [0, reference.n_residues])