NCBI C++ ToolKit
|
Search Toolkit Book for CBioSource
#include <objects/seqfeat/BioSource.hpp>
Public Member Functions | |
CBioSource (void) | |
~CBioSource (void) | |
int | GetGenCode (int def=1) const |
bool | IsSetTaxname (void) const |
const string & | GetTaxname (void) const |
bool | IsSetCommon (void) const |
const string & | GetCommon (void) const |
bool | IsSetLineage (void) const |
const string & | GetLineage (void) const |
bool | IsSetGcode (void) const |
int | GetGcode (void) const |
bool | IsSetMgcode (void) const |
int | GetMgcode (void) const |
bool | IsSetPgcode (void) const |
int | GetPgcode (void) const |
bool | IsSetDivision (void) const |
const string & | GetDivision (void) const |
bool | IsSetOrgname (void) const |
const COrgName & | GetOrgname (void) const |
bool | IsSetOrgMod (void) const |
string | GetRepliconName (void) const |
string | GetBioprojectType (void) const |
string | GetBioprojectLocation (void) const |
void | SetDisableStrainForwarding (bool val) |
bool | GetDisableStrainForwarding () const |
void | UpdateWithBioSample (const CBioSource &biosample, bool force, bool is_local_copy=false) |
TFieldDiffList | GetBiosampleDiffs (const CBioSource &biosample, bool is_local_copy=false) const |
bool | BiosampleDiffsOkForUpdate (const TFieldDiffList &diffs) const |
TNameValList | GetNameValPairs () const |
void | AutoFix () |
void | RemoveCultureNotes (bool is_species_level=true) |
bool | RemoveLineageSourceNotes () |
bool | RemoveSubSource (int subtype) |
bool | RemoveSubSource (int subtype, const string &val) |
bool | RemoveOrgMod (int subtype) |
bool | RemoveOrgMod (int subtype, const string &val) |
bool | FixEnvironmentalSample () |
bool | RemoveNullTerms () |
bool | AllowSexQualifier () const |
bool | AllowMatingTypeQualifier () const |
bool | FixSexMatingTypeInconsistencies () |
bool | RemoveUnexpectedViralQualifiers () |
bool | FixGenomeForQualifiers () |
bool | IsViral () const |
bool | HasSubtype (CSubSource::TSubtype subtype) const |
CRef< CBioSource > | MakeCommon (const CBioSource &other) const |
CRef< CBioSource > | MakeCommonExceptOrg (const CBioSource &other) const |
Public Member Functions inherited from CBioSource_Base | |
CBioSource_Base (void) | |
virtual | ~CBioSource_Base (void) |
DECLARE_INTERNAL_TYPE_INFO () | |
bool | IsSetGenome (void) const |
Check if a value has been assigned to Genome data member. More... | |
bool | CanGetGenome (void) const |
Check if it is safe to call GetGenome method. More... | |
void | ResetGenome (void) |
Reset Genome data member. More... | |
void | SetDefaultGenome (void) |
Assign default value to Genome data member. More... | |
TGenome | GetGenome (void) const |
Get the Genome member data. More... | |
void | SetGenome (TGenome value) |
Assign a value to Genome data member. More... | |
TGenome & | SetGenome (void) |
Assign a value to Genome data member. More... | |
bool | IsSetOrigin (void) const |
Check if a value has been assigned to Origin data member. More... | |
bool | CanGetOrigin (void) const |
Check if it is safe to call GetOrigin method. More... | |
void | ResetOrigin (void) |
Reset Origin data member. More... | |
void | SetDefaultOrigin (void) |
Assign default value to Origin data member. More... | |
TOrigin | GetOrigin (void) const |
Get the Origin member data. More... | |
void | SetOrigin (TOrigin value) |
Assign a value to Origin data member. More... | |
TOrigin & | SetOrigin (void) |
Assign a value to Origin data member. More... | |
bool | IsSetOrg (void) const |
Check if a value has been assigned to Org data member. More... | |
bool | CanGetOrg (void) const |
Check if it is safe to call GetOrg method. More... | |
void | ResetOrg (void) |
Reset Org data member. More... | |
const TOrg & | GetOrg (void) const |
Get the Org member data. More... | |
void | SetOrg (TOrg &value) |
Assign a value to Org data member. More... | |
TOrg & | SetOrg (void) |
Assign a value to Org data member. More... | |
bool | IsSetSubtype (void) const |
Check if a value has been assigned to Subtype data member. More... | |
bool | CanGetSubtype (void) const |
Check if it is safe to call GetSubtype method. More... | |
void | ResetSubtype (void) |
Reset Subtype data member. More... | |
const TSubtype & | GetSubtype (void) const |
Get the Subtype member data. More... | |
TSubtype & | SetSubtype (void) |
Assign a value to Subtype data member. More... | |
bool | IsSetIs_focus (void) const |
to distinguish biological focus Check if a value has been assigned to Is_focus data member. More... | |
bool | CanGetIs_focus (void) const |
Check if value of Is_focus member is getatable. More... | |
void | ResetIs_focus (void) |
Reset Is_focus data member. More... | |
void | SetIs_focus (void) |
Set NULL data member (assign 'NULL' value to Is_focus data member). More... | |
bool | IsSetPcr_primers (void) const |
Check if a value has been assigned to Pcr_primers data member. More... | |
bool | CanGetPcr_primers (void) const |
Check if it is safe to call GetPcr_primers method. More... | |
void | ResetPcr_primers (void) |
Reset Pcr_primers data member. More... | |
const TPcr_primers & | GetPcr_primers (void) const |
Get the Pcr_primers member data. More... | |
void | SetPcr_primers (TPcr_primers &value) |
Assign a value to Pcr_primers data member. More... | |
TPcr_primers & | SetPcr_primers (void) |
Assign a value to Pcr_primers data member. More... | |
virtual void | Reset (void) |
Reset the whole object. More... | |
Public Member Functions inherited from CSerialObject | |
CSerialObject (void) | |
virtual | ~CSerialObject (void) |
virtual const CTypeInfo * | GetThisTypeInfo (void) const =0 |
virtual void | Assign (const CSerialObject &source, ESerialRecursionMode how=eRecursive) |
Set object to copy of another one. More... | |
virtual bool | Equals (const CSerialObject &object, ESerialRecursionMode how=eRecursive) const |
Check if both objects contain the same values. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
void | ThrowUnassigned (TMemberIndex index) const |
void | ThrowUnassigned (TMemberIndex index, const char *file_name, int file_line) const |
bool | HasNamespaceName (void) const |
Check if object data type has namespace name. More... | |
const string & | GetNamespaceName (void) const |
Get namespace name. More... | |
bool | HasNamespacePrefix (void) const |
Check if data type has namespace prefix. More... | |
const string & | GetNamespacePrefix (void) const |
Get namespace prefix. More... | |
Public Member Functions inherited from CObject | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
Public Member Functions inherited from CDebugDumpable | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
Private Types | |
typedef CBioSource_Base | Tparent |
Private Member Functions | |
CBioSource (const CBioSource &value) | |
CBioSource & | operator= (const CBioSource &value) |
void | x_ClearCoordinatedBioSampleSubSources () |
void | x_ClearCoordinatedBioSampleOrgMods () |
TNameValList | x_GetOrgModNameValPairs () const |
TNameValList | x_GetSubtypeNameValPairs () const |
void | x_RemoveNameElementDiffs (const CBioSource &biosample, TFieldDiffList &diff_list) const |
bool | x_ShouldIgnoreNoteForBiosample () const |
Static Private Member Functions | |
static void | x_InitStopWords (void) |
static void | x_RemoveStopWords (COrg_ref &org_ref) |
Additional Inherited Members | |
Static Public Attributes inherited from CSerialObject | |
static const char * | ms_UnassignedStr = "<*unassigned*>" |
static const char | ms_UnassignedByte = char(0xcd) |
Static Public Attributes inherited from CObject | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Definition at line 58 of file BioSource.hpp.
typedef pair<string, string> CBioSource::TNameVal |
Definition at line 126 of file BioSource.hpp.
typedef vector<TNameVal> CBioSource::TNameValList |
Definition at line 127 of file BioSource.hpp.
|
private |
Definition at line 60 of file BioSource.hpp.
|
inline |
Definition at line 203 of file BioSource.hpp.
Referenced by MakeCommonExceptOrg().
CBioSource::~CBioSource | ( | void | ) |
Definition at line 68 of file BioSource.cpp.
|
private |
bool CBioSource::AllowMatingTypeQualifier | ( | ) | const |
Definition at line 1900 of file BioSource.cpp.
References GetLineage(), CBioSource_Base::GetOrg(), GetOrgname(), IsSetLineage(), CBioSource_Base::IsSetOrg(), and IsSetOrgname().
Referenced by FixSexMatingTypeInconsistencies().
Definition at line 1878 of file BioSource.cpp.
References NStr::eNocase, IsViral(), and NStr::StartsWith().
Referenced by BOOST_AUTO_TEST_CASE().
bool CBioSource::AllowSexQualifier | ( | ) | const |
Definition at line 1868 of file BioSource.cpp.
References GetLineage(), CBioSource_Base::GetOrg(), GetOrgname(), IsSetLineage(), CBioSource_Base::IsSetOrg(), and IsSetOrgname().
Referenced by FixSexMatingTypeInconsistencies().
Definition at line 1845 of file BioSource.cpp.
References NStr::eNocase, IsViral(), and NStr::StartsWith().
Referenced by BOOST_AUTO_TEST_CASE().
void CBioSource::AutoFix | ( | ) |
Definition at line 1392 of file BioSource.cpp.
References ctll::empty(), CBioSource_Base::GetOrg(), GetOrgname(), CBioSource_Base::GetSubtype(), NStr::IsBlank(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), CBioSource_Base::IsSetSubtype(), CSubSource::NeedsNoText(), CBioSource_Base::ResetSubtype(), CBioSource_Base::SetOrg(), COrg_ref_Base::SetOrgname(), and CBioSource_Base::SetSubtype().
Referenced by CCompareWithBiosample::OnClickOk(), and UpdateWithBioSample().
bool CBioSource::BiosampleDiffsOkForUpdate | ( | const TFieldDiffList & | diffs | ) | const |
Definition at line 693 of file BioSource.cpp.
References NStr::IsBlank(), and ITERATE.
Referenced by UpdateWithBioSample().
bool CBioSource::FixEnvironmentalSample | ( | ) |
Definition at line 1681 of file BioSource.cpp.
References NStr::Equal(), CSubSource_Base::eSubtype_environmental_sample, COrgMod_Base::eSubtype_metagenome_source, CSubSource_Base::eSubtype_metagenomic, NStr::Find(), GetLineage(), CBioSource_Base::GetOrg(), GetOrgname(), CBioSource_Base::GetSubtype(), GetTaxname(), IsSetLineage(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), CBioSource_Base::IsSetSubtype(), IsSetTaxname(), ITERATE, CBioSource_Base::SetSubtype(), and NStr::StartsWith().
Referenced by CNewCleanup_imp::BiosourceBC(), and BOOST_AUTO_TEST_CASE().
bool CBioSource::FixGenomeForQualifiers | ( | ) |
Definition at line 1974 of file BioSource.cpp.
References CBioSource_Base::eGenome_plasmid, CBioSource_Base::eGenome_unknown, CSubSource_Base::eSubtype_plasmid_name, CBioSource_Base::GetGenome(), HasSubtype(), CBioSource_Base::IsSetGenome(), and CBioSource_Base::SetGenome().
Referenced by CNewCleanup_imp::BiosourceBC(), and BOOST_AUTO_TEST_CASE().
bool CBioSource::FixSexMatingTypeInconsistencies | ( | ) |
Definition at line 1910 of file BioSource.cpp.
References AllowMatingTypeQualifier(), AllowSexQualifier(), CSubSource_Base::eSubtype_mating_type, CSubSource_Base::eSubtype_sex, CBioSource_Base::GetSubtype(), CBioSource_Base::IsSetSubtype(), CSubSource::IsValidSexQualifierValue(), remove(), CBioSource_Base::ResetSubtype(), CBioSource_Base::SetSubtype(), and ncbi::grid::netcache::search::fields::size.
Referenced by BOOST_AUTO_TEST_CASE().
string CBioSource::GetBioprojectLocation | ( | void | ) | const |
Definition at line 522 of file BioSource.cpp.
References CBioSource_Base::eGenome_apicoplast, CBioSource_Base::eGenome_chloroplast, CBioSource_Base::eGenome_chromatophore, CBioSource_Base::eGenome_chromoplast, CBioSource_Base::eGenome_chromosome, CBioSource_Base::eGenome_cyanelle, CBioSource_Base::eGenome_endogenous_virus, CBioSource_Base::eGenome_extrachrom, CBioSource_Base::eGenome_genomic, CBioSource_Base::eGenome_hydrogenosome, CBioSource_Base::eGenome_insertion_seq, CBioSource_Base::eGenome_kinetoplast, CBioSource_Base::eGenome_leucoplast, CBioSource_Base::eGenome_macronuclear, CBioSource_Base::eGenome_mitochondrion, CBioSource_Base::eGenome_nucleomorph, CBioSource_Base::eGenome_plasmid, CBioSource_Base::eGenome_plastid, CBioSource_Base::eGenome_proplastid, CBioSource_Base::eGenome_proviral, CBioSource_Base::eGenome_transposon, CBioSource_Base::eGenome_unknown, CBioSource_Base::eGenome_virion, NStr::Equal(), NStr::FindNoCase(), GetBioprojectType(), CBioSource_Base::GetGenome(), COrg_ref::GetLineage(), CBioSource_Base::GetOrg(), CBioSource_Base::IsSetGenome(), IsSetLineage(), and CBioSource_Base::IsSetOrg().
Referenced by BOOST_AUTO_TEST_CASE(), CheckBioProjectLocationVals(), and CheckViruses().
string CBioSource::GetBioprojectType | ( | void | ) | const |
Definition at line 482 of file BioSource.cpp.
References CBioSource_Base::eGenome_chromosome, CBioSource_Base::eGenome_extrachrom, CBioSource_Base::eGenome_plasmid, CBioSource_Base::eGenome_plasmid_in_mitochondrion, CBioSource_Base::eGenome_plasmid_in_plastid, CSubSource_Base::eSubtype_linkage_group, CSubSource_Base::eSubtype_plasmid_name, NStr::FindNoCase(), CBioSource_Base::GetGenome(), COrg_ref::GetLineage(), CBioSource_Base::GetOrg(), CBioSource_Base::GetSubtype(), CBioSource_Base::IsSetGenome(), IsSetLineage(), CBioSource_Base::IsSetOrg(), and ITERATE.
Referenced by BOOST_AUTO_TEST_CASE(), CheckBioProjectLocationVals(), CheckPlasmid(), CheckViruses(), GetBioprojectLocation(), and GetRepliconName().
TFieldDiffList CBioSource::GetBiosampleDiffs | ( | const CBioSource & | biosample, |
bool | is_local_copy = false |
||
) | const |
Definition at line 1327 of file BioSource.cpp.
References GetFieldDiffsFromNameValLists(), GetNameValPairs(), RemoveDiffByName(), s_CompareNameVals(), ct::sort(), and x_ShouldIgnoreNoteForBiosample().
Referenced by BOOST_AUTO_TEST_CASE(), GetFieldDiffs(), and UpdateWithBioSample().
Definition at line 350 of file BioSource.cpp.
References COrg_ref_Base::GetCommon(), and CBioSource_Base::GetOrg().
Referenced by CSrcTableCommonNameColumn::GetFromBioSource(), and CBioseqIndex::x_InitSource().
bool CBioSource::GetDisableStrainForwarding | ( | ) | const |
Definition at line 647 of file BioSource.cpp.
References NStr::Find(), CBioSource_Base::GetOrg(), GetOrgname(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), kDisableStrainForwardAttrib, and val.
Referenced by BOOST_AUTO_TEST_CASE().
Definition at line 400 of file BioSource.cpp.
References COrg_ref::GetDivision(), and CBioSource_Base::GetOrg().
Referenced by CSrcTableDivisionColumn::GetFromBioSource(), and IsBadSeqInstStrand().
int CBioSource::GetGcode | ( | void | ) | const |
Definition at line 370 of file BioSource.cpp.
References COrg_ref::GetGcode(), and CBioSource_Base::GetOrg().
Referenced by CSource_qual_choice::GetLimitedSourceQualFromBioSource().
Definition at line 73 of file BioSource.cpp.
References CBioSource_Base::CanGetGenome(), CBioSource_Base::CanGetOrg(), CBioSource_Base::eGenome_apicoplast, CBioSource_Base::eGenome_chloroplast, CBioSource_Base::eGenome_chromatophore, CBioSource_Base::eGenome_chromoplast, CBioSource_Base::eGenome_cyanelle, CBioSource_Base::eGenome_hydrogenosome, CBioSource_Base::eGenome_kinetoplast, CBioSource_Base::eGenome_leucoplast, CBioSource_Base::eGenome_mitochondrion, CBioSource_Base::eGenome_plasmid_in_mitochondrion, CBioSource_Base::eGenome_plasmid_in_plastid, CBioSource_Base::eGenome_plastid, CBioSource_Base::eGenome_proplastid, CBioSource_Base::eGenome_unknown, COrgName_Base::GetGcode(), CBioSource_Base::GetGenome(), COrgName_Base::GetMgcode(), CBioSource_Base::GetOrg(), COrg_ref_Base::GetOrgname(), COrgName_Base::GetPgcode(), COrgName_Base::IsSetGcode(), COrgName_Base::IsSetMgcode(), and COrgName_Base::IsSetPgcode().
Referenced by CSeqUtils::GetGenCode(), GetGeneticCodeForBioseq(), CCleanup::SetGeneticCodes(), CBlastQuerySourceOM::x_AutoDetectGeneticCodes(), CSparseAln::x_GetGenCode(), CNewCleanup_imp::x_tRNACodonEC(), and CRNAValidator::x_ValidateTrnaCodons().
|
static |
Definition at line 168 of file BioSource.cpp.
References NStr::eCase, CBioSource_Base::eGenome_mitochondrion, CBioSource_Base::eGenome_unknown, NStr::Equal(), isspace(), match(), and NStr::StartsWith().
Referenced by CClearKeywords::ApplyToCSeq_entry(), BioSourceFromImpFeat(), CAutoColValidatorgenome::DoValidate(), CAutoDefOptions::GetNuclearCopyFlag(), CAutoDefOptions::GetProductFlag(), CSrcTableGenomeColumn::IsValid(), CValidError_imp::ValidateBioSource(), and CLocAndGCodePanel::x_SetLocation().
Definition at line 360 of file BioSource.cpp.
References COrg_ref::GetLineage(), and CBioSource_Base::GetOrg().
Referenced by AllowMatingTypeQualifier(), AllowSexQualifier(), FixEnvironmentalSample(), CConvertBadCdsAndRnaToMiscFeat::getBacterialPartialNonextendable(), CConvertBadCdsAndRnaToMiscFeat::getCdsOverlap(), CSrcTableLineageColumn::GetFromBioSource(), CCleanup::GetNormalizableGeneQualPairs(), CConvertBadCdsAndRnaToMiscFeat::getRnaOverlap(), CDiscrepancyContext::HasLineage(), IsBadSeqInstStrand(), IsViral(), CBioSourceKind::operator=(), RemoveLineageSourceNotes(), CAdjustForConsensusSpliceSite::s_IsBioseqGood_Strict(), CValidError_imp::ValidateBioSource(), CValidError_bioseq::ValidateSeqFeatContext(), x_ShouldIgnoreNoteForBiosample(), and CValidError_bioseq::x_ValidateCompletness().
int CBioSource::GetMgcode | ( | void | ) | const |
Definition at line 380 of file BioSource.cpp.
References COrg_ref::GetMgcode(), and CBioSource_Base::GetOrg().
Referenced by CSource_qual_choice::GetLimitedSourceQualFromBioSource().
CBioSource::TNameValList CBioSource::GetNameValPairs | ( | ) | const |
Definition at line 811 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), COrg_ref::GetTaxId(), GetTaxname(), CBioSource_Base::IsSetOrg(), IsSetTaxname(), ITERATE, kOrganismName, kTaxId, NStr::NumericToString(), val, x_GetOrgModNameValPairs(), x_GetSubtypeNameValPairs(), and ZERO_TAX_ID.
Referenced by AddBioseqToTable(), and GetBiosampleDiffs().
Definition at line 216 of file BioSource.cpp.
References kEmptyStr.
Referenced by CCleanup::AddPartialToProteinTitle(), CClearKeywords::CreateControls(), CAutoDefOptions::GetNuclearCopyFlag(), CAutoDefOptions::GetProductFlag(), GetSeqTableFromSeqEntry(), CGenomeQual::GetValue(), s_TitleEndsInOrganism(), CValidError_imp::ValidateBioSource(), CLocAndGCodePanel::x_GetLocation(), and CSrcWriter::xGatherGenome().
Definition at line 410 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), and COrg_ref_Base::GetOrgname().
Referenced by AllowMatingTypeQualifier(), AllowSexQualifier(), AutoFix(), BOOST_AUTO_TEST_CASE(), CheckMetagenome(), CompareOrgModValue(), FixEnvironmentalSample(), GetDisableStrainForwarding(), GetSeqTableFromSeqEntry(), RemoveLineageSourceNotes(), RemoveNullTerms(), RemoveOrgMod(), RemoveUnexpectedViralQualifiers(), s_GetOrgModNatHost(), SetDisableStrainForwarding(), SetOrgMod(), UpdateWithBioSample(), CValidError_bioseqset::ValidateNucProtSet(), CDeflineGenerator::x_AdjustProteinTitleSuffix(), x_GetOrgModNameValPairs(), CBioseqIndex::x_InitDescs(), CBioseqIndex::x_InitSource(), CDeflineGenerator::x_SetBioSrc(), CDeflineGenerator::x_SetFlags(), CBioseqContext::x_SetTaxname(), x_ShouldIgnoreNoteForBiosample(), and CSrcWriter::xGatherOrgModFeat().
|
static |
Definition at line 254 of file BioSource.cpp.
References NStr::eCase, CBioSource_Base::eOrigin_unknown, NStr::Equal(), isspace(), match(), origin, and NStr::StartsWith().
Referenced by CSrcTableOriginColumn::AddToBioSource(), CAutoColValidatororigin::DoValidate(), and CSrcTableOriginColumn::IsValid().
int CBioSource::GetPgcode | ( | void | ) | const |
Definition at line 390 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), and COrg_ref::GetPgcode().
string CBioSource::GetRepliconName | ( | void | ) | const |
Definition at line 421 of file BioSource.cpp.
References CBioSource_Base::eGenome_apicoplast, CBioSource_Base::eGenome_chloroplast, CBioSource_Base::eGenome_chromatophore, CBioSource_Base::eGenome_chromoplast, CBioSource_Base::eGenome_chromosome, CBioSource_Base::eGenome_hydrogenosome, CBioSource_Base::eGenome_kinetoplast, CBioSource_Base::eGenome_leucoplast, CBioSource_Base::eGenome_mitochondrion, CBioSource_Base::eGenome_plasmid, CBioSource_Base::eGenome_plasmid_in_mitochondrion, CBioSource_Base::eGenome_plasmid_in_plastid, CBioSource_Base::eGenome_plastid, CBioSource_Base::eGenome_proplastid, CSubSource_Base::eSubtype_chromosome, CSubSource_Base::eSubtype_endogenous_virus_name, CSubSource_Base::eSubtype_linkage_group, CSubSource_Base::eSubtype_plasmid_name, CSubSource_Base::eSubtype_plastid_name, CSubSource_Base::eSubtype_segment, GetBioprojectType(), CBioSource_Base::GetGenome(), CBioSource_Base::GetSubtype(), CBioSource_Base::IsSetGenome(), ITERATE, and kEmptyStr.
Referenced by BOOST_AUTO_TEST_CASE(), and CGff3Writer::xAssignSourceAttributeName().
Definition at line 320 of file BioSource.cpp.
References origin.
Referenced by CSrcTableOriginColumn::AddToBioSource(), CSrcTableOriginColumn::GetFromBioSource(), and CSrcWriter::xGatherOrigin().
Definition at line 340 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), and COrg_ref_Base::GetTaxname().
Referenced by CExportTableDlg::AddBioSource(), CAddFluComments::AddBioSource(), CUnculTaxTool::AddBioSource(), CSrcTaxnameAfterBinomialColumn::AddToBioSource(), BOOST_AUTO_TEST_CASE(), CSrcTaxnameAfterBinomialColumn::ClearInBioSource(), CUnculturedTool::CorrectBioSource(), FindOrgNames(), FixEnvironmentalSample(), GetNameValPairs(), GetSeqTableFromSeqEntry(), CUnculTaxTool::LookupSuggestions(), RemoveLineageSourceNotes(), CMacroFunction_RemoveOrgName::s_RemoveOrgName(), CUnculTaxTool::StandardFixes(), CValidError_bioseq::ValidateSeqDescContext(), CValidError_descr::ValidateSeqDescr(), CStrainSerotypeInfluenza::x_AddToInfluenzaNames(), CDeflineGenerator::x_AdjustProteinTitleSuffix(), CDeflineGenerator::x_AdjustProteinTitleSuffixIdx(), CAppendModToOrg::x_ApplyToBioSource(), CGenusSpeciesFixup::x_ApplyToBioSource(), CFlatGatherer::x_BiosourcesEqualForMergingPurposes(), CStrainSerotypeInfluenza::x_FixupOrganismNames(), COrgGeneralPanel::x_HasTaxnameChanged(), CBioseqIndex::x_InitSource(), CStrainSerotypeInfluenza::x_IsParsableInfluenzaVirusName(), CDeflineGenerator::x_SetBioSrc(), CBioseqContext::x_SetTaxname(), CDeflineGenerator::x_SetTitleFromProtein(), CDeflineGenerator::x_SetTitleFromProteinIdx(), CSrcWriter::xGatherTaxname(), and CGff3Writer::xWriteSequenceHeader().
bool CBioSource::HasSubtype | ( | CSubSource::TSubtype | subtype | ) | const |
Definition at line 2040 of file BioSource.cpp.
References CBioSource_Base::GetSubtype(), CBioSource_Base::IsSetSubtype(), and ITERATE.
Referenced by CCleanup::ConvertSrcFeatsToSrcDescs(), FixGenomeForQualifiers(), SetEnvSampleFixAmplifiedPrimers(), and UpdateBiosourceFromBiosample().
bool CBioSource::IsSetCommon | ( | void | ) | const |
Definition at line 345 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), COrg_ref_Base::IsSetCommon(), and CBioSource_Base::IsSetOrg().
Referenced by CSrcTableCommonNameColumn::GetFromBioSource(), and CBioseqIndex::x_InitSource().
bool CBioSource::IsSetDivision | ( | void | ) | const |
Definition at line 395 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), COrg_ref::IsSetDivision(), and CBioSource_Base::IsSetOrg().
Referenced by CSrcTableDivisionColumn::GetFromBioSource(), IsBadSeqInstStrand(), and s_IsEmptyBioSource().
bool CBioSource::IsSetGcode | ( | void | ) | const |
Definition at line 365 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), COrg_ref::IsSetGcode(), and CBioSource_Base::IsSetOrg().
Referenced by CNewCleanup_imp::CdRegionEC(), and CSource_qual_choice::GetLimitedSourceQualFromBioSource().
bool CBioSource::IsSetLineage | ( | void | ) | const |
Definition at line 355 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), COrg_ref::IsSetLineage(), and CBioSource_Base::IsSetOrg().
Referenced by AllowMatingTypeQualifier(), AllowSexQualifier(), COrgGeneralPanel::ApplyCommand(), FixEnvironmentalSample(), CConvertBadCdsAndRnaToMiscFeat::getBacterialPartialNonextendable(), GetBioprojectLocation(), GetBioprojectType(), CConvertBadCdsAndRnaToMiscFeat::getCdsOverlap(), CSrcTableLineageColumn::GetFromBioSource(), CCleanup::GetNormalizableGeneQualPairs(), CConvertBadCdsAndRnaToMiscFeat::getRnaOverlap(), CDiscrepancyContext::HasLineage(), IsBadSeqInstStrand(), IsViral(), CBioSourceKind::operator=(), RemoveLineageSourceNotes(), CAdjustForConsensusSpliceSite::s_IsBioseqGood_Strict(), CValidError_imp::ValidateBioSource(), CValidError_bioseq::ValidateSeqFeatContext(), x_ShouldIgnoreNoteForBiosample(), and CValidError_bioseq::x_ValidateCompletness().
bool CBioSource::IsSetMgcode | ( | void | ) | const |
Definition at line 375 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), COrg_ref::IsSetMgcode(), and CBioSource_Base::IsSetOrg().
Referenced by CSource_qual_choice::GetLimitedSourceQualFromBioSource().
bool CBioSource::IsSetOrgMod | ( | void | ) | const |
Definition at line 415 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), CBioSource_Base::IsSetOrg(), and COrg_ref::IsSetOrgMod().
Referenced by BOOST_AUTO_TEST_CASE(), CompareOrgModValue(), GetSeqTableFromSeqEntry(), s_ResetModSubsrcQuals(), CValidError_bioseqset::ValidateNucProtSet(), CStrainSerotypeInfluenza::x_AddToInfluenzaNames(), x_GetOrgModNameValPairs(), CCulturedTool::x_RemoveIfFoundOrgModNote(), CStrainSerotypeInfluenza::x_SplittingQualifiersAtCommas(), and CSrcWriter::xGatherOrgModFeat().
bool CBioSource::IsSetOrgname | ( | void | ) | const |
Definition at line 405 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), CBioSource_Base::IsSetOrg(), and COrg_ref_Base::IsSetOrgname().
Referenced by AllowMatingTypeQualifier(), AllowSexQualifier(), AutoFix(), CheckMetagenome(), FixEnvironmentalSample(), GetDisableStrainForwarding(), RemoveLineageSourceNotes(), RemoveNullTerms(), RemoveOrgMod(), RemoveUnexpectedViralQualifiers(), CMacroFunction_AddorSetContElement::s_AddSrcOrgMod(), s_GetOrgModNatHost(), s_IsEmptyBioSource(), s_SetBioSourceField(), SetDisableStrainForwarding(), UpdateWithBioSample(), CDeflineGenerator::x_AdjustProteinTitleSuffix(), CBioseqIndex::x_InitDescs(), CBioseqIndex::x_InitSource(), CDeflineGenerator::x_SetBioSrc(), CDeflineGenerator::x_SetFlags(), CBioseqContext::x_SetTaxname(), x_ShouldIgnoreNoteForBiosample(), and CGff3Writer::xWriteSequenceHeader().
bool CBioSource::IsSetPgcode | ( | void | ) | const |
Definition at line 385 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), CBioSource_Base::IsSetOrg(), and COrg_ref::IsSetPgcode().
bool CBioSource::IsSetTaxname | ( | void | ) | const |
Definition at line 335 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), CBioSource_Base::IsSetOrg(), and COrg_ref_Base::IsSetTaxname().
Referenced by CExportTableDlg::AddBioSource(), CAddFluComments::AddBioSource(), CUnculTaxTool::AddBioSource(), CSrcTaxnameAfterBinomialColumn::ClearInBioSource(), FindOrgNames(), FixEnvironmentalSample(), GetNameValPairs(), GetSeqTableFromSeqEntry(), CUnculTaxTool::LookupSuggestions(), s_IsEmptyBioSource(), CMacroFunction_RemoveOrgName::s_RemoveOrgName(), UpdateBiosourceFromBiosample(), CValidError_bioseq::ValidateSeqDescContext(), CValidError_descr::ValidateSeqDescr(), CValidError_imp::ValidateSubSource(), CStrainSerotypeInfluenza::x_AddToInfluenzaNames(), CDeflineGenerator::x_AdjustProteinTitleSuffix(), CDeflineGenerator::x_AdjustProteinTitleSuffixIdx(), CAppendModToOrg::x_ApplyToBioSource(), CGenusSpeciesFixup::x_ApplyToBioSource(), CFlatGatherer::x_BiosourcesEqualForMergingPurposes(), CStrainSerotypeInfluenza::x_FixupOrganismNames(), COrgGeneralPanel::x_HasTaxnameChanged(), CBioseqIndex::x_InitSource(), CStrainSerotypeInfluenza::x_IsParsableInfluenzaVirusName(), x_RemoveNameElementDiffs(), CDeflineGenerator::x_SetBioSrc(), CBioseqContext::x_SetTaxname(), CDeflineGenerator::x_SetTitleFromProtein(), CDeflineGenerator::x_SetTitleFromProteinIdx(), CStrainSerotypeInfluenza::x_TrimmingOrganismNames(), and CSrcWriter::xGatherTaxname().
Definition at line 1382 of file BioSource.cpp.
References CStaticArraySearchBase< KeyValueGetter, KeyCompare >::end(), CStaticArraySearchBase< KeyValueGetter, KeyCompare >::find(), s_StopWordsSet, and rapidjson::value.
Referenced by CBiosampleFieldDiff::GetSampleVal(), CBiosampleFieldDiff::GetSrcVal(), CCompareWithBiosample::OnClickOk(), CBiosampleFieldDiff::Print(), s_iCompareNameVals(), ShouldIgnoreConflict(), UpdateWithBioSample(), and x_RemoveStopWords().
bool CBioSource::IsViral | ( | ) | const |
Definition at line 1835 of file BioSource.cpp.
References GetLineage(), CBioSource_Base::GetOrg(), IsSetLineage(), and CBioSource_Base::IsSetOrg().
Referenced by AllowMatingTypeQualifier(), AllowSexQualifier(), and RemoveUnexpectedViralQualifiers().
Definition at line 1825 of file BioSource.cpp.
References NStr::eNocase, and NStr::StartsWith().
CRef< CBioSource > CBioSource::MakeCommon | ( | const CBioSource & | other | ) | const |
Definition at line 2022 of file BioSource.cpp.
References CBioSource_Base::GetOrg(), CBioSource_Base::IsSetOrg(), COrg_ref::MakeCommon(), MakeCommonExceptOrg(), NULL, and CBioSource_Base::SetOrg().
Referenced by BOOST_AUTO_TEST_CASE().
CRef< CBioSource > CBioSource::MakeCommonExceptOrg | ( | const CBioSource & | other | ) | const |
Definition at line 1989 of file BioSource.cpp.
References CSerialObject::Assign(), CBioSource(), CSerialObject::Equals(), CBioSource_Base::GetPcr_primers(), CBioSource_Base::GetSubtype(), CBioSource_Base::IsSetPcr_primers(), CBioSource_Base::IsSetSubtype(), ITERATE, MAKE_COMMON_INT, CBioSource_Base::SetPcr_primers(), and CBioSource_Base::SetSubtype().
Referenced by MakeCommon(), and MakeCommonBioSource().
|
private |
Definition at line 1428 of file BioSource.cpp.
References ctll::empty(), CSubSource_Base::eSubtype_other, CBioSource_Base::GetSubtype(), NStr::IsBlank(), CBioSource_Base::IsSetSubtype(), CSubSource::RemoveCultureNotes(), CBioSource_Base::ResetSubtype(), and CBioSource_Base::SetSubtype().
Referenced by BOOST_AUTO_TEST_CASE(), and GetRmCultureNotesCommand().
bool CBioSource::RemoveLineageSourceNotes | ( | ) |
Definition at line 1519 of file BioSource.cpp.
References ArraySize(), ctll::empty(), COrgMod_Base::eSubtype_other, CSubSource_Base::eSubtype_other, GetLineage(), CSubSource_Base::GetName(), CBioSource_Base::GetOrg(), GetOrgname(), COrgMod_Base::GetSubname(), CBioSource_Base::GetSubtype(), COrgMod_Base::GetSubtype(), CSubSource_Base::GetSubtype(), GetTaxId(), GetTaxname(), i, IsSetLineage(), CSubSource_Base::IsSetName(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), COrgMod_Base::IsSetSubname(), CBioSource_Base::IsSetSubtype(), COrgMod_Base::IsSetSubtype(), CSubSource_Base::IsSetSubtype(), CBioSource_Base::ResetSubtype(), s_DoesTextContainOnlyTheseWords(), s_GetWordListFromText(), s_SpecialLineageWords, CBioSource_Base::SetOrg(), COrg_ref_Base::SetOrgname(), CBioSource_Base::SetSubtype(), and ZERO_TAX_ID.
Referenced by BOOST_AUTO_TEST_CASE().
bool CBioSource::RemoveNullTerms | ( | ) |
Definition at line 1772 of file BioSource.cpp.
References ctll::empty(), NStr::EqualNocase(), CSubSource_Base::eSubtype_collection_date, CSubSource_Base::eSubtype_country, CBioSource_Base::GetOrg(), GetOrgname(), CBioSource_Base::GetSubtype(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), CBioSource_Base::IsSetSubtype(), CBioSource_Base::ResetSubtype(), CBioSource_Base::SetOrg(), COrg_ref_Base::SetOrgname(), and CBioSource_Base::SetSubtype().
Referenced by CNewCleanup_imp::BiosourceBC(), and BOOST_AUTO_TEST_CASE().
Definition at line 1636 of file BioSource.cpp.
References ctll::empty(), CBioSource_Base::GetOrg(), GetOrgname(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), CBioSource_Base::SetOrg(), and COrg_ref_Base::SetOrgname().
Referenced by CCompareWithBiosample::OnClickOk(), and UpdateWithBioSample().
Definition at line 1658 of file BioSource.cpp.
References ctll::empty(), NStr::Equal(), CBioSource_Base::GetOrg(), GetOrgname(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), CBioSource_Base::SetOrg(), COrg_ref_Base::SetOrgname(), and val.
Definition at line 1591 of file BioSource.cpp.
References ctll::empty(), CBioSource_Base::GetSubtype(), CBioSource_Base::IsSetSubtype(), CBioSource_Base::ResetSubtype(), and CBioSource_Base::SetSubtype().
Referenced by CCompareWithBiosample::OnClickOk(), and UpdateWithBioSample().
Definition at line 1613 of file BioSource.cpp.
References ctll::empty(), NStr::Equal(), CBioSource_Base::GetSubtype(), CBioSource_Base::IsSetSubtype(), CBioSource_Base::ResetSubtype(), CBioSource_Base::SetSubtype(), and val.
bool CBioSource::RemoveUnexpectedViralQualifiers | ( | ) |
Definition at line 1949 of file BioSource.cpp.
References ctll::empty(), CBioSource_Base::GetOrg(), GetOrgname(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), IsViral(), CBioSource_Base::SetOrg(), and COrg_ref_Base::SetOrgname().
Referenced by BOOST_AUTO_TEST_CASE().
void CBioSource::SetDisableStrainForwarding | ( | bool | val | ) |
Definition at line 621 of file BioSource.cpp.
References NStr::Find(), COrgName_Base::GetAttrib(), CBioSource_Base::GetOrg(), GetOrgname(), COrg_ref_Base::GetOrgname(), NStr::IsBlank(), CBioSource_Base::IsSetOrg(), IsSetOrgname(), kDisableStrainForwardAttrib, kEmptyStr, NStr::ReplaceInPlace(), CBioSource_Base::SetOrg(), COrg_ref_Base::SetOrgname(), and val.
Referenced by BOOST_AUTO_TEST_CASE(), and GetChangeStrainForwardingCommand().
|
static |
Definition at line 1033 of file BioSource.cpp.
References ArraySize(), COrgMod::AutoFix(), CSubSource::AutoFix(), CSubSource::DateFromCollectionDate(), eConflictIgnoreAll, eConflictIgnoreMissingInBioSample, eConflictIgnoreMissingInBioSource, NStr::EndsWith(), NStr::Equal(), NStr::EqualCase(), NStr::EqualNocase(), CSerialObject::Equals(), COrgMod::GetSubtypeValue(), CSubSource::GetSubtypeValue(), i, ignoreconflict::ignore_type, NStr::IsBlank(), CSubSource::IsCorrectLatLonFormat(), IsStopWord(), label, NStr::ReplaceInPlace(), s_MayIgnoreCase(), s_SameExceptPrecision(), and sIgnoreConflictList.
Referenced by AddBioSourceToAttributes(), BOOST_AUTO_TEST_CASE(), CompareValLists(), and GetFieldDiffsFromNameValLists().
void CBioSource::UpdateWithBioSample | ( | const CBioSource & | biosample, |
bool | force, | ||
bool | is_local_copy = false |
||
) |
Definition at line 704 of file BioSource.cpp.
References AutoFix(), BiosampleDiffsOkForUpdate(), NStr::EqualNocase(), COrgMod_Base::eSubtype_old_name, eUnknown, GetBiosampleDiffs(), CBioSource_Base::GetOrg(), GetOrgname(), COrgMod::GetSubtypeValue(), CSubSource::GetSubtypeValue(), NStr::IsBlank(), IsSetOrgname(), IsStopWord(), ITERATE, mod(), NCBI_THROW, CSubSource::NeedsNoText(), RemoveOrgMod(), RemoveSubSource(), CSubSource_Base::SetName(), CBioSource_Base::SetOrg(), COrg_ref_Base::SetOrgname(), CSubSource_Base::SetSubtype(), CBioSource_Base::SetSubtype(), COrg_ref::SetTaxId(), COrg_ref_Base::SetTaxname(), and TAX_ID_FROM.
Referenced by BOOST_AUTO_TEST_CASE(), and CBiosampleChkApp::UpdateBioSource().
|
private |
|
private |
Definition at line 790 of file BioSource.cpp.
References CBioSource_Base::IsSetSubtype(), s_MustCopy(), and CBioSource_Base::SetSubtype().
|
private |
Definition at line 879 of file BioSource.cpp.
References COrgMod_Base::eSubtype_other, CBioSource_Base::GetOrg(), GetOrgname(), COrgMod::GetSubtypeName(), IsSetOrgMod(), ITERATE, kOrgModNote, label, s_CompareNameVals(), and ct::sort().
Referenced by GetNameValPairs().
|
private |
Definition at line 900 of file BioSource.cpp.
References CSubSource_Base::eSubtype_other, CBioSource_Base::GetSubtype(), CSubSource::GetSubtypeName(), NStr::IsBlank(), CBioSource_Base::IsSetSubtype(), ITERATE, kSubSrcNote, label, CSubSource::NeedsNoText(), s_CompareNameVals(), ct::sort(), st(), and val.
Referenced by GetNameValPairs().
|
staticprivate |
|
private |
Definition at line 1268 of file BioSource.cpp.
References NStr::Find(), CBioSource_Base::GetOrg(), COrg_ref_Base::GetTaxname(), NStr::IsBlank(), CBioSource_Base::IsSetOrg(), IsSetTaxname(), COrg_ref_Base::IsSetTaxname(), remove(), and s_IsTaxNameElement().
|
staticprivate |
Definition at line 672 of file BioSource.cpp.
References COrgName_Base::GetMod(), COrg_ref_Base::GetOrgname(), COrg_ref_Base::GetTaxname(), COrg_ref::IsSetOrgMod(), COrg_ref_Base::IsSetTaxname(), IsStopWord(), COrg_ref_Base::ResetTaxname(), and COrg_ref_Base::SetOrgname().
|
private |
Definition at line 1316 of file BioSource.cpp.
References NStr::Find(), GetLineage(), CBioSource_Base::GetOrg(), GetOrgname(), IsSetLineage(), CBioSource_Base::IsSetOrg(), and IsSetOrgname().
Referenced by GetBiosampleDiffs().