pItem->SetErrIndex(ec);
157lock_guard<mutex> lock(
m_Mutex);
169 const autosev = item.GetSev();
182unique_lock<mutex> lock(
m_Mutex);
183 m_Cv.wait(lock, [
this]() ->
bool{
215 static const char* big_separator =
"=================================================================";
219 if(
label.empty()) {
242 if(
flags.find(
'w') != string::npos) {
248 if(
flags.find(
'd') != string::npos) {
250}
else if(
flags.find(
'D') != string::npos) {
254 if(
flags.find(
'x') != string::npos) {
268 cleanup.ExtendedCleanup(*submit, cleanupflags);
273 if(
flags.find(
'f') != string::npos) {
284 if(
flags.find(
's') != string::npos) {
288 if(
flags.find(
'T') != string::npos) {
289validator::CTaxValidationAndCleanup tval(
m_val_context->m_taxon_update);
290tval.DoTaxonomyUpdate(h_entry,
true);
304std::lock_guard<std::mutex>
g{
m_mutex};
307 intunneeded_version;
318options |= validator::CValidator::eVal_genome_submission;
321 if(pSubmit.
Empty()) {
323validator.Validate(top_se, options, msgHandler);
328validator.Validate(*pSubmit, &scope, options, msgHandler);
333std::lock_guard<std::mutex>
g{
m_mutex};
336 const auto& entryInfo = validator.GetEntryInfo();
350std::lock_guard<std::mutex>
g{
m_mutex};
362options |= validator::CValidator::eVal_genome_submission;
366 if(submit.
Empty()) {
368errors = validator.Validate(top_se, options);
373errors = validator.Validate(*submit, &scope, options);
377std::lock_guard<std::mutex>
g{
m_mutex};
380 const auto& entryInfo = validator.GetEntryInfo();
389std::lock_guard<std::mutex>
g{
m_mutex};
397std::lock_guard<std::mutex>
g{
m_mutex};
404 for(
auto& it : errors->GetErrs()) {
419std::lock_guard<std::mutex>
g(
m_mutex);
431<< big_separator <<
"\n";
433 for(
size_tsev = 0; sev <
stats.size(); ++sev) {
434 if(
stats[sev].total > 0) {
439 for(
autoindivEntry :
stats[sev].individual) {
445<< big_separator <<
"\n";
454<< big_separator <<
"\n";
456std::lock_guard<std::mutex>
g(
m_mutex);
458 for(
size_tsev = 0; sev <
m_val_stats.size(); sev++) {
468out << CValidErrItem::ConvertErrGroup(it.first) <<
"."<< CValidErrItem::ConvertErrCode(it.first) <<
":\t"<< NStr::NumericToString(it.second) <<
"\n";
471<< big_separator <<
"\n";
485obj = entry.GetCompleteSeq_entry();
493 autoproduct = discrepancy->RunTests(
names, *obj, nm.
GetName());
516 unsigned shortoutput_flags = NDiscrepancy::CDiscrepancySet::eOutput_Files;
518output_flags |= NDiscrepancy::CDiscrepancySet::eOutput_Fatal;
520product->Summarize();
521product->OutputText(ostr, output_flags);
536ostr.exceptions(ios::failbit | ios::badbit);
564 auto& EC = feat.
SetData().SetProt().SetEc();
565 autoit = EC.begin();
566 while(it != EC.end()) {
569xGetLabel(feat,
label);
575xGetLabel(feat,
label);
577 boolis_split = newvalue.find(
'\t') != string::npos;
579<< *it <<
'\t'<< newvalue <<
"\n";
587xGetLabel(feat,
label);
596feat.
SetData().SetProt().ResetEc();
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eErr_SEQ_DESCR_InconsistentBioSources_ConLocation
@ eErr_GENERIC_MissingPubRequirement
@ eErr_SEQ_DESCR_NoOrgFound
@ eErr_SEQ_DESCR_TransgenicProblem
@ eErr_SEQ_DESCR_NoPubFound
@ eErr_SEQ_INST_MitoMetazoanTooLong
@ eErr_SEQ_DESCR_NoSourceDescriptor
User-defined methods of the data storage class.
static bool AddProteinTitle(CBioseq_Handle bsh)
Creates missing protein title descriptor.
static bool WGSCleanup(CSeq_entry_Handle entry, bool instantiate_missing_proteins=true, Uint4 options=0, bool run_extended_cleanup=true, bool also_fix_location=true)
Performs WGS specific cleanup.
static bool AddLowQualityException(CSeq_entry_Handle entry)
For table2asn -c s Adds an exception of "low-quality sequence region" to coding regions and mRNAs tha...
TChanges ExtendedCleanup(CSeq_entry &se, Uint4 options=0)
Cleanup a Seq-entry.
@ eClean_KeepSingleSeqSet
@ eClean_NoNcbiUserObjects
static bool CleanupCollectionDates(CSeq_entry_Handle seh, bool month_first)
static const string & GetECNumberReplacement(const string &old_ecno)
Return a replaced EC number's replacement.
@ eEC_replaced
Obsolete synonym for some other EC number.
@ eEC_unknown
Unrecognized; possibly malformed.
@ eEC_deleted
Withdrawn, with no (single?) replacement.
static EECNumberStatus GetECNumberStatus(const string &ecno)
Determine an EC number's validity and specificity.
namespace ncbi::objects::
Base class for all serializable objects.
unique_ptr< objects::edit::CRemoteUpdater > m_remote_updater
string m_master_genome_flag
NDiscrepancy::EGroup m_discrepancy_group
string GenerateOutputFilename(eFiles kind, string_view basename=kEmptyStr) const
std::ostream & GetOstream(eFiles suffix)
unique_ptr< objects::CFixSuspectProductName > m_suspect_rules
std::list< CRef< objects::CValidError > > m_val_errors
void x_ReportDiscrepancies(TDiscProdRef &discrepancy, std::ostream &ostr) const
void UpdateECNumbers(objects::CSeq_entry &entry)
std::shared_ptr< objects::validator::SValidatorContext > m_val_context
void Cleanup(CRef< objects::CSeq_submit > submit, objects::CSeq_entry_Handle &entry, const string &flags) const
TDiscProdRef m_discr_product
std::mutex m_discrep_mutex
void ValReportErrorStats(CNcbiOstream &out)
void CollectDiscrepancies(CRef< objects::CSeq_submit > submit, objects::CSeq_entry_Handle &entry)
size_t ValTotalErrors() const
CTable2AsnContext * m_context
void ValCollect(CRef< objects::CSeq_submit > submit, CRef< objects::CSeq_entry > entry, const string &flags)
void ReportDiscrepancies()
void Validate(CRef< objects::CSeq_submit > pSubmit, CRef< objects::CSeq_entry > pEntry, CValidMessageHandler &msgHandler)
TGlobalInfo m_val_globalInfo
CTable2AsnValidator(CTable2AsnContext &ctx)
TDiscProdRef x_PopulateDiscrepancy(CRef< objects::CSeq_submit > submit, objects::CSeq_entry_Handle &entry) const
CUpdateECNumbers(CTable2AsnContext &context)
void operator()(CSeq_feat &feat)
CTable2AsnContext & m_Context
static const string & ConvertSeverity(EDiagSev sev)
static const string & ConvertErrCode(unsigned int)
const string GetErrCode() const
const string GetErrGroup() const
static const string & ConvertErrGroup(unsigned int)
const TPostponed & GetPostponed() const
void x_AddItemAsync(CRef< objects::CValidErrItem > pItem)
list< CRef< objects::CValidErrItem > > TPostponed
TPostponed m_PostponedItems
void AddValidErrItem(EDiagSev sev, unsigned int ec, const string &msg, const string &desc, const CSerialObject &obj, const string &acc, const int ver, const string &location=kEmptyStr, const int seq_offset=0) override
void x_LogStats(const objects::CValidErrItem &item)
TValStats m_ProcessedStats
queue< CRef< objects::CValidErrItem > > m_Items
container_type::value_type value_type
TTestNamesSet GetDiscrepancyTests(TGroup group)
std::ofstream out("events_result.xml")
main entry point for tests
static void cleanup(void)
static const struct name_t names[]
static const char location[]
EDiagSev
Severity level for the posted diagnostics.
string GetName(void) const
Get the base entry name with extension (if any).
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
@ eFasta
Tagged ID in NCBI's traditional FASTA style.
void GetLabel(string *label) const
Appends a label suitable for display (e.g., error messages) label must point to an existing string ob...
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...
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
CObjectManager & GetObjectManager(void)
Get object manager controlling this scope.
CScope & GetScope(void) const
Get scope this handle belongs to.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty â pointing to an object and has a non-null value.
bool Empty(void) const THROWS_NONE
Check if CRef is empty â not pointing to any object, which means having a null value.
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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.
static const char label[]
bool IsSetEc(void) const
E.C.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
bool IsProt(void) const
Check if variant Prot is selected.
const TLocation & GetLocation(void) const
Get the Location member data.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
const TProt & GetProt(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.
bool IsInt(void) const
Check if variant Int is selected.
const TInt & GetInt(void) const
Get the variant data.
@ eMol_na
just a nucleic acid
const TEntrys & GetEntrys(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TObjDesc & GetObjDesc(void) const
Get the ObjDesc member data.
TSev GetSev(void) const
Get the Sev member data.
const TMsg & GetMsg(void) const
Get the Msg member data.
TErrIndex GetErrIndex(void) const
Get the ErrIndex member data.
void g_PostprocessErrors(const CHugeFileValidator::TGlobalInfo &globalInfo, const string &genbankSetId, CRef< CValidError > &pErrors)
bool ExtendPartialFeatureEnds(CBioseq_Handle bsh)
void VisitAllFeatures(objects::CSeq_entry_EditHandle &entry_h, _M m)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static bool s_PostponeItem(const CValidErrItem &item)
void g_FormatErrItem(const CValidErrItem &item, CNcbiOstream &ostr)
void g_FormatValStats(const TValStats &stats, size_t total, CNcbiOstream &ostr)
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
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