// ---------------------------------------------------------------------------- void CFeatTableEdit::GenerateLocusTags() // ---------------------------------------------------------------------------- { CRef<CGb_qual> pLocusTag; SAnnotSelector selGenes; selGenes.IncludeFeatSubtype(CSeqFeatData::eSubtype_gene); CFeat_CI itGenes(mHandle, selGenes); for ( ; itGenes; ++itGenes) { string locusTagVal = itGenes->GetNamedQual("locus_tag"); if (!locusTagVal.empty()) { continue; } CSeq_feat_EditHandle feh(mpScope->GetObjectHandle( (itGenes)->GetOriginalFeature())); feh.AddQualifier("locus_tag", xNextLocusTag()); } SAnnotSelector selOther; selOther.ExcludeFeatSubtype(CSeqFeatData::eSubtype_gene); CFeat_CI itOther(mHandle, selOther); for ( ; itOther; ++itOther) { const CSeq_feat& feat = itOther->GetOriginalFeature(); CSeq_feat_EditHandle feh(mpScope->GetObjectHandle( (itOther)->GetOriginalFeature())); feh.RemoveQualifier("locus_tag"); CConstRef<CSeq_feat> pGeneParent = xGetGeneParent(feat); if (!pGeneParent) { continue; } string locusTag = pGeneParent->GetNamedQual("locus_tag"); feh.AddQualifier("locus_tag", locusTag); } }
bool PropertySheetIconValue::operator<(const PropertySheetIconValue &other) const { QMapIterator<ModeStateKey, PropertySheetPixmapValue> itThis(m_paths); QMapIterator<ModeStateKey, PropertySheetPixmapValue> itOther(other.m_paths); while (itThis.hasNext() && itOther.hasNext()) { const ModeStateKey thisPair = itThis.next().key(); const ModeStateKey otherPair = itOther.next().key(); if (thisPair < otherPair) return true; else if (otherPair < thisPair) return false; const int crc = itThis.value().compare(itOther.value()); if (crc < 0) return true; if (crc > 0) return false; } if (itOther.hasNext()) return true; return false; }