26 #include "boost/random.hpp" 44 for (
size_t i=0; i < pl->size(); ++i)
47 ProteinPtr decoy = decoyList.protein(i + pl->size());
49 if (
os_) *
os_ << target->id <<
" " << target->sequence() << endl;
50 if (
os_) *
os_ << decoy->id <<
" " << decoy->sequence() << endl;
54 unit_assert(
string(target->sequence().rbegin(), target->sequence().rend()) == decoy->sequence());
65 boost::mt19937 engine(0);
66 boost::uniform_int<> distribution;
67 boost::variate_generator<boost::mt19937, boost::uniform_int<> > rng(engine, distribution);
69 for (
size_t i=0; i < pl->size(); ++i)
72 ProteinPtr decoy = decoyList.protein(i + pl->size());
74 if (
os_) *
os_ << target->id <<
" " << target->sequence() << endl;
75 if (
os_) *
os_ << decoy->id <<
" " << decoy->sequence() << endl;
79 string sequence = target->sequence();
80 random_shuffle(sequence.begin(), sequence.end(), rng);
96 int main(
int argc,
char* argv[])
102 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
creates a randomly shuffled copy of every target protein with the specified decoy string prefixed to ...
void testShuffledList(ProteinListPtr pl)
creates a reversed copy of every target protein with the specified decoy string prefixed to the id ...
int main(int argc, char *argv[])
void testReversedList(ProteinListPtr pl)
ProteinListPtr proteinListPtr
PWIZ_API_DECL void initializeTiny(ProteomeData &pd)
#define TEST_PROLOG(argc, argv)
boost::shared_ptr< ProteinList > ProteinListPtr
boost::shared_ptr< Protein > ProteinPtr
ProteinList decoy generator for creating decoy proteins on the fly.
boost::shared_ptr< Predicate > PredicatePtr