[] = {
60 "culture-collection",
75 for(
n= 0;
n< sz;
n++) {
84 for(
size_t i= sz;
i>
n;
i--) {
92 auto&
all= node[
"all"];
93 for(
auto& qual_it: node.
GetMap() ) {
94 if(qual_it.first ==
"all")
continue;
97 auto& all_qual =
all[qual_it.first];
98 for(
auto& val_it: qual_it.second->GetMap())
101 for(
autoobj: val_it.second->GetObjects())
103 if(all_qual.Exist(*obj))
104all_qual[
"*"].Add(*obj,
false);
106all_qual.Add(*obj,
false);
115 if(node[
"all"][qual].Exist(obj)) {
116node[
"all"][qual][
"*"].
Add(obj,
false);
119node[
"all"][qual].
Add(obj,
false);
121node[qual][
val].
Add(obj);
124node[qual][
val].
Add(obj);
132 void* m_UserData =
nullptr;
137 "SOURCE_QUALS_ASNDISC",
144m_Objs[
"all"].Add(*disc_obj);
148 if(biosrc->CanGetOrg()) {
149 const COrg_ref& org_ref = biosrc->GetOrg();
157 if(biosrc->CanGetSubtype()) {
158 for(
auto& it : biosrc->GetSubtype()) {
160 if(it->CanGetName()) {
166 if(biosrc->IsSetOrgMod()) {
167 for(
auto& it : biosrc->GetOrgname().GetMod()) {
175 if(biosrc->CanGetPcr_primers()) {
176 for(
auto& it : biosrc->GetPcr_primers().Get()) {
177 if(it->CanGetForward()) {
178 for(
auto& pr : it->GetForward().Get()) {
179 if(pr->CanGetName()) {
180 AddObjToQualMap(
"fwd-primer-name", pr->GetName(), *disc_obj, m_Objs);
182 if(pr->CanGetSeq()) {
187 if(it->CanGetReverse()) {
188 for(
auto& pr : it->GetReverse().Get()) {
189 if(pr->CanGetName()) {
190 AddObjToQualMap(
"rev-primer-name", pr->GetName(), *disc_obj, m_Objs);
192 if(pr->CanGetSeq()) {
208m_Objs[
"all"].Add(*disc_obj);
213 if(obj.CanGetOrg()) {
214 const COrg_ref& org_ref = obj.GetOrg();
224 if(obj.CanGetSubtype()) {
227 if((*it)->CanGetName()) {
234 if(obj.IsSetOrgMod()) {
248 if(obj.CanGetPcr_primers()) {
250 if((*it)->CanGetForward()) {
252 if((*pr)->CanGetName()) {
253 AddObjToQualMap(
"fwd-primer-name", (*pr)->GetName(), *disc_obj, m_Objs);
255 if((*pr)->CanGetSeq()) {
256 AddObjToQualMap(
"fwd-primer-seq", (*pr)->GetSeq(), *disc_obj, m_Objs);
260 if((*it)->CanGetReverse()) {
262 if((*pr)->CanGetName()) {
263 AddObjToQualMap(
"rev-primer-name", (*pr)->GetName(), *disc_obj, m_Objs);
265 if((*pr)->CanGetSeq()) {
266 AddObjToQualMap(
"rev-primer-seq", (*pr)->GetSeq(), *disc_obj, m_Objs);
293 boolunique = objs.size() == 1;
295subtype =
"[n] source[s] [has] unique value[s] for "+ qual;
298subtype =
"[n] source[s] [has] "+ qual +
" = "+
val;
308report[subtype][
"1 source has "+ qual +
" = "+
val].
Add(obj);
311report[subtype].
Add(obj);
318 for(
auto& objs : all_objs) {
320 boolunique =
GetSubtypeStr(qual, objs.first, objs.second->GetObjects(), subtype);
321 for(
auto& obj : objs.second->GetObjects()) {
322 AddObjectToReport(subtype, qual, objs.first, unique, obj.GetNCObject(), report[diagnosis]);
330 for(
auto& objs : all_objs) {
332 boolunique =
GetSubtypeStr(qual, objs.first, objs.second, subtype);
333 for(
auto& obj : objs.second) {
334 AddObjectToReport(subtype, qual, objs.first, unique, obj.GetNCObject(), report[diagnosis]);
343 for(
auto& child : root.
GetMap()) {
352 static const size_tCEILING_VALUE = 1000000000;
362 floatg_SesameStreetCutoff = 0.75;
363 returng_SesameStreetCutoff;
375 size_ttotal =
all.size();
377 for(
autoit:
all) {
378all_missing[it] = it;
381 for(
autoit: the_map) {
382 if(it.first ==
"all") {
385 stringqual = it.first;
389 size_tpres = m_Objs[
"all"][qual].GetObjects().size();
390 size_tmul = m_Objs[
"all"][qual][
"*"].GetObjects().size();
394 for(
autojj: sub) {
398 uniq+= obj.size() == 1 ? 1 : 0;
399 stringupper = jj.first;
403capital[upper][jj.first].push_back(o);
406 stringitfirst = it.first;
407 if(itfirst ==
"country"&& use_geo_loc_name) {
408itfirst =
"geo_loc_name";
412diagnosis += pres == total ?
"all present":
"some missing";
414diagnosis +=
uniq== num ?
"all unique": bins == 1 ?
"all same":
"some duplicates";
415diagnosis += mul ?
", some multi":
"";
419 if((num != total || bins != 1)
420&& (itfirst ==
"collection-date"|| itfirst ==
"country"|| itfirst ==
"isolation-source"|| itfirst ==
"strain"|| itfirst ==
"isolate" 421|| itfirst ==
"taxname"|| itfirst ==
"breed"|| itfirst ==
"cultivar"|| itfirst ==
"sex")) {
422final_report[diagnosis].
Fatal();
425 if((bins > capital.
size() || (num < total && capital.
size() == 1))
426&& (it.first ==
"country"|| it.first ==
"collection-date"|| it.first ==
"isolation-source")) {
428 if(bins > capital.
size()) {
429 for(
autocap: capital) {
431 if(objs.
size() < 2) {
435 size_tbest_count = 0;
437fix->m_Qualifier = itfirst;
438fix->m_User = m_private.m_UserData;
439 for(
autox: objs) {
440fix->m_Choice.push_back(x.first);
441 if(best_count < x.second.size()) {
442best_count = x.second.size();
443fix->m_Value = x.first;
446 for(
autox: objs) {
447 for(
autoo: x.second) {
461fix->m_Qualifier = itfirst;
462fix->m_Value = sub.
begin()->first;
463fix->m_User = m_private.m_UserData;
465 for(
autoo: missing) {
470 for(
autoo: missing) {
472report[diagnosis][
"[n] source[s] [has] missing "+ itfirst].
Add(*
r);
479 for(
autoo: missing) {
481report[diagnosis][
"[n] source[s] [has] missing "+ it.first].
Add(*
r);
485 static const size_tMAX_NUM_STR_LEN = 20;
486 for(
autoitem: report[diagnosis].GetMap()) {
490 stringleading_zeros(MAX_NUM_STR_LEN - sort_order_str.size(),
'0');
491 stringsubitem =
"[*"+ leading_zeros + sort_order_str +
"*]"+ item.first;
493final_report[diagnosis];
494 if(item.second->GetCount()) {
495final_report[diagnosis][subitem].
SetCount(item.second->GetCount());
496final_report[diagnosis].
Incr();
500final_report[diagnosis][subitem] = *item.second;
511 if(it->GetSubtype() ==
st) {
528 if(it->GetSubtype() ==
st) {
548 string val= fix->m_Value;
552 if(qual ==
"host") {
556 else if(qual ==
"strain") {
560 else if(qual ==
"country") {
564 else if(qual ==
"isolation-source") {
568 else if(qual ==
"collection-date") {
588 for(
auto& it : list) {
589 if(it->CanAutofix()) {
606 if(qual ==
"host") {
610 else if(qual ==
"strain") {
614 else if(qual ==
"country") {
618 else if(qual ==
"isolation-source") {
622 else if(qual ==
"collection-date") {
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
const COrgName & GetOrgname(void) const
CConstRef< CObject > GetMoreInfo()
@OrgMod.hpp User-defined methods of the data storage class.
virtual vector< CRef< CReportItem > > GetSubitems() const =0
static void Add(TReportObjectList &list, TReportObjectSet &hash, CReportObj &obj, bool unique=true)
TReportObjectList & GetObjects()
CRef< CReportItem > Export(CDiscrepancyCore &test, bool unique=true) const
vector< string > m_Choice
CSourseQualsAutofixData()
static bool NCBI_UseGeoLocNameForCountry(void)
const_iterator begin() const
vector< CRef< CReportObj > > TReportObjectList
#define DISCREPANCY_AUTOFIX(name)
#define DISCREPANCY_CASE1(name, type, group, descr,...)
#define DISCREPANCY_SUMMARIZE(name)
static const struct name_t names[]
constexpr size_t ArraySize(const Element(&)[Size])
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
TObjectType * GetNCPointer(void) const THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
#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 string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
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.
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 & ToUpper(string &str)
Convert string to upper case â string& version.
const TSubtype & GetSubtype(void) const
Get the Subtype member data.
list< CRef< CSubSource > > TSubtype
void SetOrg(TOrg &value)
Assign a value to Org data member.
void SetName(const TName &value)
Assign a value to Name data member.
const TName & GetName(void) const
Get the Name member data.
TSubtype & SetSubtype(void)
Assign a value to Subtype data member.
@ eSubtype_collection_date
DD-MMM-YYYY format.
@ eSubtype_isolation_source
const TMod & GetMod(void) const
Get the Mod member data.
const TSubname & GetSubname(void) const
Get the Subname member data.
const TTaxname & GetTaxname(void) const
Get the Taxname member data.
bool CanGetTaxname(void) const
Check if it is safe to call GetTaxname method.
void SetSubname(const TSubname &value)
Assign a value to Subname data member.
@ eSubtype_gb_acronym
used by taxonomy database
@ eSubtype_gb_synonym
used by taxonomy database
@ eSubtype_other
ASN5: old-name (254) will be added to next spec.
@ eSubtype_nat_host
natural host of this specimen
@ eSubtype_gb_anamorph
used by taxonomy database
TSource & SetSource(void)
Select the variant.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is smart and slim</td> n<td> orig</td> n</tr> n<tr> n<td> last_modified</td> n<td> optional</td> n<td> Integer</td> n<td class=\"description\"> The blob last modification If provided then the exact match will be requested with n the Cassandra storage corresponding field value</td> n<td> Positive integer Not provided means that the most recent match will be selected</td> n<td></td> n</tr> n<tr> n<td> use_cache</td> n<td> optional</td> n<td> String</td> n<td class=\"description\"> The option controls if the Cassandra LMDB cache and or database should be used It n affects the seq id resolution step and the blob properties lookup step The following n options are BIOSEQ_INFO and BLOB_PROP at all
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static void AddObjectToReport(const string &subtype, const string &qual, const string &val, bool unique, CReportObj &obj, CReportNode &report)
static void AddObjToQualMap(const string &qual, const string &val, CReportObj &obj, CReportNode &node)
map< const CReportObj *, CRef< CReportObj > > TReportObjPtrMap
static bool GetSubtypeStr(const string &qual, const string &val, const TReportObjectList &objs, string &subtype)
static void SetSubsource(CRef< CBioSource > bs, CSubSource::ESubtype st, const string &s, size_t &added, size_t &changed)
map< string, TStringObjVectorMap > TStringStringObjVectorMap
static void ConvertDuplicates(CReportNode &node)
map< string, vector< CRef< CReportObj > > > TStringObjVectorMap
static void SetOrgMod(CRef< CBioSource > bs, COrgMod::ESubtype st, const string &s, size_t &added, size_t &changed)
static float g_GetSesameStreetCutoff()
static size_t GetSortOrderId(const string &subitem, CReportNode &node)
static string OrderQual(const string &s)
static size_t GetNumOfObjects(CReportNode &root)
static void AddObjsToReport(const string &diagnosis, CReportNode::TNodeMap &all_objs, const string &qual, CReportNode &report)
static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static CS_CONTEXT * context
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