Search Toolkit Book for CSubSource
#include <objects/seqfeat/SubSource.hpp>
Definition at line 65 of file SubSource.hpp.
◆ Tparent ◆ EDateFormatFlag Enumerator eDateFormatFlag_ok eDateFormatFlag_bad_format eDateFormatFlag_in_future eDateFormatFlag_out_of_orderDefinition at line 111 of file SubSource.hpp.
◆ ELatLonCountryErr Enumerator eLatLonCountryErr_None eLatLonCountryErr_Country eLatLonCountryErr_State eLatLonCountryErr_Water eLatLonCountryErr_ValueDefinition at line 191 of file SubSource.hpp.
◆ EVocabulary Enumerator eVocabulary_raw eVocabulary_insdcDefinition at line 82 of file SubSource.hpp.
◆ CSubSource() [1/4] CSubSource::CSubSource ( void ) inlineDefinition at line 269 of file SubSource.hpp.
◆ CSubSource() [2/4] ◆ CSubSource() [3/4] ◆ ~CSubSource() CSubSource::~CSubSource ( void )Definition at line 60 of file SubSource.cpp.
◆ CSubSource() [4/4] ◆ AutoFix() [1/2] void CSubSource::AutoFix ( ) ◆ AutoFix() [2/2]Definition at line 5132 of file SubSource.cpp.
References CSubSource_Base::eSubtype_altitude, CSubSource_Base::eSubtype_collection_date, CSubSource_Base::eSubtype_country, CSubSource_Base::eSubtype_lat_lon, CSubSource_Base::eSubtype_sex, FixAltitude(), FixDateFormat(), FixLatLonFormat(), FixSexQualifierValue(), CCountries::NewFixCountry(), and rapidjson::value.
Referenced by BOOST_AUTO_TEST_CASE(), and CNewCleanup_imp::x_SubSourceBC().
◆ CheckCellLine() ◆ CheckDateFormat() size_t CSubSource::CheckDateFormat ( const string & date_string ) staticDefinition at line 504 of file SubSource.cpp.
References CDate::Compare(), DateFromCollectionDate(), CDate::eCompare_before, eDateFormatFlag_bad_format, eDateFormatFlag_in_future, eDateFormatFlag_ok, eDateFormatFlag_out_of_order, NStr::Find(), IsCollectionDateAfterTime(), IsISOFormatDate(), NPOS, NStr::Split(), and t.
◆ DateFromCollectionDate()Definition at line 285 of file SubSource.cpp.
References eUnknown, NStr::Find(), NStr::IsBlank(), CTime::MonthNameToNum(), NCBI_THROW, NPOS, CDate_std_Base::SetDay(), CDate_std_Base::SetMonth(), CDate_Base::SetStd(), CDate_std_Base::SetYear(), str(), NStr::StringToInt(), t, test, and NStr::TruncateSpaces().
Referenced by BOOST_AUTO_TEST_CASE(), CheckDateFormat(), CApplyPubQualTreeItemData::GetVariables(), IsCollectionDateAfterTime(), IsCorrectDateFormat(), CCleanup::s_CleanupGenomeAssembly(), CBioSource::ShouldIgnoreConflict(), and CMacroFunction_SetPubDate::x_AddDate().
◆ DetectDateFormat() void CSubSource::DetectDateFormat ( const string & orig_date, bool & ambiguous, bool & day_first ) static ◆ FixAltitude()Definition at line 2735 of file SubSource.cpp.
References NStr::Equal(), NStr::IsBlank(), kEmptyStr, number, precision, s_CollectNumberAndUnits(), NStr::StringToDouble(), val, rapidjson::value, x_FormatWithPrecision(), and x_GetPrecision().
Referenced by AutoFix(), BOOST_AUTO_TEST_CASE(), and CMacroFunction_FixFormat::s_ConvertAltitudeToMeters().
◆ FixCapitalization() [1/2] void CSubSource::FixCapitalization ( ) ◆ FixCapitalization() [2/2]Definition at line 5071 of file SubSource.cpp.
References CSubSource_Base::eSubtype_cell_type, CSubSource_Base::eSubtype_dev_stage, CSubSource_Base::eSubtype_isolation_source, CSubSource_Base::eSubtype_lab_host, CSubSource_Base::eSubtype_sex, CSubSource_Base::eSubtype_tissue_type, FixCellTypeCapitalization(), FixDevStageCapitalization(), FixIsolationSourceCapitalization(), FixLabHostCapitalization(), FixSexQualifierValue(), FixTissueTypeCapitalization(), NStr::IsBlank(), and rapidjson::value.
Referenced by BOOST_AUTO_TEST_CASE().
◆ FixCellTypeCapitalization() ◆ FixDateFormat() [1/2]Attempt to fix the format of the date Returns a blank if the format of the date cannot be determined.
Definition at line 630 of file SubSource.cpp.
References ArraySize(), i, NStr::IsBlank(), and x_ParseDateRangeWithDelimiter().
Referenced by AutoFix(), BOOST_AUTO_TEST_CASE(), CCleanup::CleanupCollectionDates(), CCleanup::s_CleanupGenomeAssembly(), CMacroFunction_FixFormat::TheFunction(), CMacroFunction_SetPubDate::x_AddDate(), CParseCollectionDateFormats::x_ApplyToBioSource(), and x_ParseDateRangeWithDelimiter().
◆ FixDateFormat() [2/2]Definition at line 1012 of file SubSource.cpp.
References CTime::eAbbr, NStr::EndsWith(), NStr::EqualNocase(), isalpha(), NStr::IsBlank(), IsCorrectDateFormat(), IsDayValueOkForMonth(), isdigit(), IsISOFormatDate(), kEmptyStr, max(), min(), CTime::MonthNameToNum(), CTime::MonthNumToName(), NStr::NumericToString(), RepairSingleDigitMonth(), s_ChooseMonthAndDay(), NStr::StartsWith(), NStr::StringToInt(), test, NStr::TruncateSpacesInPlace(), val, x_GetDateTokens(), x_IsFixableIsoDate(), and x_RemoveIsoTime().
◆ FixDevStageCapitalization() ◆ FixIsolationSourceCapitalization()Definition at line 5011 of file SubSource.cpp.
References NStr::EqualNocase(), FixCellTypeCapitalization(), FixDevStageCapitalization(), COrgMod::FixHostCapitalization(), i, max(), s_InitializeQualMaps(), s_IsolationSourceMap, sm_ValidSexQualifierTokens, and rapidjson::value.
Referenced by BOOST_AUTO_TEST_CASE(), and FixCapitalization().
◆ FixLabHostCapitalization() ◆ FixLatLonFormat()Definition at line 1921 of file SubSource.cpp.
References CUtf8::AsUTF8(), CUtf8::GuessEncoding(), MakeLatLon(), NStr::ParseEscapes(), precision, NStr::ReplaceInPlace(), s_GetLatLong(), s_InsertSpacesBetweenTokens(), s_RemoveSpacesWithinNumbers(), s_ShortenLatLon(), NStr::Sanitize(), NStr::StartsWith(), NStr::TrimPrefixInPlace(), and NStr::TrimSuffixInPlace().
Referenced by AutoFix(), BOOST_AUTO_TEST_CASE(), CLatLonTool::GetValuesTableFromSeqEntry(), and CMacroFunction_FixFormat::s_FixLatLonFormat().
◆ FixLatLonPrecision() ◆ FixSexQualifierValue()Definition at line 2572 of file SubSource.cpp.
References ArraySize(), NStr::Equal(), NStr::EqualNocase(), i, ITERATE, kEmptyStr, max(), s_IsValidSexQualifierPhrase(), sm_ValidSexQualifierTokens, NStr::Split(), str(), NStr::ToLower(), and rapidjson::value.
Referenced by AutoFix(), BOOST_AUTO_TEST_CASE(), and FixCapitalization().
◆ FixTissueTypeCapitalization()Definition at line 5038 of file SubSource.cpp.
References NStr::EqualNocase(), FixCellTypeCapitalization(), FixDevStageCapitalization(), COrgMod::FixHostCapitalization(), i, max(), s_InitializeQualMaps(), s_IsolationSourceMap, sm_ValidSexQualifierTokens, and rapidjson::value.
Referenced by BOOST_AUTO_TEST_CASE(), and FixCapitalization().
◆ GetCollectionDateProblem() [1/2] ◆ GetCollectionDateProblem() [2/2] ◆ GetDateFromISODate() ◆ GetLabel() void CSubSource::GetLabel ( string * str ) const ◆ GetSubtypeName()Definition at line 183 of file SubSource.cpp.
References ENUM_METHOD_NAME, CSubSource_Base::eSubtype_insertion_seq_name, CSubSource_Base::eSubtype_other, CSubSource_Base::eSubtype_plasmid_name, CSubSource_Base::eSubtype_subclone, CSubSource_Base::eSubtype_transposon_name, eVocabulary_insdc, and NStr::Replace().
Referenced by AddBioSourceToAttributes(), CFieldChoicePanel::AutoMatchSrc(), GetLabel(), GetSeqTableFromSeqEntry(), CWriteUtil::GetSubSourceSubType(), GetSubtypeName(), CGuiObjectInfoComponent::GetToolTip(), UpdateBiosourceFromBiosample(), CValidError_imp::ValidateBioSource(), CValidError_imp::ValidateSubSource(), CSourceFieldNamePanel::x_ChooseTextQualifier(), CSrcModListPanel::x_FillDataList(), CMacroEditorContext::x_GetBsrcTextFieldnames(), CBioSource::x_GetSubtypeNameValPairs(), and CAutoDefOptions::x_MakeModifierList().
◆ GetSubtypeValue()Definition at line 126 of file SubSource.cpp.
References ENUM_METHOD_NAME, NStr::EqualNocase(), CSubSource_Base::eSubtype_insertion_seq_name, CSubSource_Base::eSubtype_other, CSubSource_Base::eSubtype_plasmid_name, CSubSource_Base::eSubtype_subclone, CSubSource_Base::eSubtype_transposon_name, eVocabulary_insdc, str(), NStr::ToLower(), and NStr::TruncateSpaces().
Referenced by CFieldChoicePanel::AutoMatchSrc(), CSrcTableColumnBaseFactory::Create(), CreateActionBiosource(), CSubSource(), CSubSrcQual::CSubSrcQual(), CAutoColValidatorsubsource::DoValidate(), CSourceFieldNamePanel::GetChoices(), SrcEditDialog::GetLabelForTitle(), CColumnValidator::IsDiscouraged(), CCompareWithBiosample::OnClickOk(), s_SetBioSourceField(), s_StringHasSubSourcePrefix(), CSourceFieldNamePanel::SetFieldName(), CBioSource::ShouldIgnoreConflict(), CBioSource::UpdateWithBioSample(), CMacroFunction_AddorSetContElement::x_AddBioSrcModifier(), CMacroFunction_Autodef::x_IsRequested(), CMacroFunction_AutodefComplete::x_IsRequested(), CSrcModListPanel::x_SetBioSourceModifier(), CAutoDefOptions::x_SetModifierList(), and CSrcWriter::xGatherSubtypeFeat().
◆ HasCultureNotes() ◆ IsAltitudeValid() ◆ IsChromosomeNameValid() ◆ IsCollectionDateAfterTime() [1/3] ◆ IsCollectionDateAfterTime() [2/3] bool CSubSource::IsCollectionDateAfterTime ( const CDate & collection_date, time_t t ) static ◆ IsCollectionDateAfterTime() [3/3] bool CSubSource::IsCollectionDateAfterTime ( const string & collection_date, time_t t, bool & bad_format ) static ◆ IsCorrectDateFormat() void CSubSource::IsCorrectDateFormat ( const string & date_string, bool & bad_format, bool & in_future ) static ◆ IsCorrectLatLonFormat() void CSubSource::IsCorrectLatLonFormat ( string lat_lon, bool & format_correct, bool & precision_correct, bool & lat_in_range, bool & lon_in_range, double & lat_value, double & lon_value ) staticDefinition at line 1296 of file SubSource.cpp.
References NStr::IsBlank(), len, NStr::Split(), NStr::StartsWith(), and x_GetPrecision().
Referenced by BOOST_AUTO_TEST_CASE(), FixLatLonPrecision(), CMacroFunction_FixFormat::s_FixLatLonFormat(), CBioSource::ShouldIgnoreConflict(), CValidError_imp::ValidateBioSource(), ValidateLatLonCountry(), and CValidError_imp::ValidateSubSource().
◆ IsDayValueOkForMonth() bool CSubSource::IsDayValueOkForMonth ( int day, int month, int year ) static ◆ IsDeprecated() [1/2] bool CSubSource::IsDeprecated ( ) const ◆ IsDeprecated() [2/2] ◆ IsDiscouraged()Definition at line 245 of file SubSource.cpp.
References CSubSource_Base::eSubtype_frequency, CSubSource_Base::eSubtype_fwd_primer_name, CSubSource_Base::eSubtype_fwd_primer_seq, CSubSource_Base::eSubtype_insertion_seq_name, CSubSource_Base::eSubtype_phenotype, CSubSource_Base::eSubtype_plastid_name, CSubSource_Base::eSubtype_rev_primer_name, CSubSource_Base::eSubtype_rev_primer_seq, CSubSource_Base::eSubtype_transposon_name, and CSubSource_Base::eSubtype_whole_replicon.
Referenced by CSrcModPanel::DoNotListSubSrc(), CColumnValidator::IsDiscouraged(), s_MustCopy(), s_StringHasSubSourcePrefix(), CSourceFieldNamePanel::x_ChooseTextQualifier(), CMacroEditorContext::x_GetBsrcTextFieldnames(), and CSrcWriter::xIsSubsourceTypeSuppressed().
◆ IsEndogenousVirusNameValid() ◆ IsISOFormatDate() ◆ IsISOFormatDateOnly() ◆ IsISOFormatTime() ◆ IsLinkageGroupNameValid() ◆ IsMultipleValuesAllowed() bool CSubSource::IsMultipleValuesAllowed ( TSubtype subtype ) staticDefinition at line 206 of file SubSource.cpp.
References CSubSource_Base::eSubtype_altitude, CSubSource_Base::eSubtype_chromosome, CSubSource_Base::eSubtype_clone, CSubSource_Base::eSubtype_collected_by, CSubSource_Base::eSubtype_collection_date, CSubSource_Base::eSubtype_country, CSubSource_Base::eSubtype_environmental_sample, CSubSource_Base::eSubtype_fwd_primer_name, CSubSource_Base::eSubtype_fwd_primer_seq, CSubSource_Base::eSubtype_germline, CSubSource_Base::eSubtype_identified_by, CSubSource_Base::eSubtype_lat_lon, CSubSource_Base::eSubtype_metagenomic, CSubSource_Base::eSubtype_plasmid_name, CSubSource_Base::eSubtype_rearranged, CSubSource_Base::eSubtype_rev_primer_name, CSubSource_Base::eSubtype_rev_primer_seq, CSubSource_Base::eSubtype_segment, CSubSource_Base::eSubtype_sex, and CSubSource_Base::eSubtype_transgenic.
Referenced by CValidError_imp::ValidateBioSource(), and CSourceModParser::x_ApplyMods().
◆ IsPlasmidNameValid() ◆ IsSegmentValid() ◆ IsValidSexQualifierValue()Definition at line 2533 of file SubSource.cpp.
References NStr::Equal(), ITERATE, max(), s_IsValidSexQualifierPhrase(), sm_ValidSexQualifierTokens, NStr::Split(), str(), NStr::ToLower(), and rapidjson::value.
Referenced by BOOST_AUTO_TEST_CASE(), CBioSource::FixSexMatingTypeInconsistencies(), and CValidError_imp::ValidateBioSource().
◆ IsValidSubtypeName()Definition at line 155 of file SubSource.cpp.
References ENUM_METHOD_NAME, NStr::EqualNocase(), eVocabulary_insdc, str(), NStr::ToLower(), and NStr::TruncateSpaces().
Referenced by CFieldChoicePanel::AutoMatchSrc(), CSrcTableColumnBaseFactory::Create(), CreateActionBiosource(), CSourceFieldNamePanel::GetChoices(), NMItemData::GetEditableFieldForPair(), SrcEditDialog::GetLabelForTitle(), CSourceFieldNamePanel::GetMacroFieldName(), NMacroUtil::IsBiosourceModifier(), s_SetBioSourceField(), CSourceFieldNamePanel::SetFieldName(), CMacroFunction_AddorSetContElement::x_AddBioSrcModifier(), CMacroEditorContext::x_GetAsnPathToBsrcText(), CMacroEditorContext::x_GetGUIFieldForBsrcText(), CMacroFunction_Autodef::x_IsRequested(), CMacroFunction_AutodefComplete::x_IsRequested(), and CSrcModListPanel::x_SetBioSourceModifier().
◆ MakeLatLon() string CSubSource::MakeLatLon ( double lat_value, double lon_value, int lat_precision =2
, int lon_precision = 2
) static ◆ NCBI_UseGeoLocNameForCountry() bool CSubSource::NCBI_UseGeoLocNameForCountry ( void ) static
Definition at line 92 of file SubSource.cpp.
References s_init_UseGeoLocNameForCountry(), and rapidjson::value.
Referenced by BOOST_AUTO_TEST_CASE(), CValidator::ConvertCode(), CValidErrorFormat::GetSubmitterFormatErrorGroupTitle(), CDiscrepancyVisitorImpl< _Name >::Summarize(), TestOneLatLonCountry(), CValidError_imp::ValidateBioSource(), CValidError_imp::ValidateOrgModVoucher(), CValidError_imp::ValidateSubSource(), CSourceFeatureItem::x_FormatQuals(), CDeflineGenerator::x_GetModifiers(), and CSrcWriter::xFormatTabDelimited().
◆ NeedsNoText()Definition at line 231 of file SubSource.cpp.
References CSubSource_Base::eSubtype_environmental_sample, CSubSource_Base::eSubtype_germline, CSubSource_Base::eSubtype_metagenomic, CSubSource_Base::eSubtype_rearranged, and CSubSource_Base::eSubtype_transgenic.
Referenced by AddBioSourceToAttributes(), CBioSource::AutoFix(), CNewCleanup_imp::BiosourceBC(), CSourceFieldNamePanel::GetChoices(), GetSeqTableFromSeqEntry(), CSrcTableSubSourceColumn::GetValsFromBioSource(), s_StringHasSubSourcePrefix(), s_SubsourceEqual(), s_SubsourceEquivalent(), CBioSource::UpdateWithBioSample(), CValidError_imp::ValidateSubSource(), CSourceModParser::x_ApplyMods(), CBioSource::x_GetSubtypeNameValPairs(), CNewCleanup_imp::x_PostBiosource(), CDescrModApply::x_SetSubtype(), and CSrcWriter::xGatherSubtypeFeat().
◆ operator=() ◆ RemoveCultureNotes() [1/2] void CSubSource::RemoveCultureNotes ( bool is_species_level =true
) ◆ RemoveCultureNotes() [2/2] void CSubSource::RemoveCultureNotes ( string & value, bool is_species_level = true
) static
Definition at line 5287 of file SubSource.cpp.
References NStr::EndsWith(), NStr::EqualNocase(), NStr::FindNoCase(), i, NStr::IsBlank(), NPOS, NULL, s_RemovableCultureNotes, s_ReplaceableCultureNotes, NStr::StartsWith(), and rapidjson::value.
Referenced by BOOST_AUTO_TEST_CASE(), CBioSource::RemoveCultureNotes(), and RemoveCultureNotes().
◆ ValidateLatLonCountry()Definition at line 2160 of file SubSource.cpp.
References check_state(), CLatLonCountryId::Classify(), eLatLonCountryErr_Country, eLatLonCountryErr_None, eLatLonCountryErr_State, eLatLonCountryErr_Value, eLatLonCountryErr_Water, NStr::eNocase, NStr::Equal(), NStr::EqualNocase(), NStr::eReverseSearch, NStr::eTrunc_Both, CLatLonCountryId::fCountryClosest, CLatLonCountryId::fCountryMatch, CLatLonMap_Base::fFlip, NStr::Find(), flags, CLatLonMap_Base::fNegateLat, CLatLonMap_Base::fNegateLon, CLatLonMap_Base::fNone, CLatLonCountryId::fProvinceClosest, CLatLonCountryId::fProvinceMatch, CLatLonCountryId::fWaterMatch, CLatLonCountryId::GetClaimedDistance(), CLatLonCountryId::GetClaimedFull(), CLatLonCountryId::GetClosestCountry(), CLatLonCountryId::GetClosestWater(), CLatLonCountryId::GetGuessCountry(), CLatLonCountryId::GetGuessProvince(), CLatLonCountryId::GetGuessWater(), CLatLonCountryId::GetLandDistance(), NStr::IntToString(), NStr::IsBlank(), IsCorrectLatLonFormat(), kEmptyStr, MakeLatLon(), NPOS, NULL, NStr::StartsWith(), NStr::TruncateSpacesInPlace(), x_CalculateLatLonId(), x_FindSurroundingOcean(), x_GetLatLonCountryMap(), and x_GetLatLonWaterMap().
Referenced by BOOST_AUTO_TEST_CASE(), CCountryConflict::GetValuesTableFromSeqEntry(), and CValidError_imp::ValidateLatLonCountry().
◆ x_CalculateLatLonId()Definition at line 1971 of file SubSource.cpp.
References NStr::EqualNocase(), ErrorDistance(), CLatLonMap_Base::FindClosestToLatLon(), CLatLonCountryId::GetClosestCountry(), CLatLonCountryId::GetClosestWater(), CCountryExtreme::GetCountry(), CLatLonCountryId::GetGuessCountry(), CLatLonCountryId::GetGuessProvince(), CLatLonCountryId::GetGuessWater(), CCountryExtreme::GetLevel0(), CCountryExtreme::GetLevel1(), CLatLonMap_Base::GuessRegionForLatLon(), NStr::IsBlank(), CLatLonMap_Base::IsNearLatLon(), x_GetLatLonCountryMap(), and x_GetLatLonWaterMap().
Referenced by ValidateLatLonCountry().
◆ x_FormatWithPrecision() string CSubSource::x_FormatWithPrecision ( double val, int precision ) staticprivate ◆ x_GenericRepliconNameValid() ◆ x_GetDateTokens() ◆ x_GetLatLonCountryMap() ◆ x_GetLatLonWaterMap() ◆ x_GetPrecision() ◆ x_IsFixableIsoDate() ◆ x_MeetsCommonChromosomeLinkageGroupPlasmidNameRules() ◆ x_ParseDateRangeWithDelimiter() ◆ x_RemoveIsoTime()The documentation for this class was generated from the following files:
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