NCBI C++ ToolKit
Functions | Variables
OrgMod.cpp File Reference
#include <ncbi_pch.hpp>
#include <util/static_map.hpp>
#include <util/util_misc.hpp>
#include <util/line_reader.hpp>
#include <util/compile_time.hpp>
#include <serial/enumvalues.hpp>
#include <objects/general/general_macros.hpp>
#include <objects/seqfeat/OrgMod.hpp>
#include ""
+ Include dependency graph for OrgMod.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.


 DEFINE_STATIC_FAST_MUTEX (s_InstitutionCollectionCodeMutex)
static void s_ProcessInstitutionCollectionCodeLine (const CTempString &line)
static void s_InitializeInstitutionCollectionCodeMaps (void)
bool FindInstCodeAndSpecID (COrgMod::TInstitutionCodeMap &code_map, string &val)
bool s_IsAllDigits (string str)
bool s_FixStrainForPrefix (const string &prefix, string &strain)
string s_FixOneStrain (const string &strain)
void s_HarmonizeString (string &s)


static COrgMod::TInstitutionCodeMap s_BiomaterialInstitutionCodeMap
static COrgMod::TInstitutionCodeMap s_SpecimenVoucherInstitutionCodeMap
static COrgMod::TInstitutionCodeMap s_CultureCollectionInstitutionCodeMap
static COrgMod::TInstitutionCodeMap s_CompleteInstitutionCodeMap
static COrgMod::TInstitutionCodeMap s_CompleteInstitutionFullNameMap
static COrgMod::TInstitutionCodeMap s_InstitutionCodeTypeMap
static COrgMod::TInstitutionCodeMap s_InstitutionCodeSynonymsMap
static bool s_InstitutionCollectionCodeMapInitialized = false
const string kMissingInst = "Voucher is missing institution code"
const string kMissingId = "Voucher is missing specific identifier"
const char * sm_BadStrainValues []
const char * sm_KnownHostWords []
static constexpr auto s_hostFixupMap
static const COrgMod::TSubtype sUnexpectedViralOrgModQualifiers []
static const size_t sNumUnexpectedViralOrgModQualifiers = sizeof(sUnexpectedViralOrgModQualifiers) / sizeof(COrgMod::TSubtype)
static const string sValidTypeMaterialPrefixes []
static const int sNumValidTypeMaterialPrefixes = sizeof(sValidTypeMaterialPrefixes) / sizeof(string)
static const string sValidCultureTypeMaterialPrefixes []
static const int sNumValidCultureTypeMaterialPrefixes = sizeof(sValidCultureTypeMaterialPrefixes) / sizeof(string)

Function Documentation


DEFINE_STATIC_FAST_MUTEX ( s_InstitutionCollectionCodeMutex  )

◆ FindInstCodeAndSpecID()

bool FindInstCodeAndSpecID ( COrgMod::TInstitutionCodeMap code_map,
string val 

◆ s_FixOneStrain()

string s_FixOneStrain ( const string strain)

Definition at line 784 of file OrgMod.cpp.

References kEmptyStr, and s_FixStrainForPrefix().

Referenced by COrgMod::FixStrain().

◆ s_FixStrainForPrefix()

bool s_FixStrainForPrefix ( const string prefix,
string strain 

◆ s_HarmonizeString()

void s_HarmonizeString ( string s)

Definition at line 1074 of file OrgMod.cpp.

References NStr::ReplaceInPlace().

Referenced by COrgMod::FuzzyStrainMatch().

◆ s_InitializeInstitutionCollectionCodeMaps()

static void s_InitializeInstitutionCollectionCodeMaps ( void  )

◆ s_IsAllDigits()

bool s_IsAllDigits ( string  str)

Definition at line 758 of file OrgMod.cpp.

References NPOS, and str().

Referenced by s_FixStrainForPrefix().

◆ s_ProcessInstitutionCollectionCodeLine()

static void s_ProcessInstitutionCollectionCodeLine ( const CTempString line)

Variable Documentation

◆ kMissingId

const string kMissingId = "Voucher is missing specific identifier"

Definition at line 457 of file OrgMod.cpp.

Referenced by COrgMod::IsStructuredVoucherValid().

◆ kMissingInst

const string kMissingInst = "Voucher is missing institution code"

Definition at line 456 of file OrgMod.cpp.

Referenced by COrgMod::IsStructuredVoucherValid().

◆ s_BiomaterialInstitutionCodeMap

COrgMod::TInstitutionCodeMap s_BiomaterialInstitutionCodeMap

◆ s_CompleteInstitutionCodeMap

COrgMod::TInstitutionCodeMap s_CompleteInstitutionCodeMap

◆ s_CompleteInstitutionFullNameMap

COrgMod::TInstitutionCodeMap s_CompleteInstitutionFullNameMap

◆ s_CultureCollectionInstitutionCodeMap

COrgMod::TInstitutionCodeMap s_CultureCollectionInstitutionCodeMap

◆ s_hostFixupMap

constexpr auto s_hostFixupMap
Initial value:
{ "-", "missing" },
{ "no", "missing" },
{ "none", "missing" },
{ "NA", "not available" },
{ "N/A", "not available" },
{ "n/a", "not available" },
{ "free-living", "natural / free-living" },
{ "natural", "natural / free-living" },
{ "not available", "not available" },
{ "not collected", "not collected" },
{ "not applicable", "not applicable" },
{ "NR", "not applicable" },
{ "not known", "unknown" },
{ "other", "missing" },
{ "misc", "missing" },
{ "not determined", "unknown" },
{ "unknown", "unknown" },
{ "not available: to be reported later", "not available" },
{ "obscured", "obscured" },
{ "human", "Homo sapiens" },
{ "homo sapiens", "Homo sapiens" }
static constexpr auto construct(typename _Enabled::type const (&init)[N])

Definition at line 971 of file OrgMod.cpp.

Referenced by COrgMod::FixHost().

◆ s_InstitutionCodeSynonymsMap

COrgMod::TInstitutionCodeMap s_InstitutionCodeSynonymsMap

◆ s_InstitutionCodeTypeMap

COrgMod::TInstitutionCodeMap s_InstitutionCodeTypeMap

◆ s_InstitutionCollectionCodeMapInitialized

bool s_InstitutionCollectionCodeMapInitialized = false

Definition at line 223 of file OrgMod.cpp.

Referenced by s_InitializeInstitutionCollectionCodeMaps().

◆ s_SpecimenVoucherInstitutionCodeMap

COrgMod::TInstitutionCodeMap s_SpecimenVoucherInstitutionCodeMap

◆ sm_BadStrainValues

const char* sm_BadStrainValues[]
Initial value:
= {

Definition at line 819 of file OrgMod.cpp.

Referenced by COrgMod::IsStrainValid().

◆ sm_KnownHostWords

const char* sm_KnownHostWords[]

Definition at line 838 of file OrgMod.cpp.

Referenced by COrgMod::FixHostCapitalization().

◆ sNumUnexpectedViralOrgModQualifiers

const size_t sNumUnexpectedViralOrgModQualifiers = sizeof(sUnexpectedViralOrgModQualifiers) / sizeof(COrgMod::TSubtype)

Definition at line 1128 of file OrgMod.cpp.

Referenced by COrgMod::IsUnexpectedViralOrgModQualifier().

◆ sNumValidCultureTypeMaterialPrefixes

const int sNumValidCultureTypeMaterialPrefixes = sizeof(sValidCultureTypeMaterialPrefixes) / sizeof(string)

Definition at line 1190 of file OrgMod.cpp.

Referenced by COrgMod::IsValidTypeMaterial().

◆ sNumValidTypeMaterialPrefixes

const int sNumValidTypeMaterialPrefixes = sizeof(sValidTypeMaterialPrefixes) / sizeof(string)

Definition at line 1169 of file OrgMod.cpp.

Referenced by COrgMod::IsValidTypeMaterial().

◆ sUnexpectedViralOrgModQualifiers

const COrgMod::TSubtype sUnexpectedViralOrgModQualifiers[]

◆ sValidCultureTypeMaterialPrefixes

const string sValidCultureTypeMaterialPrefixes[]
Initial value:
= {
"type material"

Definition at line 1171 of file OrgMod.cpp.

Referenced by COrgMod::IsValidTypeMaterial().

◆ sValidTypeMaterialPrefixes

const string sValidTypeMaterialPrefixes[]
Initial value:
= {
"type material",
"type strain",
"reference material",
"reference strain",
"neotype strain",
"culture from reference material",
"culture from type material",
"culture from hapantotype",
"pathotype strain"

Definition at line 1153 of file OrgMod.cpp.

Referenced by COrgMod::IsValidTypeMaterial().

Modified on Wed Dec 06 07:13:43 2023 by rev. 669887