本文整理汇总了C++中Seq::AppendChar方法的典型用法代码示例。如果您正苦于以下问题:C++ Seq::AppendChar方法的具体用法?C++ Seq::AppendChar怎么用?C++ Seq::AppendChar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Seq
的用法示例。
在下文中一共展示了Seq::AppendChar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PathSeq
static void PathSeq(const Seq &s, const PWPath &Path, bool bRight, Seq &sOut)
{
short *esA;
short *esB;
PathToEstrings(Path, &esA, &esB);
const unsigned uSeqLength = s.Length();
const unsigned uEdgeCount = Path.GetEdgeCount();
sOut.Clear();
sOut.SetName(s.GetName());
unsigned uPos = 0;
for (unsigned uEdgeIndex = 0; uEdgeIndex < uEdgeCount; ++uEdgeIndex)
{
const PWEdge &Edge = Path.GetEdge(uEdgeIndex);
char cType = Edge.cType;
if (bRight)
{
if (cType == 'I')
cType = 'D';
else if (cType == 'D')
cType = 'I';
}
switch (cType)
{
case 'M':
sOut.AppendChar(s[uPos++]);
break;
case 'D':
sOut.AppendChar('-');
break;
case 'I':
sOut.AppendChar(s[uPos++]);
break;
default:
Quit("PathSeq, invalid edge type %c", cType);
}
}
}
示例2: SeqFromMSACols
static void SeqFromMSACols(const MSA &msa, unsigned uSeqIndex, unsigned uColFrom,
unsigned uColTo, Seq &s)
{
s.Clear();
s.SetName(msa.GetSeqName(uSeqIndex));
s.SetId(msa.GetSeqId(uSeqIndex));
for (unsigned uColIndex = uColFrom; uColIndex <= uColTo; ++uColIndex)
{
char c = msa.GetChar(uSeqIndex, uColIndex);
if (!IsGapChar(c))
s.AppendChar(c);
}
}