From: Dariusz Murakowski Date: Fri, 24 Apr 2015 07:05:20 +0000 (-0400) Subject: Construct recognizer from epitope string (and starting location). X-Git-Url: http://src.murakowski.org/?a=commitdiff_plain;h=a4fe00e648ce10ac74a2e8ddfad874972afe0564;p=VirEvoDyn.git Construct recognizer from epitope string (and starting location). --- diff --git a/pop_ss.cpp b/pop_ss.cpp index ff9bbd5..dce29dd 100644 --- a/pop_ss.cpp +++ b/pop_ss.cpp @@ -128,6 +128,18 @@ double CTLSpecies::recognized(const MutatedSiteSequence &mutated_sites) const { } +AARecognizer::AARecognizer(const std::string &seq, int start_index) +{ + len = seq.length(); + site.reserve(len); + ref.reserve(len); + for (size_t i=0; i site; std::vector ref; size_t len; + AARecognizer(const std::string &seq, int start_index); bool escaped(const NTVirus &v) const; bool escaped(const std::vector &aa_seq) const; }; diff --git a/ss.cpp b/ss.cpp index 3e84214..5b4ec36 100644 --- a/ss.cpp +++ b/ss.cpp @@ -516,6 +516,14 @@ int main(int argc, char *argv[]) { } std::cout << '\n'; printf("Nnt=%d Naa=%d E=%f\n",v.L_nt,v.L_aa,v.energy); + CTLaaSpecies *T = new CTLaaSpecies; + T->epitopes.push_back(AARecognizer(argv[4],0)); + T->affinity.push_back(1.0); + T->num_ep = 1; + if (T->recognized(v) > 0.0) + std::cout << "got 'im!\n"; + else + std::cout << "escaped :(\n"; return 0; //*/