1 #ifndef GUI_OBJUTILS___NA_UTILS__HPP
2 #define GUI_OBJUTILS___NA_UTILS__HPP
70 static string GetAlignType(
const objects::CSeq_align& align,
71 objects::CScope& scope);
74 static void GetFeatSubtypes(
const objects::CSeq_annot& annot,
79 static bool IsGeneModelFeature(
int type,
int subtype);
89 static void FeatSubtypes2TrackSubtypes(
set<string>& subtypes,
95 const objects::CSeq_annot& annot);
98 static string GetSeqTableSubtype(
const set<string>& headers);
106 GetTrackInfo(
const objects::CSeq_annot& annot, objects::CScope& scope);
109 static void DataType2TrackType(
const string& annot_type,
110 const string& subtype,
140 EMetaDataSource_EmptyAfterFilteringRequest
148 EUidsSource_EmptyRequest
164 CNAUtils(
const objects::CSeq_id&
id, objects::CScope& scope);
173 void GetAllNAAs(
TNAAs& naas,
const string& context =
"")
const;
188 bool filtering =
false,
191 bool isGetLinks =
true)
const;
202 bool filtering =
false,
205 bool isGetLinks =
true)
const;
215 const string& context =
"",
224 void GetNATrackInfo(
TTrackInfoList& track_info,
const string& naa)
const;
234 const TNAAs& naas)
const;
241 void SetMaxNAs(
int size);
248 void x_GetNAIds(
TEntrezIds &uids,
const string& context =
"")
const;
252 static bool x_GetNAId(
TEntrezId &uid,
const string& naa,
267 void x_GetAllNAIdsWithContext(
TEntrezIds &uids,
const string& context)
const;
277 bool isIncremental =
false);
289 void x_SearchNAIds(
TEntrezIds &uids,
const TNAAs& naas,
bool filtering,
293 void x_ParseNAMetaData(
CAnnotMetaData& data,
const char* xml_str)
const;
Utilities for data/track type discovery.
Interface for testing cancellation request in a long lasting operation.
SStrictId_Entrez::TId TEntrezId
TEntrezId type for entrez ids which require the same strictness as TGi.
map< string, TGis > TEntrezIdtoGiCache
x_GetAllGIs(): NA uid+dbfrom to GIs which are associated with this NA
TGi m_Gi
GI of m_TargetSeq; it may be ZERO_GI for one of two reasons: either a target seq is not given at all ...
CTrackInfo::TTrackInfoList TTrackInfoList
objects::CBioseq_Handle m_BioseqHandle
Derived values which make sense only if m_TargetSeq is set.
static TNAAtoUidCache sm_NAAtoUidCache
static CTrackInfo::TTrackInfoList GetTrackInfo(const objects::CSeq_annot &annot, objects::CScope &scope)
EMetaDataSource
source of obtained NA metadata were internal caches hit, partially hit or totally missed during some ...
vector< TEntrezId > TEntrezIds
CNAUtils(const objects::CSeq_id &id)
Ctor with target sequence id.
string TNAA
typedefs for NAA meta-data
static TEntrezIdtoGiCache sm_UidtoGiCache
CRef< objects::CScope > m_Scope
Scope helping resolve sequences and retrieve annotations.
map< string, CRef< CAnnotMetaData > > TNAMetaDataSet
map< TEntrezId, CRef< CAnnotMetaData > > TEntrezIdtoMetaDataCache
x_GetNAMetaData() NAA numeric uid to CAnnotMetaData
CNAUtils(const objects::CSeq_id &id, objects::CScope &scope)
Ctor with target sequence id and a scope.
DECLARE_CLASS_STATIC_FAST_MUTEX(sm_UidtoGiCacheMutex)
map< TNAA, TEntrezId > TNAAtoUidCache
caching of eutils-related data: x_GetNAId(): NAA string to its numeric uid
objects::CSeq_id_Handle m_SeqIdHandle
sequence handles
static CTrackInfo::TTrackInfoList GetTrackInfo(objects::CSeq_annot_Handle annot_handle)
Get data track information from a seq-annot.
DECLARE_CLASS_STATIC_FAST_MUTEX(sm_UidtoMetaDataCacheMutex)
DECLARE_CLASS_STATIC_FAST_MUTEX(sm_NAAtoUidCacheMutex)
CSeqUtils::TEntrezIds TEntrezIds
int m_MaxNAMeta
maximal number of NAAs for retrieving meta-data.
static TEntrezIdtoMetaDataCache sm_UidtoMetaDataCache
EEntrezDB
eutils databases that can be used
list< CRef< CTrackInfo > > TTrackInfoList
CConstRef< objects::CSeq_id > m_TargetSeq
The target sequence associating with the NAAs.
set< TGi > TGis
get all GIs for a given NA accession
@ EMetaDataSource_EmptyRequest
#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.
#define NCBI_GUIOBJUTILS_EXPORT
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::SUBKEY subkey