NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
variation::CVariationUtil::CVariantPropertiesIndex Class Reference

Search Toolkit Book for variation::CVariationUtil::CVariantPropertiesIndex

Given a seq-loc, compute CVariantProperties::TGene_location from annotation. More...

+ Collaboration diagram for variation::CVariationUtil::CVariantPropertiesIndex:

Public Types

typedef pair< int, CVariantProperties::TGene_locationTGeneIDAndProp
 
typedef vector< TGeneIDAndPropTGeneIDAndPropVector
 
typedef pair< CRef< CSeq_loc >, CRef< CSeq_loc > > TLocsPair
 

Public Member Functions

 CVariantPropertiesIndex (CScope &scope)
 
void GetLocationProperties (const CSeq_loc &loc, TGeneIDAndPropVector &v)
 
void Clear ()
 

Static Public Member Functions

static TLocsPair s_GetStartAndStopCodonsLocs (const CSeq_loc &cds_loc)
 
static TLocsPair s_GetUTRLocs (const CSeq_loc &cds_loc, const CSeq_loc &parent_loc)
 
static TLocsPair s_GetNeighborhoodLocs (const CSeq_loc &gene_loc, TSeqPos max_pos)
 
static TLocsPair s_GetIntronsAndSpliceSiteLocs (const CSeq_loc &rna_loc)
 
static int s_GetGeneID (const CMappedFeat &mf, feature::CFeatTree &ft)
 
static int s_GetGeneIdForProduct (CBioseq_Handle bsh)
 

Private Types

typedef CRangeMap< TGeneIDAndPropVector, TSeqPosTRangeMap
 
typedef map< CSeq_id_Handle, TRangeMapTIdRangeMap
 

Private Member Functions

void x_Index (const CSeq_id_Handle &idh)
 
void x_Add (const CSeq_loc &loc, int gene_id, CVariantProperties::TGene_location prop)
 

Private Attributes

CRef< CScopem_scope
 
TIdRangeMap m_loc2prop
 

Detailed Description

Given a seq-loc, compute CVariantProperties::TGene_location from annotation.

Precompute for the whole sequence and keep the cache to avoid objmgr annotation lookups on every call.

Definition at line 452 of file variation_util2.hpp.

Member Typedef Documentation

◆ TGeneIDAndProp

Definition at line 455 of file variation_util2.hpp.

◆ TGeneIDAndPropVector

Definition at line 456 of file variation_util2.hpp.

◆ TIdRangeMap

Definition at line 481 of file variation_util2.hpp.

◆ TLocsPair

Definition at line 468 of file variation_util2.hpp.

◆ TRangeMap

Definition at line 480 of file variation_util2.hpp.

Constructor & Destructor Documentation

◆ CVariantPropertiesIndex()

variation::CVariationUtil::CVariantPropertiesIndex::CVariantPropertiesIndex ( CScope scope)
inline

Definition at line 458 of file variation_util2.hpp.

Member Function Documentation

◆ Clear()

void variation::CVariationUtil::CVariantPropertiesIndex::Clear ( void  )
inline

◆ GetLocationProperties()

void variation::CVariationUtil::CVariantPropertiesIndex::GetLocationProperties ( const CSeq_loc loc,
CVariantPropertiesIndex::TGeneIDAndPropVector v 
)

◆ s_GetGeneID()

int variation::CVariationUtil::CVariantPropertiesIndex::s_GetGeneID ( const CMappedFeat mf,
feature::CFeatTree &  ft 
)
static

◆ s_GetGeneIdForProduct()

int variation::CVariationUtil::CVariantPropertiesIndex::s_GetGeneIdForProduct ( CBioseq_Handle  bsh)
static

◆ s_GetIntronsAndSpliceSiteLocs()

CVariationUtil::CVariantPropertiesIndex::TLocsPair variation::CVariationUtil::CVariantPropertiesIndex::s_GetIntronsAndSpliceSiteLocs ( const CSeq_loc rna_loc)
static

◆ s_GetNeighborhoodLocs()

CVariationUtil::CVariantPropertiesIndex::TLocsPair variation::CVariationUtil::CVariantPropertiesIndex::s_GetNeighborhoodLocs ( const CSeq_loc gene_loc,
TSeqPos  max_pos 
)
static

◆ s_GetStartAndStopCodonsLocs()

CVariationUtil::CVariantPropertiesIndex::TLocsPair variation::CVariationUtil::CVariantPropertiesIndex::s_GetStartAndStopCodonsLocs ( const CSeq_loc cds_loc)
static

◆ s_GetUTRLocs()

CVariationUtil::CVariantPropertiesIndex::TLocsPair variation::CVariationUtil::CVariantPropertiesIndex::s_GetUTRLocs ( const CSeq_loc cds_loc,
const CSeq_loc parent_loc 
)
static

◆ x_Add()

void variation::CVariationUtil::CVariantPropertiesIndex::x_Add ( const CSeq_loc loc,
int  gene_id,
CVariantProperties::TGene_location  prop 
)
private

Definition at line 3440 of file variation_util2.cpp.

References MSerial_AsnText, NCBI_RETHROW_SAME, and NcbiCerr.

◆ x_Index()

void variation::CVariationUtil::CVariantPropertiesIndex::x_Index ( const CSeq_id_Handle idh)
private

Definition at line 3597 of file variation_util2.cpp.

References CSeq_loc::Assign(), CSeqFeatData_Base::e_Cdregion, CSeqFeatData_Base::e_Gene, CSeq_loc_Base::e_Mix, CSeq_loc_Base::e_Null, CSeqFeatData_Base::e_Rna, CSeq_loc_CI::eEmpty_Skip, CVariantProperties_Base::eGene_location_acceptor, CVariantProperties_Base::eGene_location_conserved_noncoding, CVariantProperties_Base::eGene_location_donor, CVariantProperties_Base::eGene_location_in_gene, CVariantProperties_Base::eGene_location_in_start_codon, CVariantProperties_Base::eGene_location_in_stop_codon, CVariantProperties_Base::eGene_location_intergenic, CVariantProperties_Base::eGene_location_intron, CVariantProperties_Base::eGene_location_near_gene_3, CVariantProperties_Base::eGene_location_near_gene_5, CVariantProperties_Base::eGene_location_utr_3, CVariantProperties_Base::eGene_location_utr_5, CSeq_inst_Base::eMol_aa, CSeq_inst_Base::eMol_dna, CSeq_inst_Base::eMol_rna, set< Key, Compare >::empty(), eNa_strand_plus, set< Key, Compare >::end(), CSeq_loc_CI::eOrder_Biological, CSeqFeatData::eSubtype_mRNA, set< Key, Compare >::find(), CSeq_loc::fMerge_SingleRange, CSeq_loc::fSortAndMerge_All, CScope::GetBioseqHandle(), CBioseq_Handle::GetBioseqMolType(), CSeq_feat_Handle::GetData(), variation::GetFocusLocusIDs(), CSeq_loc::GetId(), CBioseq_Handle::GetInst_Length(), CMappedFeat::GetLocation(), CBioseq_Handle::GetRangeSeq_loc(), CSeq_loc::GetStrand(), CSeqFeatData::GetSubtype(), i, SAnnotSelector::IncludeFeatType(), CSeqFeatData_Base::IsCdregion(), CSeqFeatData_Base::IsGene(), CSeqFeatData_Base::IsRna(), variation::CVariationUtil::m_scope, NULL, CSeq_loc::ResetStrand(), CFeat_CI::Rewind(), Seq_loc_Add(), Seq_loc_Merge(), Seq_loc_Subtract(), SAnnotSelector::SetAdaptiveDepth(), CSeq_loc::SetMix(), and SAnnotSelector::SetResolveAll().

Referenced by GetLocationProperties().

Member Data Documentation

◆ m_loc2prop

TIdRangeMap variation::CVariationUtil::CVariantPropertiesIndex::m_loc2prop
private

Definition at line 484 of file variation_util2.hpp.

Referenced by Clear(), and GetLocationProperties().

◆ m_scope

CRef<CScope> variation::CVariationUtil::CVariantPropertiesIndex::m_scope
private

Definition at line 483 of file variation_util2.hpp.

Referenced by GetLocationProperties().


The documentation for this class was generated from the following files:
Modified on Wed Sep 04 15:00:49 2024 by modify_doxy.py rev. 669887