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 "institution_codes.inc"
+ 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.

Functions

 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)
 

Variables

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()

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 1083 of file OrgMod.cpp.

References NStr::ReplaceInPlace().

Referenced by COrgMod::FuzzyStrainMatch().

◆ s_InitializeInstitutionCollectionCodeMaps()

static void s_InitializeInstitutionCollectionCodeMaps ( void  )
static

◆ 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)
static

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
static

◆ s_CompleteInstitutionCodeMap

COrgMod::TInstitutionCodeMap s_CompleteInstitutionCodeMap
static

◆ s_CompleteInstitutionFullNameMap

COrgMod::TInstitutionCodeMap s_CompleteInstitutionFullNameMap
static

◆ s_CultureCollectionInstitutionCodeMap

COrgMod::TInstitutionCodeMap s_CultureCollectionInstitutionCodeMap
static

◆ s_hostFixupMap

constexpr auto s_hostFixupMap
staticconstexpr
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 980 of file OrgMod.cpp.

Referenced by COrgMod::FixHost().

◆ s_InstitutionCodeSynonymsMap

COrgMod::TInstitutionCodeMap s_InstitutionCodeSynonymsMap
static

◆ s_InstitutionCodeTypeMap

COrgMod::TInstitutionCodeMap s_InstitutionCodeTypeMap
static

◆ s_InstitutionCollectionCodeMapInitialized

bool s_InstitutionCollectionCodeMapInitialized = false
static

Definition at line 223 of file OrgMod.cpp.

Referenced by s_InitializeInstitutionCollectionCodeMaps().

◆ s_SpecimenVoucherInstitutionCodeMap

COrgMod::TInstitutionCodeMap s_SpecimenVoucherInstitutionCodeMap
static

◆ sm_BadStrainValues

const char* sm_BadStrainValues[]
Initial value:
= {
"yes",
"no",
"-",
"bacteria",
"sp.",
"sp",
"strain",
"environmental",
"soil",
"clinical isolate",
"NA",
"whole organism",
"microbial"
}

Definition at line 819 of file OrgMod.cpp.

Referenced by COrgMod::IsStrainValid().

◆ sm_KnownHostWords

const char* sm_KnownHostWords[]

Definition at line 847 of file OrgMod.cpp.

Referenced by COrgMod::FixHostCapitalization().

◆ sNumUnexpectedViralOrgModQualifiers

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

Definition at line 1137 of file OrgMod.cpp.

Referenced by COrgMod::IsUnexpectedViralOrgModQualifier().

◆ sNumValidCultureTypeMaterialPrefixes

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

Definition at line 1199 of file OrgMod.cpp.

Referenced by COrgMod::IsValidTypeMaterial().

◆ sNumValidTypeMaterialPrefixes

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

Definition at line 1178 of file OrgMod.cpp.

Referenced by COrgMod::IsValidTypeMaterial().

◆ sUnexpectedViralOrgModQualifiers

const COrgMod::TSubtype sUnexpectedViralOrgModQualifiers[]
static

◆ sValidCultureTypeMaterialPrefixes

const string sValidCultureTypeMaterialPrefixes[]
static
Initial value:
= {
"epitype",
"hapantotype",
"holotype",
"isoepitype",
"isoepitype",
"isolectotype",
"isoneotype",
"isoparatype",
"isosyntype",
"isotype",
"lectotype",
"neotype",
"paratype",
"reference",
"syntype",
"type material"
}

Definition at line 1180 of file OrgMod.cpp.

Referenced by COrgMod::IsValidTypeMaterial().

◆ sValidTypeMaterialPrefixes

const string sValidTypeMaterialPrefixes[]
static
Initial value:
= {
"type material",
"type strain",
"reference material",
"reference strain",
"neotype strain",
"paralectotype",
"hapantotype",
"allotype",
"culture from reference material",
"culture from type material",
"ex-type",
"culture from hapantotype",
"pathotype strain"
}

Definition at line 1162 of file OrgMod.cpp.

Referenced by COrgMod::IsValidTypeMaterial().

Modified on Wed Jun 19 17:02:26 2024 by modify_doxy.py rev. 669887