本文整理汇总了C++中TrackList::getTrackCount方法的典型用法代码示例。如果您正苦于以下问题:C++ TrackList::getTrackCount方法的具体用法?C++ TrackList::getTrackCount怎么用?C++ TrackList::getTrackCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TrackList
的用法示例。
在下文中一共展示了TrackList::getTrackCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
bool Alignment::init(const LcbList & lcbList, const VariantList & variantList, const ReferenceList & referenceList, const TrackList & trackList)
{
totalLength = 0;
filterFlags = 0;
filterPass = true;
filterPassScale = true;
filterShow = false;
trackReference = 0;
destroyRegions();
lcbs.resize(lcbList.getLcbCount());
tracks.resize(trackList.getTrackCount());
for ( int i = 0; i < tracks.size(); i++ )
{
tracks[i] = new QVector<Region *>(lcbList.getLcbCount());
}
for ( int i = 0; i < lcbList.getLcbCount(); i++ )
{
const LcbList::Lcb & lcb = lcbList.getLcb(i);
int id = i;
lcbs[id].concordance = 1 - lcb.concordance;
//lcbs[id].number = atoi(lcb.name().c_str());
QVector<Region *> * regions = new QVector<Region *>(lcb.regions.size());
for ( int j = 0; j < lcb.regions.size(); j++ )
{
const LcbList::Region & lcbRegion = lcb.regions.at(j);
int track = j;
char * snps = 0;
Region * region = new Region
(
id,
lcbRegion.position,
lcbRegion.length,
lcbRegion.reverse,
snps
);
(*regions)[track] = region;
(*tracks[track])[id] = region;
if ( track == 0 )
{
totalLength += region->getLength();
}
}
lcbs[id].regions = regions;
}
for ( int i = 0; i < tracks.size(); i++ )
{
qSort(tracks[i]->begin(), tracks[i]->end(), Region::lessThan);
// determine total length
//
unsigned int length = 0;
//
for ( int j = 0; j < tracks[i]->size(); j++ )
{
length += (*tracks[i])[j]->getLength();
}
// assigned scaled
//
unsigned int position = 0;
//
for ( int j = 0; j < tracks[i]->size(); j++ )
{
(*tracks[i])[j]->setScaled
(
(float)position / length,
(float)(position + (*tracks[i])[j]->getLength()) / length
);
position += (*tracks[i])[j]->getLength();
}
}
snpMap.clear();
filters.resize(variantList.getFilterCount());
for ( int i = 0; i < variantList.getFilterCount(); i++ )
{
const VariantList::Filter & msgFilter = variantList.getFilter(i);
Filter & filter = filters[i];
filter.flag = msgFilter.flag;
filter.name = QString::fromStdString(msgFilter.name);
filter.description = QString::fromStdString(msgFilter.description);
}
//.........这里部分代码省略.........