}
+AARecognizer::AARecognizer(const std::string &seq, int start_index)
+{
+ len = seq.length();
+ site.reserve(len);
+ ref.reserve(len);
+ for (size_t i=0; i<len; ++i) {
+ site.push_back(start_index);
+ ref.push_back(str2aa.at(seq[i]));
+ start_index++;
+ }
+}
+
// Did virus escape from immune pressure by mutating *any* of the sites away from ref?
bool AARecognizer::escaped(const NTVirus &v) const {
return AARecognizer::escaped(v.aa_seq);
std::vector<unsigned> site;
std::vector<aa> ref;
size_t len;
+ AARecognizer(const std::string &seq, int start_index);
bool escaped(const NTVirus &v) const;
bool escaped(const std::vector<aa> &aa_seq) const;
};
}
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;
//*/