本文整理汇总了C++中Seq::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ Seq::GetId方法的具体用法?C++ Seq::GetId怎么用?C++ Seq::GetId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Seq
的用法示例。
在下文中一共展示了Seq::GetId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EstringOp
unsigned EstringOp(const short es[], const Seq &sIn, MSA &a)
{
unsigned uSymbols;
unsigned uIndels;
EstringCounts(es, &uSymbols, &uIndels);
assert(sIn.Length() == uSymbols);
unsigned uColCount = uSymbols + uIndels;
a.Clear();
a.SetSize(1, uColCount);
a.SetSeqName(0, sIn.GetName());
a.SetSeqId(0, sIn.GetId());
unsigned p = 0;
unsigned uColIndex = 0;
for (;;)
{
int n = *es++;
if (0 == n)
break;
if (n > 0)
for (int i = 0; i < n; ++i)
{
char c = sIn[p++];
a.SetChar(0, uColIndex++, c);
}
else
for (int i = 0; i < -n; ++i)
a.SetChar(0, uColIndex++, '-');
}
assert(uColIndex == uColCount);
return uColCount;
}
示例2: Copy
void Seq::Copy(const Seq &rhs)
{
clear();
const unsigned uLength = rhs.Length();
for (unsigned uColIndex = 0; uColIndex < uLength; ++uColIndex)
push_back(rhs.at(uColIndex));
const char *ptrName = rhs.GetName();
size_t n = strlen(ptrName) + 1;
m_ptrName = new char[n];
strcpy(m_ptrName, ptrName);
SetId(rhs.GetId());
}