47 #define NCBI_USE_ERRCODE_X ObjMgr_Indexer
61 m_Idx->x_Initialize(topseh, policy,
flags);
452 if (bsx->IsFetchFailure()) {
464 (
const_cast<CSeq_id*
>(
id.GetPointer()));
474 switch( (*it).Which() ) {
494 return tracker.GetBestChoice();
552 string str = (*it).AsString();
572 if (annt->IsFtable()) {
573 for (
auto& feat : annt->GetData().GetFtable()) {
576 }
else if (feat->IsSetCit()) {
584 }
else if (sep.
IsSet()) {
613 for (
auto& annt : bssp.
GetAnnot()) {
614 if (annt->IsFtable()) {
615 for (
auto& feat : annt->GetData().GetFtable()) {
618 }
else if (feat->IsSetCit()) {
960 if ( (*it)->IsLoc() ) {
961 const CSeq_loc& loc = (*it)->GetLoc();
962 if (loc.
IsNull())
continue;
976 switch (sid.Which()) {
989 switch (sid.Which()) {
1033 const CDbtag& gen_id =
id->GetGeneral ();
1039 }
else if (oid.
IsId()) {
1089 if (!
data.IsRsite())
continue;
1091 if (rsite.
IsStr()) {
1123 size_t resolveCount = 0;
1126 auto idxl = idx.
Lock();
1128 resolveCount = idxl->GetGapDepth();
1137 TSeqPos start = gap_it.GetPosition();
1138 TSeqPos end = gap_it.GetEndPosition();
1139 TSeqPos length = gap_it.GetLength();
1143 if( gap_it.IsSetData() && gap_it.GetData().IsGap() ) {
1144 pGap = &gap_it.GetData().GetGap();
1147 if( pSeqLiteral && pSeqLiteral->IsSetSeq_data() ) {
1148 const CSeq_data & seq_data = pSeqLiteral->GetSeq_data();
1149 if( seq_data.
IsGap() ) {
1150 pGap = &seq_data.
GetGap();
1162 bool isUnknownLength = gap_it.IsUnknownLength();
1165 bool isAssemblyGap = ( !
type.empty() || ! evidence.empty() );
1179 bool virus_or_phage,
1198 if (has_plasmid || wgs_suffix) {
1199 result =
"mitochondrial";
1201 result =
"mitochondrion";
1216 result =
"extrachromosomal";
1233 if (! virus_or_phage) {
1234 if (has_plasmid || wgs_suffix) {
1244 if (! virus_or_phage) {
1266 result =
"endogenous virus";
1269 result =
"hydrogenosome";
1275 result =
"chromatophore";
1285 if (taxname.empty()) {
1341 const string *common = 0;
1432 const string *com = 0, *acr = 0, *syn = 0, *ana = 0,
1433 *gbacr = 0, *gbana = 0, *gbsyn = 0, *met = 0;
1434 int numcom = 0, numacr = 0, numsyn = 0, numana = 0,
1435 numgbacr = 0, numgbana = 0, numgbsyn = 0, nummet = 0;
1438 const COrgMod& omd = **omd_itr;
1538 }
else if ( syn != 0 ) {
1540 }
else if ( acr != 0 ) {
1542 }
else if ( ana != 0 ) {
1545 }
else if ( com != 0 ) {
1547 }
else if ( gbsyn != 0 ) {
1549 }
else if ( gbacr != 0 ) {
1551 }
else if ( gbana != 0 ) {
1554 }
else if ( common != 0 ) {
1559 bool virus_or_phage =
false;
1560 bool has_plasmid =
false;
1561 bool wgs_suffix =
false;
1565 virus_or_phage =
true;
1600 const list <string> *keywords =
NULL;
1602 int num_super_kingdom = 0;
1603 bool super_kingdoms_different =
false;
1611 switch (sd.
Which()) {
1629 if (! pon.
IsSet())
break;
1638 num_super_kingdom++;
1643 super_kingdoms_different =
true;
1647 if (num_super_kingdom > 1 && super_kingdoms_different) {
1710 if (
m_IsPDB || desc_it.GetSeq_entry_Handle().IsSeq() ) {
1774 if (
NStr::Find (
m_Comment,
"[CAUTION] Could be the product of a pseudogene") != string::npos) {
1781 const CGB_block& gbk = desc_it->GetGenbank();
1814 if (keywords !=
NULL) {
1816 const string& clause = *kw_itr;
1820 const string&
str = *k_itr;
1969 auto idxl = idx.
Lock();
1976 (*func) (bsh, na_acc);
1977 if (na_acc.length() > 0) {
1998 auto idxl = idx.
Lock();
2000 int featDepth = idxl->GetFeatDepth();
2001 if (featDepth > 0) {
2079 bool onlyGeneRNACDS =
false;
2081 onlyGeneRNACDS =
true;
2090 auto idxl = idx.
Lock();
2132 old_loc.
SetInt().SetId( seq_id );
2133 old_loc.
SetInt().SetFrom( 0 );
2146 for (; feat_it; ++feat_it) {
2151 if (onlyGeneRNACDS) {
2173 bool gapIsSame =
false;
2187 prev_loc = feat_loc;
2214 switch (loc.
Which()) {
2228 idxl->SetHasOperon(
true);
2242 if (prot_length > longest) {
2245 longest = prot_length;
2246 bestprocessed = processed;
2247 }
else if (prot_length == longest) {
2249 if (processed < bestprocessed) {
2252 longest = prot_length;
2253 bestprocessed = processed;
2323 auto idxl = idx.
Lock();
2996 auto idxl = idx.
Lock();
2998 return idxl->HasOperon();
3077 if (to < 0 || to >= (
int) vec.
size()) {
3156 const vector<string>& evidence,
3157 bool isUnknownLength,
3165 m_GapEvidence(evidence),
3166 m_IsUnknownLength(isUnknownLength),
3167 m_IsAssemblyGap(isAssemblyGap)
3210 auto bsxl = bsx.
Lock();
3213 auto idxl = idx.
Lock();
3217 feature::CFeatTree::eBestGene_TreeOnly);
3220 return bsxl->GetFeatIndex(best);
3237 auto bsxl = bsx.
Lock();
3240 auto idxl = idx.
Lock();
3253 return bsxl->GetFeatIndex(best);
3268 auto bsxl = bsx.
Lock();
3270 bsxl->SetFetchFailure(fails);
3281 auto bsxl = bsx.
Lock();
3283 if (bsxl->HasSource()) {
3285 auto idxl = idx.
Lock();
3295 return bsxl->GetFeatIndex(best);
3311 auto bsxl = bsx.
Lock();
3332 if (to < 0 || to >= (
int) vec.
size()) {
3420 const char* src =
str.c_str();
3423 if (
static_cast<unsigned char>(*src) < 128) {
3430 = sc_ExtraTranslations.find(character);
3431 if (it != sc_ExtraTranslations.end()) {
3434 const utf8::SUnicodeTranslation* translation =
3438 if (translation->Subst !=
NULL) {
3439 dst += translation->Subst;
3592 return (iter != sc_StopWords.end());
3600 int max = (
int) dst.length();
3604 if (ch !=
'.' && ch !=
',' && ch !=
':' && ch !=
';') {
3612 char ch = dst[
max-1];
3613 if (ch !=
'.' && ch !=
',' && ch !=
':' && ch !=
';') {
3617 dst.erase(
max-1, 1);
3621 if (dst[0] ==
'(' && dst[
max-1] ==
')') {
3623 dst.erase(
max-1, 1);
3640 dst.erase(
max-1, 1);
3679 "&lt;i&gt;",
3680 "&lt;/i&gt;",
3681 "&lt;i/&gt;",
3682 "&lt;b&gt;",
3683 "&lt;/b&gt;",
3684 "&lt;b/&gt;",
3685 "&lt;u&gt;",
3686 "&lt;/u&gt;",
3687 "&lt;u/&gt;",
3688 "&lt;sub&gt;",
3689 "&lt;/sub&gt;",
3690 "&lt;sub/&gt;",
3691 "&lt;sup&gt;",
3692 "&lt;/sup&gt;",
3693 "&lt;sup/&gt;",
3701 const char*
tmp = ptr;
3718 const char* src =
str.c_str();
3721 if (*src ==
'<' || *src ==
'&') {
3743 if (!
prev.empty()) {
3745 string pair =
prev +
" " + item;
3768 ITERATE( list<string>, it, terms ) {
3776 for (
size_t i = 0;
i <
str.length();
i++) {
3778 if (ch >=
'A' && ch <=
'Z') {
3779 }
else if (ch >=
'a' && ch <=
'z') {
3780 }
else if (ch >=
'0' && ch <=
'9') {
3789 ITERATE( list<string>, it, words ) {
static CRef< CScope > m_Scope
@ eExtreme_Positional
numerical value
Tracks the best score (lowest value).
bool IsSetCommon(void) const
const string & GetTaxname(void) const
const string & GetCommon(void) const
const COrgName & GetOrgname(void) const
bool IsSetOrgname(void) const
bool IsSetTaxname(void) const
CTempString GetSubstrain(void)
CBioSource::TGenome m_Genome
bool m_FeatForProdInitialized
bool m_IsUnverifiedMisassembled
bool m_BestProtFeatInitialized
vector< CRef< CFeatureIndex > > m_SfxList
TFeatIndexMap m_FeatIndexMap
CTempString m_SpecimenVoucher
CSeq_inst::TLength GetLength(void) const
CSeq_inst::TTopology m_Topology
string m_SecondSuperKingdom
CRef< CSeqVector > m_SeqVec
CTempString GetCultivar(void)
bool IsForceOnlyNearFeats(void)
CTempString GetMetaGenomeSource(void)
CTempString GetBreed(void)
const vector< CRef< CGapIndex > > & GetGapIndices(void)
CBioseqIndex(CBioseq_Handle bsh, const CBioseq &bsp, CBioseq_Handle obsh, CRef< CSeqsetIndex > prnt, CSeq_entry_Handle tseh, CRef< CScope > scope, CSeqMasterIndex &idx, CSeqEntryIndex::EPolicy policy, CSeqEntryIndex::TFlags flags)
bool m_ForceOnlyNearFeats
bool m_IsUnreviewedUnannotated
CConstRef< CBioSource > m_BioSource
CTempString GetGenus(void)
CMolInfo::TTech GetTech(void)
CRef< CFeatureIndex > GetFeatureForProduct(void)
const vector< CRef< CFeatureIndex > > & GetFeatureIndices(void)
const string & GetLineage(void)
CConstRef< CMolInfo > m_MolInfo
bool m_IsUnverifiedFeature
CTempString GetStrain(void)
bool m_IsUnverifiedContaminant
bool IsHTGSCancelled(void)
CConstRef< CMolInfo > GetMolInfo(void)
CBioseq_Handle GetBioseqHandle(void) const
bool IsUnverifiedFeature(void)
CTempString GetSpecies(void)
CRef< CFeatureIndex > GetFeatIndex(const CMappedFeat &mf)
CConstRef< CBioSource > GetBioSource(void)
string m_FirstSuperKingdom
string GetSecondSuperKingdom(void)
bool IsUsingAnamorph(void)
const string & GetAccession(void) const
CMolInfo::TCompleteness GetCompleteness(void)
CWeakRef< CSeqMasterIndex > GetSeqMasterIndex(void) const
bool IsCrossKingdom(void)
const vector< CRef< CDescriptorIndex > > & GetDescriptorIndices(void)
CSeqEntryIndex::TFlags m_Flags
bool m_IsUnverifiedOrganism
CConstRef< CBioSource > m_DescBioSource
CSeq_inst::TLength m_Length
CTempString GetIsolate(void)
CTempString GetPDBCompound(void)
const string & GetTitle(void)
bool m_HasMultiIntervalGenes
bool IsUnreviewedUnannotated(void)
void GetSelector(SAnnotSelector &sel)
CTempString GetSegment(void)
CTempString GetLinkageGroup(void)
vector< CRef< CDescriptorIndex > > m_SdxList
bool HasMultiIntervalGenes(void)
CMolInfo::TBiomol m_Biomol
const string & GetTaxname(void)
bool m_SourcesInitialized
CWeakRef< CBioseqIndex > GetBioseqForProduct(void)
const string & GetOrganelle(void)
CRef< CFeatureIndex > GetBestProteinFeature(void)
CTempString GetSpecimenVoucher(void)
vector< CRef< CGapIndex > > m_GapList
CSeqEntryIndex::EPolicy m_Policy
CTempString GetClone(void)
CRef< CFeatureIndex > m_BestProteinFeature
CBioSource::TGenome GetGenome(void)
CTempString GetChromosome(void)
bool IsUnverifiedMisassembled(void)
CTempString m_TargetedLocus
CMolInfo::TBiomol GetBiomol(void)
bool IsHTGSUnfinished(void)
CTempString GetPlasmid(void)
string GetFirstSuperKingdom(void)
CTempString m_MetaGenomeSource
void x_DefaultSelector(SAnnotSelector &sel, CSeqEntryIndex::EPolicy policy, CSeqEntryIndex::TFlags flags, bool onlyNear, CScope &scope)
CTempString m_PDBCompound
bool IsUnverifiedContaminant(void)
const string & GetCommon(void)
CMolInfo::TCompleteness m_Completeness
bool IsMultispecies(void)
CRef< CFeatureIndex > m_FeatureForProduct
const string & GetComment(void)
bool IsUnverifiedOrganism(void)
CTempString GetTargetedLocus(void)
CTempString m_LinkageGroup
const string & GetDescTaxname(void)
CSeq_entry * GetParentEntry(void) const
CSeq_entry * GetParentEntry(void) const
bool IsSkippable(void) const
CSeqdesc::E_Choice m_Type
CDescriptorIndex(const CSeqdesc &sd, CBioseqIndex &bsx)
CFeatureIndex(CSeq_feat_Handle sfh, const CMappedFeat mf, CConstRef< CSeq_loc > feat_loc, CBioseqIndex &bsx)
CSeqFeatData::ESubtype m_Subtype
CSeqFeatData::ESubtype GetSubtype(void) const
CRef< CFeatureIndex > GetOverlappingSource(void)
CSeqFeatData::E_Choice GetType(void) const
CRef< CSeqVector > m_SeqVec
CRef< CFeatureIndex > GetBestParent(void)
CRef< CFeatureIndex > GetBestGene(void)
CSeqFeatData::E_Choice m_Type
const CMappedFeat GetMappedFeat(void) const
CConstRef< CSeq_loc > m_Fl
void SetFetchFailure(bool fails)
CConstRef< CSeq_loc > GetMappedLocation(void) const
CWeakRef< CBioseqIndex > GetBioseqIndex(void) const
CGapIndex(TSeqPos start, TSeqPos end, TSeqPos length, const string &type, const vector< string > &evidence, bool isUnknownLength, bool isAssemblyGap, CBioseqIndex &bsx)
const string & GetSomeNumber(void) const
@OrgMod.hpp User-defined methods of the data storage class.
CRef< CSeqMasterIndex > m_Idx
bool IsFetchFailure(void)
const vector< CRef< CBioseqIndex > > & GetBioseqIndices(void)
bool DistributedReferences(void)
void SetFeatDepth(int featDepth)
const vector< CRef< CSeqsetIndex > > & GetSeqsetIndices(void)
CSeqEntryIndex(CSeq_entry_Handle &topseh, EPolicy policy=eAdaptive, TFlags flags=fDefault)
bool IsIndexFailure(void)
FAddSnpFunc * GetSnpFunc(void)
void SetGapDepth(int gapDepth)
void SetSnpFunc(FAddSnpFunc *snp)
CRef< CBioseqIndex > GetBioseqIndex(void)
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
bool m_DistributedReferences
CSeqEntryIndex::TFlags m_Flags
const vector< CRef< CSeqsetIndex > > & GetSeqsetIndices(void)
CConstRef< CSeq_descr > m_TopDescr
const vector< CRef< CBioseqIndex > > & GetBioseqIndices(void)
bool DistributedReferences(void) const
void x_Initialize(CSeq_entry_Handle &topseh, CSeqEntryIndex::EPolicy policy, CSeqEntryIndex::TFlags flags)
CSeqEntryIndex::EPolicy m_Policy
TAccnIndexMap m_AccnIndexMap
void x_InitSeqs(const CSeq_entry &sep, CRef< CSeqsetIndex > prnt, int level=0)
CConstRef< CSubmit_block > m_SbtBlk
FAddSnpFunc * GetSnpFunc(void)
bool IsFetchFailure(void)
void SetGapDepth(int gapDepth)
CRef< CObjectManager > m_Objmgr
TBestIdIndexMap m_BestIdIndexMap
void SetFeatDepth(int featDepth)
vector< CRef< CBioseqIndex > > m_BsxList
void SetSnpFunc(FAddSnpFunc *snp)
CConstRef< CSeq_entry > m_Tsep
CRef< CBioseqIndex > GetBioseqIndex(void)
vector< CRef< CSeqsetIndex > > m_SsxList
bool IsIndexFailure(void) const
CRef< feature::CFeatTree > m_FeatTree
@Seq_descr.hpp User-defined methods of the data storage class.
namespace ncbi::objects::
CBioseq_set::TClass m_Class
CBioseq_set::TClass GetClass(void) const
CSeqsetIndex(CBioseq_set_Handle ssh, const CBioseq_set &bssp, CRef< CSeqsetIndex > prnt)
TBase::const_iterator const_iterator
class CStaticArrayMap<> is an array adaptor that provides an STLish interface to statically-defined a...
TBase::const_iterator const_iterator
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
bool IsUnverifiedMisassembled() const
bool IsUnverifiedOrganism() const
bool IsUnverifiedContaminant() const
bool IsUnverifiedFeature() const
bool IsUnreviewedUnannotated() const
static string TrimMixedContent(const string &str)
static bool IsStopWord(const string &str)
void PopulateWordPairIndex(string str)
string x_AddToWordPairIndex(string item, string prev)
static string TrimPunctuation(const string &str)
static string ConvertUTF8ToAscii(const string &str)
container_type::iterator iterator
const_iterator end() const
const_iterator find(const key_type &key) const
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static const char * str(char *buf, int n)
#define FOR_EACH_USERFIELD_ON_USEROBJECT(Itr, Var)
FOR_EACH_USERFIELD_ON_USEROBJECT EDIT_EACH_USERFIELD_ON_USEROBJECT.
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
SStrictId_Tax::TId TTaxId
Taxon id type.
void Set(TValue new_value) THROWS_NONE
Set atomic counter value.
void SetDiagFilter(EDiagFilter what, const char *filter_str)
Set diagnostic filter.
#define ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
@ eDiagFilter_All
for all non-FATAL
void Error(CExceptionArgs_Base &args)
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)
Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
CConstRef< CSeq_id > GetSeqId(void) const
EAccessionInfo
For IdentifyAccession (below)
string AsString(void) const
static int Score(const CRef< CSeq_id > &id)
Wrappers for use with FindBestChoice from <corelib/ncbiutil.hpp>
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
TSeqPos GetStop(ESeqLocExtremes ext) const
CMappedFeat GetBestParentForFeat(const CMappedFeat &feat, CSeqFeatData::ESubtype parent_subtype, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0)
CMappedFeat GetBestGeneForFeat(const CMappedFeat &feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0, CFeatTree::EBestGeneType lookup_type=CFeatTree::eBestGene_TreeOnly)
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
vector< string > gap_linkage_evidences
A vector representing the linkage-evidences of the gap.
string gap_type
String representing the gap type.
static void GetGapModText(const CSeq_gap &seq_gap, SGapModText &out_gap_mod_text)
Given a CSeq_gap object, this outputs the Gap information.
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
CSeq_loc_Mapper_Base & TruncateNonmappingRanges(void)
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
CBioseq_set_Handle GetBioseq_setHandle(const CBioseq_set &seqset, EMissing action=eMissing_Default)
void SetFuzzOption(TFuzzOption newOption)
@ fFuzzOption_RemoveLimTlOrTr
vector< CSeq_id_Handle > TId
const CTSE_Handle & GetTSE_Handle(void) const
Get CTSE_Handle of containing TSE.
TClass GetClass(void) const
const TInst_Ext & GetInst_Ext(void) const
bool IsSetInst_Ext(void) const
const CSeqFeatData & GetData(void) const
TSeqPos GetBioseqLength(void) const
CConstRef< CSeq_id > GetSeqId(void) const
Get id which can be used to access this bioseq handle Throws an exception if none is available.
bool IsSetInst_Length(void) const
TInst_Topology GetInst_Topology(void) const
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
TInst_Length GetInst_Length(void) const
bool IsSetInst(void) const
bool IsSetInst_Repr(void) const
bool IsSetClass(void) const
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
TInst_Repr GetInst_Repr(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
bool IsSetInst_Topology(void) const
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
const TId & GetId(void) const
bool IsSetData(void) const
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
SSeqMapSelector & SetResolveCount(size_t res_cnt)
Set max depth of resolving seq-map.
SAnnotSelector & ExcludeFeatSubtype(TFeatSubtype subtype)
Exclude feature subtype from the search.
CSeq_id_Handle GetProductId(void) const
SAnnotSelector & SetResolveAll(void)
SetResolveAll() is equivalent to SetResolveMethod(eResolve_All).
SAnnotSelector & ExcludeFeatType(TFeatType type)
Exclude feature type from the search.
SAnnotSelector & SetMaxSearchSegmentsAction(EMaxSearchSegmentsAction action)
const CSeq_loc & GetLocation(void) const
SSeqMapSelector & SetFlags(TFlags flags)
Select segment type(s)
SAnnotSelector & SetAdaptiveDepth(bool value=true)
SetAdaptiveDepth() requests to restrict subsegment resolution depending on annotations found on lower...
SAnnotSelector & SetResolveDepth(int depth)
SetResolveDepth sets the limit of subsegment resolution in searching annotations.
SAnnotSelector & SetFeatComparator(IFeatComparator *comparator)
SAnnotSelector & IncludeNamedAnnotAccession(const string &acc, int zoom_level=0)
const CSeq_feat_Handle & GetSeq_feat_Handle(void) const
Get original feature handle.
SAnnotSelector & SetExcludeExternal(bool exclude=true)
External annotations for the Object Manger are annotations located in top level Seq-entry different f...
SAnnotSelector & SetMaxSearchTime(TMaxSearchTime max_time)
Set maximum time (in seconds) to search before giving up.
SAnnotSelector & SetFailUnresolved(void)
SAnnotSelector & ExcludeNamedAnnots(const CAnnotName &name)
Add named annot to set of annots names to exclude.
SAnnotSelector & SetIgnoreStrand(bool value=true)
Ignore strand when testing for range overlap.
SAnnotSelector & SetMaxSearchSegments(TMaxSearchSegments max_segments)
Set maximum number of empty segments to search before giving up.
SAnnotSelector & ExcludeNamedAnnotAccession(const string &acc)
CSeq_id_Handle GetLocationId(void) const
@ eMaxSearchSegmentsSilent
bool CanGetRange(TSeqPos start, TSeqPos stop) const
Check if the sequence data is available for the interval [start, stop).
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
void SetCoding(TCoding coding)
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
TRefType Lock(void) const
Lock the object and return reference to it.
bool NotEmpty(void) const THROWS_NONE
Check if CConstRef is not empty – pointing to an object and has a non-null value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
bool empty(void) const
Return true if the represented string is empty (i.e., the length is zero)
void clear(void)
Clears the string.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
const char *const kEmptyCStr
Empty "C" string (points to a '\0').
static string & ToLower(string &str)
Convert string to lower case – string& version.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
const TKeywords & GetKeywords(void) const
Get the Keywords member data.
bool IsSetKeywords(void) const
Check if a value has been assigned to Keywords data member.
const TKeywords & GetKeywords(void) const
Get the Keywords member data.
bool IsSetKeywords(void) const
Check if a value has been assigned to Keywords data member.
const TCountry & GetCountry(void) const
Get the Country member data.
TGenome GetGenome(void) const
Get the Genome member data.
bool CanGetOrg(void) const
Check if it is safe to call GetOrg method.
const TOrg & GetOrg(void) const
Get the Org member data.
bool IsSetGenome(void) const
Check if a value has been assigned to Genome data member.
const TName & GetName(void) const
Get the Name member data.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
const TTag & GetTag(void) const
Get the Tag member data.
bool IsId(void) const
Check if variant Id is selected.
const TData & GetData(void) const
Get the Data member data.
bool IsSetTag(void) const
appropriate tag Check if a value has been assigned to Tag data member.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetLabel(void) const
field label Check if a value has been assigned to Label data member.
const TStr & GetStr(void) const
Get the variant data.
const TLabel & GetLabel(void) const
Get the Label member data.
const TType & GetType(void) const
Get the Type member data.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
TId GetId(void) const
Get the variant data.
const TLineage & GetLineage(void) const
Get the Lineage member data.
TFixed_level GetFixed_level(void) const
Get the Fixed_level member data.
const TSubname & GetSubname(void) const
Get the Subname member data.
bool IsSetFixed_level(void) const
Check if a value has been assigned to Fixed_level data member.
bool IsPartial(void) const
Check if variant Partial is selected.
const TName & GetName(void) const
Get the Name member data.
const TLevel & GetLevel(void) const
Get the Level member data.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
const TBinomial & GetBinomial(void) const
Get the variant data.
bool CanGetLineage(void) const
Check if it is safe to call GetLineage method.
const Tdata & Get(void) const
Get the member data.
const TName & GetName(void) const
Get the Name member data.
bool IsSetGenus(void) const
required Check if a value has been assigned to Genus data member.
const TSpecies & GetSpecies(void) const
Get the Species member data.
list< CRef< CTaxElement > > Tdata
bool IsSetSubname(void) const
Check if a value has been assigned to Subname data member.
bool IsSetLevel(void) const
Check if a value has been assigned to Level data member.
const TGenus & GetGenus(void) const
Get the Genus member data.
const TPartial & GetPartial(void) const
Get the variant data.
bool IsSet(void) const
Check if a value has been assigned to data member.
bool IsSetSpecies(void) const
species required if subspecies used Check if a value has been assigned to Species data member.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
bool IsBinomial(void) const
Check if variant Binomial is selected.
EProcessed
processing status
TProcessed GetProcessed(void) const
Get the Processed member data.
bool IsSetProcessed(void) const
Check if a value has been assigned to Processed data member.
bool IsStr(void) const
Check if variant Str is selected.
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TBiosrc & GetBiosrc(void) const
Get the variant data.
const TProt & GetProt(void) const
Get the variant data.
@ e_Region
named region (globin locus)
@ e_Pub
publication applies to this seq
@ e_Comment
just a comment
TChain GetChain(void) const
Get the Chain member data.
bool IsSetChain_id(void) const
chain identifier; length-independent generalization of 'chain' Check if a value has been assigned to ...
bool IsSetChain(void) const
Deprecated: 'chain' can't support multiple character PDB chain identifiers (introduced in 2015).
bool IsSetAccession(void) const
Check if a value has been assigned to Accession data member.
bool IsSetCit(void) const
patent citation Check if a value has been assigned to Cit data member.
E_Choice Which(void) const
Which variant is currently selected.
TSeqid GetSeqid(void) const
Get the Seqid member data.
const TChain_id & GetChain_id(void) const
Get the Chain_id member data.
bool IsNull(void) const
Check if variant Null is selected.
bool IsSetSeqid(void) const
number of sequence in patent Check if a value has been assigned to Seqid data member.
const TCit & GetCit(void) const
Get the Cit member data.
const TAccession & GetAccession(void) const
Get the Accession member data.
@ e_Other
for historical reasons, 'other' = 'refseq'
@ e_Gpipe
Internal NCBI genome pipeline processing ID.
@ e_Tpe
Third Party Annot/Seq EMBL.
@ e_Tpd
Third Party Annot/Seq DDBJ.
@ e_General
for other databases
@ e_Gi
GenInfo Integrated Database.
@ e_Tpg
Third Party Annot/Seq Genbank.
@ e_Equiv
equivalent sets of locations
const TSeq & GetSeq(void) const
Get the variant data.
const TDescr & GetDescr(void) const
Get the Descr member data.
TSet & SetSet(void)
Select the variant.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
bool IsSetDescr(void) const
Check if a value has been assigned to Descr data member.
bool IsSet(void) const
Check if variant Set is selected.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
TSeq & SetSeq(void)
Select the variant.
@ eClass_small_genome_set
viral segments or mitochondrial minicircles
bool IsMap(void) const
Check if variant Map is selected.
const TUser & GetUser(void) const
Get the variant data.
ERepr
representation class
const TGap & GetGap(void) const
Get the variant data.
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
const Tdata & Get(void) const
Get the member data.
const TTitle & GetTitle(void) const
Get the variant data.
const TSource & GetSource(void) const
Get the variant data.
const TMap & GetMap(void) const
Get the variant data.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
TTech GetTech(void) const
Get the Tech member data.
const Tdata & Get(void) const
Get the member data.
list< CRef< CSeq_feat > > Tdata
bool IsDelta(void) const
Check if variant Delta is selected.
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
TBiomol GetBiomol(void) const
Get the Biomol member data.
const TDelta & GetDelta(void) const
Get the variant data.
TCompleteness GetCompleteness(void) const
Get the Completeness member data.
const Tdata & Get(void) const
Get the member data.
E_Choice Which(void) const
Which variant is currently selected.
list< CRef< CDelta_seq > > Tdata
bool IsGap(void) const
Check if variant Gap is selected.
const TDescr & GetDescr(void) const
Get the Descr member data.
bool IsSet(void) const
Check if a value has been assigned to data member.
const TComment & GetComment(void) const
Get the variant data.
const TMolinfo & GetMolinfo(void) const
Get the variant data.
@ eRepr_delta
sequence made by changes (delta) to others
@ eRepr_map
ordered map of any kind
@ eRepr_virtual
no seq data
@ e_Ncbieaa
extended ASCII 1 letter aa codes
@ e_Embl
EMBL specific information.
@ e_User
user defined object
@ e_Pub
a reference to the publication
@ e_Genbank
GenBank specific info.
@ e_Comment
a more extensive comment
@ e_Molinfo
info on the molecule and techniques
@ e_Title
a title for this sequence
@ e_Pdb
PDB specific information.
@ e_Source
source of materials, includes Org-ref
const TEntrys & GetEntrys(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TSub & GetSub(void) const
Get the Sub member data.
bool IsEntrys(void) const
Check if variant Entrys is selected.
bool CanGetSub(void) const
Check if it is safe to call GetSub method.
bool CanGetData(void) const
Check if it is safe to call GetData method.
unsigned int
A callback function used to compare two keys in a database.
const SUnicodeTranslation * UnicodeToAscii(TUnicode character, const TUnicodeTable *table=NULL, const SUnicodeTranslation *default_translation=NULL)
Convert Unicode character into ASCII string.
size_t UTF8ToUnicode(const char *utf, TUnicode *unicode)
Convert UTF8 into Unicode character.
@ eSkip
Unicode to be skipped in translation. Usually it is combined mark.
Definition of all error codes used in objmgr libraries (xobjmgr.lib, xobjutil.lib and others).
CStaticArraySet< const char *, PCase_CStr > TStopWords
static const char *const mixedTags[]
NCBI_DEFINE_ERR_SUBCODE_X(11)
static bool s_BlankOrNotSpecialTaxname(string taxname)
CStaticPairArrayMap< utf8::TUnicode, char > TExtraTranslations
static int SkipMixedContent(const char *ptr)
static const TExtraTranslationPair kExtraTranslations[]
static CSeq_id_Handle s_IdxFindBestIdChoice(const CBioseq_Handle::TId &ids)
static const char * x_OrganelleName(TBIOSOURCE_GENOME genome, bool has_plasmid, bool virus_or_phage, bool wgs_suffix)
static string s_IdxGetBestIdString(CBioseq_Handle bsh)
DEFINE_STATIC_ARRAY_MAP(TExtraTranslations, sc_ExtraTranslations, kExtraTranslations)
SStaticPair< utf8::TUnicode, char > TExtraTranslationPair
static int s_IdxSeqIdHandle(const CSeq_id_Handle &idh)
static const char *const idxStopWords[]
void(* FAddSnpFunc)(CBioseq_Handle bsh, string &na_acc)
constexpr auto sort(_Init &&init)
#define NCBI_SEQTOPOLOGY(Type)
#define FOR_EACH_COMPOUND_ON_PDBBLOCK(Itr, Var)
FOR_EACH_COMPOUND_ON_PDBBLOCK EDIT_EACH_COMPOUND_ON_PDBBLOCK.
#define NCBI_GENOME(Type)
@NAME Convenience macros for NCBI objects
#define SWITCH_ON_SUBSOURCE_CHOICE(Var)
SWITCH_ON_SUBSOURCE_CHOICE.
#define NCBI_ORGMOD(Type)
COrgMod definitions.
#define FOR_EACH_ORGMOD_ON_BIOSOURCE(Itr, Var)
FOR_EACH_ORGMOD_ON_BIOSOURCE EDIT_EACH_ORGMOD_ON_BIOSOURCE.
#define SWITCH_ON_ORGMOD_CHOICE(Var)
SWITCH_ON_ORGMOD_CHOICE.
#define FOR_EACH_SUBSOURCE_ON_BIOSOURCE(Itr, Var)
FOR_EACH_SUBSOURCE_ON_BIOSOURCE EDIT_EACH_SUBSOURCE_ON_BIOSOURCE.
#define NCBI_SUBSOURCE(Type)
CSubSource definitions.
CBioSource::TGenome TBIOSOURCE_GENOME
CSeq_id::EAccessionInfo TACCN_CHOICE
#define NCBI_SEQID(Type)
@NAME Convenience macros for NCBI objects
#define FIELD_IS_SET_AND_IS(Var, Fld, Chs)
FIELD_IS_SET_AND_IS base macro.
#define FOR_EACH_STRING_IN_LIST(Itr, Var)
FOR_EACH_STRING_IN_LIST EDIT_EACH_STRING_IN_LIST.
#define GET_FIELD(Var, Fld)
GET_FIELD base macro.
This indicates the text of the modifiers of a gap.
Selector used in CSeqMap methods returning iterators.
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...