Commit e2eb35f5 authored by Carsten Kemena's avatar Carsten Kemena

further implementing raspodom

parent 2e9cad37
This diff is collapsed.
......@@ -197,7 +197,78 @@ BOOST_AUTO_TEST_CASE( Gotoh_alignDomain_Test2 )
BOOST_CHECK_EQUAL_COLLECTIONS(eS2.begin(), eS2.end(), expected1.begin(), expected1.end());
BOOST_CHECK_EQUAL_COLLECTIONS(eS1.begin(), eS1.end(), expected2.begin(), expected2.end());
BOOST_CHECK_EQUAL(mat.score(), 145.0);
}
BOOST_AUTO_TEST_CASE(raspodom_align_domain_test )
{
BioSeqDataLib::Settings settings;
settings.readSettings();
fs::path matrixName = settings["dsm"] / "pfam-31.dsm";
BioSeqDataLib::DSM simMat(matrixName);
simMat.useNegative(true);
BioSeqDataLib::DomainExt dom;
BioSeqDataLib::DomainArrangement<BioSeqDataLib::Domain> seq1, seq2;
dom.accession("PF00001");
seq1.push_back(dom);
dom.accession("PF00002");
seq1.push_back(dom);
seq2.push_back(dom);
dom.accession("PF00003");
seq1.push_back(dom);
seq2.push_back(dom);
dom.accession("PF00001");
seq2.push_back(dom);
dom.accession("PF00002");
seq2.push_back(dom);
dom.accession("PF00003");
seq2.push_back(dom);
// seq2.push_back(dom);
/* dom.accession("PF00001");
seq1.push_back(dom);
dom.accession("PF00002");
seq1.push_back(dom);
dom.accession("PF00003");
seq1.push_back(dom);
dom.accession("PF00244");
seq1.push_back(dom);
seq2.push_back(dom);
dom.accession("PF00245");
seq1.push_back(dom);
seq2.push_back(dom);
dom.accession("PF00246");
seq1.push_back(dom);
seq2.push_back(dom);
dom.accession("PF00001");
//seq2.push_back(dom);
dom.accession("PF00002");
//seq2.push_back(dom);
dom.accession("PF00003");
//seq2.push_back(dom);
*/
BioSeqDataLib::AlignmentMatrix<int, BioSeqDataLib::DSM> mat(-50, -10, simMat);
mat.raspodom(seq1, seq2);
std::vector<long int> eS1, eS2;
mat.traceback(eS1, eS2);
for (auto elem : eS1)
std::cout << elem << " ";
std::cout << "\n";
for (auto elem : eS2)
std::cout << elem << " ";
std::cout << "\n";
std::cout << mat.isCP() << "\n";
//std::vector<long int> expected1 { 0, 1, 2};
//std::vector<long int> expected2 { -1, 0, 1};
//BOOST_CHECK_EQUAL_COLLECTIONS(eS1.begin(), eS1.end(), expected1.begin(), expected1.end());
//BOOST_CHECK_EQUAL_COLLECTIONS(eS2.begin(), eS2.end(), expected2.begin(), expected2.end());
//BOOST_CHECK_EQUAL(mat.score(), 190.0);
}
BOOST_AUTO_TEST_SUITE_END()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment