本文整理汇总了C++中Alignment::run方法的典型用法代码示例。如果您正苦于以下问题:C++ Alignment::run方法的具体用法?C++ Alignment::run怎么用?C++ Alignment::run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Alignment
的用法示例。
在下文中一共展示了Alignment::run方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runScoresCalculation
std::string runScoresCalculation(std::string queryDB, std::string queryDBIndex,
std::string targetDB, std::string targetDBIndex,
std::string tmpDir,
std::string scoringMatrixFile, int maxSeqLen, int seqType,
int kmerSize, int alphabetSize, size_t maxResListLen, int split, int skip, bool aaBiasCorrection, float zscoreThr, float sensitivity,
double evalThr, double covThr, int maxAlnNum, std::string dbName, std::list<std::string>* tmpFiles){
struct timeval start, end;
gettimeofday(&start, NULL);
// prefiltering step
std::cout << "\n----------------------------- Prefiltering ------------------------\n";
std::string prefDB = tmpDir + "/db_pref_" + dbName;
std::string prefDBIndex = prefDB + ".index";
tmpFiles->push_back(prefDB);
tmpFiles->push_back(prefDBIndex);
Prefiltering* pref = new Prefiltering (queryDB, queryDBIndex,
targetDB, targetDBIndex,
prefDB, prefDBIndex,
scoringMatrixFile, sensitivity, kmerSize, alphabetSize, zscoreThr, maxSeqLen, seqType, aaBiasCorrection, split, skip);
std::cout << "Starting prefiltering scores calculation.\n";
pref->run(maxResListLen);
delete pref;
gettimeofday(&end, NULL);
int sec = end.tv_sec - start.tv_sec;
std::cout << "\nTime for the prefiltering: " << (sec / 3600) << " h " << (sec % 3600 / 60) << " m " << (sec % 60) << "s\n\n";
gettimeofday(&start, NULL);
// alignment step
std::cout << "------------------------------ Alignment --------------------------\n";
std::string alnDB = tmpDir + "/db_aln_" + dbName;
std::string alnDBIndex = alnDB + ".index";
tmpFiles->push_back(alnDB);
tmpFiles->push_back(alnDBIndex);
Alignment* aln = new Alignment(queryDB, queryDBIndex,
targetDB, targetDBIndex,
prefDB, prefDBIndex,
alnDB, alnDBIndex,
scoringMatrixFile, evalThr, covThr, maxSeqLen, seqType);
std::cout << "Starting alignments calculation.\n";
aln->run(maxResListLen, 10);
delete aln;
gettimeofday(&end, NULL);
sec = end.tv_sec - start.tv_sec;
std::cout << "\nTime for alignments: " << (sec / 3600) << " h " << (sec % 3600 / 60) << " m " << (sec % 60) << "s\n\n";
gettimeofday(&start, NULL);
return alnDB;
}