NCBI C++ ToolKit
|
Search Toolkit Book for CGeneFinder
#include <objtools/format/items/gene_finder.hpp>
Classes | |
class | CGeneSearchPlugin |
Static Public Member Functions | |
static void | GetAssociatedGeneInfo (const CSeq_feat_Handle &in_feat, CBioseqContext &ctx, const CConstRef< CSeq_loc > &feat_loc, CConstRef< CGene_ref > &out_suppression_check_gene_ref, const CGene_ref *&out_g_ref, CConstRef< CSeq_feat > &out_s_feat, const CSeq_feat_Handle &in_parent_feat) |
Find the gene associated with the given feature. More... | |
static CSeq_feat_Handle | ResolveGeneXref (const CGene_ref *xref_g_ref, const CSeq_entry_Handle &top_level_seq_entry) |
This does plain, simple resolution of a CGene_ref to its gene. More... | |
Private Types | |
enum | FGeneSearchLocOpt { fGeneSearchLocOpt_RemoveFar = 1 << 0 } |
typedef int | TGeneSearchLocOpt |
Definition at line 52 of file gene_finder.hpp.
|
private |
Definition at line 206 of file gene_finder.hpp.
|
private |
Enumerator | |
---|---|
fGeneSearchLocOpt_RemoveFar |
Definition at line 203 of file gene_finder.hpp.
|
staticprivate |
Definition at line 862 of file gene_finder.cpp.
References eNa_strand_minus, ITERATE, and location.
Referenced by CanUseExtremesToFindGene(), and CGeneFinder::CGeneSearchPlugin::processMainLoop().
|
staticprivate |
Definition at line 583 of file gene_finder.cpp.
References BadSeqLocSortOrderCStyle(), ctx, IsMixedStrand(), and location.
Referenced by GetFeatViaSubsetThenExtremesIfPossible_Helper().
|
staticprivate |
Definition at line 810 of file gene_finder.cpp.
References set< Key, Compare >::begin(), copy(), set< Key, Compare >::end(), set< Key, Compare >::find(), CGene_ref_Base::GetLocus(), CGene_ref_Base::GetLocus_tag(), CGene_ref_Base::GetSyn(), CGene_ref_Base::IsSetLocus(), CGene_ref_Base::IsSetLocus_tag(), CGene_ref_Base::IsSetSyn(), ITERATE, and NULL.
Referenced by GetAssociatedGeneInfo(), and CGeneFinder::CGeneSearchPlugin::processMainLoop().
|
staticprivate |
Definition at line 891 of file gene_finder.cpp.
References CSeq_loc::Assign(), CSeq_loc_CI::eEmpty_Skip, eNa_strand_other, eNa_strand_plus, eNa_strand_unknown, CSeq_loc_CI::eOrder_Biological, CSeq_loc_CI::eOrder_Positional, fGeneSearchLocOpt_RemoveFar, CBioseq_Handle::IsSynonym(), CSeq_loc::SetMix(), and CSeq_loc::SetStrand().
Referenced by CGeneFinder::CGeneSearchPlugin::processLoc(), and CGeneFinder::CGeneSearchPlugin::processMainLoop().
|
static |
Find the gene associated with the given feature.
@in_feat The handle to the feature for which we are seeking the gene.
ctx | This holds contextual information on the bioseq that the feature is located on. @feat_loc This is the location of the feature which is used for gene-finding purposes. It is occasionally different from in_feat.GetLocation() due to CDS-mapping and such. @out_suppression_check_gene_ref This holds the first suppressed CGene_ref on the feature. If none are suppressed, it holds the last CGene_ref on in_feat. @out_g_ref This holds the CGene_ref referring to the gene of in_feat. @out_s_feat If found, this holds the CSeq_feat of the gene belonging to in_feat. @in_parent_feat If the feature has no parent, just supply an empty CSeq_feat_Handle. |
Definition at line 269 of file gene_finder.cpp.
References Compare(), ctx, CSeqFeatData_Base::e_Cdregion, CSeqFeatData_Base::e_Gene, eGetId_Canonical, eSame, CSeqFeatData::eSubtype_bond, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_mat_peptide_aa, CSeqFeatData::eSubtype_preprotein, CSeqFeatData::eSubtype_primer_bind, CSeqFeatData::eSubtype_propeptide_aa, CSeqFeatData::eSubtype_region, CSeqFeatData::eSubtype_sig_peptide_aa, CSeqFeatData::eSubtype_site, CSeqFeatData::eSubtype_transit_peptide_aa, fCompareOverlapping, GeneMatchesXref(), CSeq_feat_Base::GetData(), CSeq_feat_Handle::GetData(), CSeq_feat_Handle::GetFeatSubtype(), CSeq_feat_Handle::GetFeatType(), GetFeatViaSubsetThenExtremesIfPossible(), CSeqFeatData_Base::GetGene(), CSeq_feat_Handle::GetGeneXref(), GetId(), GetIdHandle(), CGene_ref::GetLabel(), CSeq_feat_Base::GetLocation(), CMappedFeat::GetLocation(), CSeq_feat_Handle::GetLocation(), GetMappedCDSForProduct(), CSeq_feat_Handle::GetSeq_feat(), CSeqFeatData::GetSubtype(), GetSuppressionCheckGeneRef(), CSeqFeatData_Base::IsCdregion(), IsSameBioseq(), CGene_ref::IsSuppressed(), NULL, CConstRef< C, Locker >::ReleaseOrNull(), CConstRef< C, Locker >::Reset(), ResolveGeneObjectId(), and ResolveGeneXref().
Referenced by CFeatureItem::x_AddQuals(), and CFeatureItem::x_AddQualsIdx().
|
staticprivate |
Definition at line 624 of file gene_finder.cpp.
References CSeq_loc::Assign(), ctx, CSeqFeatData_Base::e_Imp, CSeqFeatData_Base::e_Variation, eNa_strand_minus, eNa_strand_plus, eOverlap_Contained, CSeqFeatData::eSubtype_variation, CSeqFeatData::eSubtype_variation_ref, GetBestOverlappingFeat(), GetFeatViaSubsetThenExtremesIfPossible_Helper(), location, and CSeq_loc::SetStrand().
Referenced by GetAssociatedGeneInfo().
|
staticprivate |
Definition at line 685 of file gene_finder.cpp.
References CScope::AddDataLoader(), CScope::AddDefaults(), CanUseExtremesToFindGene(), ctx, CObjectManager::FindDataLoader(), GetFeatViaSubsetThenExtremesIfPossible_Helper_extremes(), GetFeatViaSubsetThenExtremesIfPossible_Helper_subset(), CObjectManager::GetInstance(), CScope::GetObjectManager(), CRef< C, Locker >::GetPointer(), location, NULL, CScope::RemoveDataLoader(), and CRef< C, Locker >::Reset().
Referenced by GetFeatViaSubsetThenExtremesIfPossible().
|
staticprivate |
Definition at line 749 of file gene_finder.cpp.
References eOverlap_Contained, GetBestOverlappingFeat(), and location.
Referenced by GetFeatViaSubsetThenExtremesIfPossible_Helper().
|
staticprivate |
Definition at line 733 of file gene_finder.cpp.
References eOverlap_SubsetRev, GetBestOverlappingFeat(), and location.
Referenced by GetFeatViaSubsetThenExtremesIfPossible_Helper().
|
staticprivate |
Definition at line 560 of file gene_finder.cpp.
References CSeqFeatXref_Base::GetData(), CSeqFeatData_Base::GetGene(), CSeq_feat_Handle::GetXref(), CSeqFeatData_Base::IsGene(), CSeqFeatXref_Base::IsSetData(), CSeq_feat_Handle::IsSetXref(), CGene_ref::IsSuppressed(), ITERATE, and CConstRef< C, Locker >::Reset().
Referenced by GetAssociatedGeneInfo().
|
staticprivate |
Definition at line 955 of file gene_finder.cpp.
References eNa_strand_minus, eNa_strand_plus, eNa_strand_unknown, CBioseq_Handle::IsSynonym(), and ITERATE.
Referenced by CanUseExtremesToFindGene(), and CGeneFinder::CGeneSearchPlugin::processMainLoop().
|
staticprivate |
Definition at line 765 of file gene_finder.cpp.
References ctx, CSeq_feat_Base::GetData(), CSeqFeatXref_Base::GetData(), CSeqFeatData_Base::GetGene(), CSeqFeatXref_Base::GetId(), CFeat_id_Base::GetLocal(), CMappedFeat::GetOriginalFeature(), CSeq_feat_Handle::GetXref(), CSeqFeatData_Base::IsGene(), CFeat_id_Base::IsLocal(), CSeq_feat_Base::IsSetData(), CSeqFeatXref_Base::IsSetData(), CSeqFeatXref_Base::IsSetId(), CSeq_feat_Handle::IsSetXref(), CGene_ref::IsSuppressed(), ITERATE, and SAnnotSelector::SetLimitTSE().
Referenced by GetAssociatedGeneInfo().
|
static |
This does plain, simple resolution of a CGene_ref to its gene.
for example, this might be used to do gene-resolution for certain non-Genbank records. @xref_g_ref The CGene_ref we're resolving. @top_level_seq_entry This is the Seq-entry under which we look for the gene that xref_g_ref points to.
Definition at line 462 of file gene_finder.cpp.
References _ASSERT, set< Key, Compare >::end(), CSeqMap::fFindAny, set< Key, Compare >::find(), CTSE_Handle::GetGenesByRef(), CTSE_Handle::GetGenesWithLocus(), GetLength(), CSeq_feat_Handle::GetLocation(), CGene_ref_Base::GetLocus(), CGene_ref_Base::GetLocus_tag(), CSeq_entry_Handle::GetScope(), CSeq_entry_Handle::GetTSE_Handle(), set< Key, Compare >::insert(), CGene_ref_Base::IsSetLocus(), CGene_ref_Base::IsSetLocus_tag(), kMax_Auto, NON_CONST_ITERATE, and NULL.
Referenced by GetAssociatedGeneInfo(), and CFeatureItem::x_AddQuals().