本文整理汇总了C++中SeqVect::Clear方法的典型用法代码示例。如果您正苦于以下问题:C++ SeqVect::Clear方法的具体用法?C++ SeqVect::Clear怎么用?C++ SeqVect::Clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SeqVect
的用法示例。
在下文中一共展示了SeqVect::Clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: convertMAlignment2SecVect
void convertMAlignment2SecVect(SeqVect& sv, const MultipleSequenceAlignment& ma, bool fixAlpha) {
sv.Clear();
MuscleContext *ctx = getMuscleContext();
ctx->fillUidsVectors(ma->getNumRows());
unsigned i=0;
unsigned seq_count = 0;
foreach(const MultipleSequenceAlignmentRow& row, ma->getMsaRows()) {
Seq *ptrSeq = new Seq();
QByteArray name = row->getName().toLocal8Bit();
ptrSeq->FromString(row->getCore().constData(), name.constData());
//stripping gaps, original Seq::StripGaps fails on MSVC9
Seq::iterator newEnd = std::remove(ptrSeq->begin(), ptrSeq->end(), U2Msa::GAP_CHAR);
ptrSeq->erase(newEnd, ptrSeq->end());
if (ptrSeq->Length()!=0) {
ctx->tmp_uIds[seq_count] = ctx->input_uIds[i];
sv.push_back(ptrSeq);
seq_count++;
}
i++;
}
if (fixAlpha) {
sv.FixAlpha();
}
}
示例2: SeqVectFromMSACols
static void SeqVectFromMSACols(const MSA &msa, unsigned uColFrom, unsigned uColTo,
SeqVect &v)
{
v.Clear();
const unsigned uSeqCount = msa.GetSeqCount();
for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)
{
Seq s;
SeqFromMSACols(msa, uSeqIndex, uColFrom, uColTo, s);
v.AppendSeq(s);
}
}
示例3: SeqVectFromMSA
void SeqVectFromMSA(const MSA &msa, SeqVect &v)
{
v.Clear();
const unsigned uSeqCount = msa.GetSeqCount();
for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)
{
Seq s;
msa.GetSeq(uSeqIndex, s);
s.StripGaps();
//if (0 == s.Length())
// continue;
const char *ptrName = msa.GetSeqName(uSeqIndex);
s.SetName(ptrName);
v.AppendSeq(s);
}
}