本文整理汇总了C++中GList::Delete方法的典型用法代码示例。如果您正苦于以下问题:C++ GList::Delete方法的具体用法?C++ GList::Delete怎么用?C++ GList::Delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GList
的用法示例。
在下文中一共展示了GList::Delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cluster_mRNAs
void cluster_mRNAs(GList<GffObj> & mrnas, GList<GLocus> & loci, int qfidx) {
//mrnas sorted by start coordinate
//and so are the loci
//int rdisc=0;
for (int t=0;t<mrnas.Count();t++) {
GArray<int> mrgloci(false);
GffObj* mrna=mrnas[t];
int lfound=0; //count of parent loci
/*for (int l=0;l<loci.Count();l++) {
if (loci[l]->end<mrna->exons.First()->start) continue;
if (loci[l]->start>mrna->exons.Last()->end) break; */
for (int l=loci.Count()-1;l>=0;l--) {
if (loci[l]->end<mrna->exons.First()->start) {
if (mrna->exons.First()->start-loci[l]->start > GFF_MAX_LOCUS) break;
continue;
}
if (loci[l]->start>mrna->exons.Last()->end) continue;
//here we have mrna overlapping loci[l]
if (loci[l]->add_mRNA(mrna)) {
//a parent locus was found
lfound++;
mrgloci.Add(l); //locus indices added here, in decreasing order
}
}//loci loop
//if (lfound<0) continue; //mrna was a ref duplicate, skip it
if (lfound==0) {
//create a locus with only this mRNA
loci.Add(new GLocus(mrna, qfidx));
}
else if (lfound>1) {
//more than one locus found parenting this mRNA, merge loci
lfound--;
for (int l=0;l<lfound;l++) {
int mlidx=mrgloci[l]; //largest indices first, so it's safe to remove
loci[mrgloci[lfound]]->addMerge(*loci[mlidx], mrna);
loci.Delete(mlidx);
}
}
}//mrnas loop
//if (rdisc>0) mrnas.Pack();
//return rdisc;
}