objects::CScope* scope)
88objects::CScope* scope)
const 91 if(vcf_variant !=
NULL) {
103it->second(checksum, obj, scope, *
this);
108 m_Map[type_info] = func;
136 #ifdef WORDS_BIGENDIAN 153objects::CScope* scope,
const string& data_source,
154 const string& sAdditionalInfo)
156 return GetFeatSignature(feat, feat.GetLocation(), scope, data_source, sAdditionalInfo);
162objects::CScope* scope,
constobjects::CSeq_annot_Handle& annot_handle,
163 const string& sAdditionalInfo)
165 return GetFeatSignature(feat, feat.GetLocation(), scope, annot_handle, sAdditionalInfo);
170 constobjects::CSeq_loc& loc,
171objects::CScope* scope,
172 constobjects::CSeq_annot_Handle& annot_handle,
173 const string& sAdditionalInfo)
175 stringannot_name =
"Unnamed";
176 if(annot_handle.IsNamed()) {
177annot_name = annot_handle.GetName();
192 constobjects::CSeq_loc& loc,
193objects::CScope* scope,
194 const string& data_source,
195 const string& sAdditionalInfo)
208 type|= feat.GetData().GetSubtype() & 0xff;
217 if(data_source.empty()) {
218sprintf(
buf,
"-%08x-%08x-%04x-%08x",
220}
else if(is_naa || is_rmt) {
221sprintf(
buf,
"-%08x-%08x-%04x-%08x-",
227sprintf(
buf,
"-%08x-%08x-%04x-%08x-%08x",
230 stringsAdditionalInfoDigest;
231 if(!sAdditionalInfo.empty()) {
233AdditionalInfoCS.
AddLine(sAdditionalInfo);
234sAdditionalInfoDigest = AdditionalInfoCS.
GetHexSum();
237 returnid_str +
buf+ ((is_naa || is_rmt) ? data_source :
"") + (sAdditionalInfoDigest.empty() ?
"": (
"-"+ sAdditionalInfoDigest));
242objects::CScope* scope,
const string& data_source)
249 TSeqRangerange = graph.GetLoc().GetTotalRange();
259 if(data_source.empty()) {
260sprintf(
buf,
"-%08x-%08x-%04x-%08x",
263sprintf(
buf,
"-%08x-%08x-%04x-%08x-",
269sprintf(
buf,
"-%08x-%08x-%04x-%08x-%08x",
273 returnid_str +
buf+ (is_naa ? data_source :
"");
278 constobjects::CSeq_loc& on_loc,
279objects::CScope* scope,
280 constobjects::CSeq_annot_Handle& annot_handle)
282 stringannot_name =
"Unnamed";
283 if(annot_handle.IsNamed()) {
284annot_name = annot_handle.GetName();
291 constobjects::CSeq_loc& on_loc, objects::CScope* scope,
292 const string& data_source)
300 TSeqRangerange = on_loc.GetTotalRange();
313 stringAdjustedDS(data_source);
315 if(data_source.empty()) {
316sprintf(
buf,
"-%08x-%08x-%04x-%08x",
318}
else if(is_include_ds) {
319sprintf(
buf,
"-%08x-%08x-%04x-%08x-",
322AdjustedDS =
"AlignDb";
327 boolbatch_found(align.GetNamedScore(
"batch_id", batch)); (void)batch_found;
328 NCBI_ASSERT(batch_found,
"AlignDb sourced alignment does not have a \"batch_id\" score!");
334 stringsIsQuery(
"N");
336 if(align.GetSeq_id(0).AsFastaString() == id_str) {
347sprintf(
buf,
"-%08x-%08x-%04x-%08x-%08x",
352 returnid_str +
buf+ (is_include_ds ? AdjustedDS :
"");
357objects::CScope* scope)
374sprintf(
buf,
"-%08x-%08x-%04x-%08x",
377 returnid_str +
buf;
383objects::CScope* scope,
384 const string& title,
385 const string& data_source,
396 type|= subtype & 0xff;
405 if(data_source.empty()) {
406sprintf(
buf,
"-%08x-%08x-%04x-%08x",
408}
else if(is_naa || is_rmt) {
409sprintf(
buf,
"-%08x-%08x-%04x-%08x-",
415sprintf(
buf,
"-%08x-%08x-%04x-%08x-%08x",
419 returnid_str +
buf+ ((is_naa || is_rmt) ? data_source :
"");
425 constobjects::CSeq_loc& mapped_loc,
426objects::CScope* scope)
434 TSeqRangerange = mapped_loc.GetTotalRange();
443sprintf(
buf,
"-%08x-%08x-%04x-%08x",
446 returnid_str +
buf;
464sprintf(
buf,
"-%08x-%08x-%04x-%08x", pnt, pnt,
type, checksum);
465 returnid_str +
buf;
484sprintf(
buf,
"-%08x-%08x-%04x-%08x",
487 returnid_str +
buf;
491objects::CSeq_id_Handle& sih,
497 Uint4& ds_fingerprint,
499objects::CScope* scope)
507vector<string>::const_iterator iter = toks.begin();
510 stringid_str = *iter++;
517 "failed to retrieve sequence (ParseSignature) : "+ id_str);
527subtype =
tmp& 0xff;
533 if(iter != toks.end()) {
534 const string& ds = *iter++;
552 returntoks.size() > 5 ? toks[5] :
"";
static void PutInt4(unsigned char *ptr, Int4 value)
CChecksum â Checksum calculator.
static void AddDouble(CChecksum &checksum, double value)
void Fingerprint(CChecksum &checksum, const CObject &obj, objects::CScope *scope) const
void x_Register(TTypeInfo type_info, TFingerPFunc func)
static void ParseSignature(const string &sig, objects::CSeq_id_Handle &sih, TSeqPos &from, TSeqPos &to, EObjectType &type, int &subtype, Uint4 &fingerprint, Uint4 &ds_fingerprint, string &ds_name, objects::CScope *scope)
parse signature with data source info.
static string GetRsiteSignature(const objects::CSeq_feat &feat, int pnt, objects::CScope *scope)
static void Register(TTypeInfo type_info, TFingerPFunc func)
static string GetHistogramSignature(const objects::CSeq_loc &loc, EObjectType obj_type, objects::CScope *scope, const string &title, const string &data_source="", int subtype=0)
static string GetGraphSignature(const objects::CSeq_graph &graph, objects::CScope *scope, const string &data_source="")
static void GetFingerprint(CChecksum &checksum, const CObject &obj, objects::CScope *scope=NULL)
static string GetComponentSignature(const objects::CSeq_loc &comp_loc, const objects::CSeq_loc &mapped_loc, objects::CScope *scope)
void(* TFingerPFunc)(CChecksum &checksum, const CObject &obj, objects::CScope *scope, const CObjFingerprint &fingerP)
static string GetVcfVariantSignature(const objects::CVcfVariant &vcf_variant, objects::CScope *scope)
static string ParseSignatureDS(const string &sig)
static string GetFeatSignature(const objects::CSeq_feat &feat, objects::CScope *scope, const string &data_source="", const string &sAdditionalInfo="")
static string GetSeqLocSignature(const objects::CSeq_loc &loc, objects::CScope *scope)
static string GetAlignSignature(const objects::CSeq_align &align, const objects::CSeq_loc &on_loc, objects::CScope *scope, const objects::CSeq_annot_Handle &annot_handle)
static void AddInteger(CChecksum &checksum, unsigned char *pvalue, int size)
static CObjFingerprint & x_GetInstance()
namespace ncbi::objects::
Base class for all serializable objects.
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
static const char * str(char *buf, int n)
unsigned int TSeqPos
Type for sequence locations and lengths.
string GetHexSum(void) const
Return string with checksum in hexadecimal form.
void AddLine(const char *line, size_t len)
Uint4 GetChecksum(void) const
Return calculated checksum.
void AddChars(const char *str, size_t len)
Update current control sum with data provided.
#define NCBI_ASSERT(expr, mess)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static bool IsNAA(const string &annot, bool isStrict=false)
check if a given annotation is a named annotation accession[.version][number] when isSctrict == false...
static bool IsAlignDb(const string &annot)
check if a given annotation is AlignDb (potentially suffixed with batch identication string after a '...
static bool isRmtAnnotName(const string &sAnnotname)
check if a given annotation was created by a remote file pipeline
static void TokenizeWithEscape(const string &str, const string &delim, vector< string > &tokens, bool remove_escape=false)
Tokenize a string using the delim.
const objects::CSeq_loc & GetLocation() const
virtual const CTypeInfo * GetThisTypeInfo(void) const =0
const string AsFastaString(void) const
CConstRef< CSeq_id > GetSeqId(void) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
CSeq_id_Handle GetIdHandle(const CSeq_loc &loc, CScope *scope)
int16_t Int2
2-byte (16-bit) signed integer
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint16_t Uint2
2-byte (16-bit) unsigned integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
static bool MatchesMask(CTempString str, CTempString mask, ECase use_case=eCase)
Match "str" against the "mask".
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static string UInt8ToString(Uint8 value, TNumToStringFlags flags=0, int base=10)
Convert UInt8 to string.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
const TLocation & GetLocation(void) const
Get the Location member data.
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Multi-threading â mutexes; rw-locks; semaphore.
DEFINE_STATIC_MUTEX(s_Mutex)
static void s_EscapeDash(string &id)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4