本文整理汇总了C++中Alignment::TEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ Alignment::TEnd方法的具体用法?C++ Alignment::TEnd怎么用?C++ Alignment::TEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Alignment
的用法示例。
在下文中一共展示了Alignment::TEnd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
else if (strcmp(argv[argi], "-sdpIndel") == 0) {
sdpIndel = atoi(argv[++argi]);
}
else if (strcmp(argv[argi], "-sdpIns") == 0) {
sdpIns = atoi(argv[++argi]);
}
else if (strcmp(argv[argi], "-sdpDel") == 0) {
sdpDel = atoi(argv[++argi]);
}
else if (strcmp(argv[argi], "-showalign") == 0) {
showalign = 1;
}
else if (strcmp(argv[argi], "-local") == 0) {
alignType = Local;
}
else if (strcmp(argv[argi], "-match") == 0) {
match = atoi(argv[++argi]);
}
else if (strcmp(argv[argi], "-fixedtarget") == 0) {
fixedTarget = 1;
}
else {
PrintUsage();
cout << "Bad option: " << argv[argi] << endl;
exit(1);
}
++argi;
}
FASTASequence query, target;
FASTAReader queryReader, targetReader;
queryReader.Init(queryName);
targetReader.Init(targetName);
if (match != 0) {
int i;
for (i = 0; i < 4; i++ ){
LocalAlignLowMutationMatrix[i][i] = match;
}
}
int seqIndex = 0;
Alignment alignment;
vector<int> scoreMat;
vector<Arrow> pathMat;
DistanceMatrixScoreFunction<DNASequence, DNASequence> distScoreFn;
distScoreFn.del = indel;
distScoreFn.ins = indel;
distScoreFn.InitializeScoreMatrix(SMRTDistanceMatrix);
if (fixedTarget) {
targetReader.GetNext(target);
}
cout << "qid,tid,qstart,qend,qlen,tstart,tend,tlen,score" << endl;
while (queryReader.GetNext(query) and
(fixedTarget or targetReader.GetNext(target))) {
if (query.length == 0 or target.length == 0)
continue;
alignment.blocks.clear();
int alignScore;
alignScore = SDPAlign(query, target,
distScoreFn, tm.tupleSize,
sdpIndel, sdpIndel, indelRate,
alignment,
alignType,
refineAlignments,
false,
0);
if (alignScore > 0){ // in rare cases the SDP returns positive.
alignScore = 0; // this makes it more like a true local alignment
}
if (showalign) {
StickPrintAlignment(alignment, query, target, cout);
}
if (printSW) {
MatchedAlignment swAlignment;
vector<int> scoreMat;
vector<Arrow> pathMat;
SWAlign(query, target, scoreMat, pathMat, swAlignment, distScoreFn);
StickPrintAlignment(swAlignment, query, target, cout);
}
cout << query.GetName() << "," << target.GetName() << ","
<< alignment.qPos << "," << alignment.QEnd() << ","
<< query.length << "," << alignment.tPos << ","
<< alignment.TEnd() << "," << target.length << ","
<< alignScore << endl;
++seqIndex;
}
return 0;
}