NCBI C++ ToolKit
Public Types | Public Member Functions | Private Attributes | List of all members
variation_ref::CHgvsParser::CContext Class Reference

Search Toolkit Book for variation_ref::CHgvsParser::CContext

#include <misc/hgvs/hgvs_parser.hpp>

+ Collaboration diagram for variation_ref::CHgvsParser::CContext:

Public Types

enum  EMolType {
  eMol_not_set , eMol_g , eMol_c , eMol_r ,
  eMol_p , eMol_mt
}
 

Public Member Functions

 CContext (CRef< CScope > scope)
 
 CContext (const CContext &other)
 
void Clear ()
 
TSeqPos GetLength () const
 
void SetId (const CSeq_id &id, EMolType mol_type)
 
void Validate (const CSeq_literal &literal) const
 
void Validate (const CSeq_literal &literal, const CSeq_loc &loc) const
 
void SetLoc (const SOffsetLoc &loc)
 
bool IsSetLoc () const
 
CScopeGetScope () const
 
const CSeq_locGetLoc () const
 
const SOffsetLocGetOffsetLoc () const
 
const CSeq_idGetId () const
 
const CSeq_featGetCDS () const
 
EMolType GetMolType (bool check=true) const
 

Private Attributes

CBioseq_Handle m_bsh
 
EMolType m_mol_type
 
CRef< CSeq_featm_cds
 
CRef< CSeq_idm_seq_id
 
SOffsetLoc m_loc
 
CRef< CScopem_scope
 

Detailed Description

CContext encapsulates sequence or location context for an hgvs sub-expression. E.g. given an expression id:c.5_10delinsAT, when creating a variation-ref for delinsAT the context will refer to sequence "id" and location "5_10"

Definition at line 247 of file hgvs_parser.hpp.

Member Enumeration Documentation

◆ EMolType

Enumerator
eMol_not_set 
eMol_g 
eMol_c 
eMol_r 
eMol_p 
eMol_mt 

Definition at line 261 of file hgvs_parser.hpp.

Constructor & Destructor Documentation

◆ CContext() [1/2]

variation_ref::CHgvsParser::CContext::CContext ( CRef< CScope scope)
inline

Definition at line 250 of file hgvs_parser.hpp.

◆ CContext() [2/2]

variation_ref::CHgvsParser::CContext::CContext ( const CContext other)
inline

Definition at line 256 of file hgvs_parser.hpp.

Member Function Documentation

◆ Clear()

void variation_ref::CHgvsParser::CContext::Clear ( void  )
inline

Definition at line 270 of file hgvs_parser.hpp.

◆ GetCDS()

const CSeq_feat & variation_ref::CHgvsParser::CContext::GetCDS ( ) const

Definition at line 196 of file hgvs_parser.cpp.

References HGVS_THROW.

◆ GetId()

const CSeq_id & variation_ref::CHgvsParser::CContext::GetId ( void  ) const

Definition at line 188 of file hgvs_parser.cpp.

References HGVS_THROW.

◆ GetLength()

TSeqPos variation_ref::CHgvsParser::CContext::GetLength ( void  ) const
inline

Definition at line 279 of file hgvs_parser.hpp.

◆ GetLoc()

const CSeq_loc & variation_ref::CHgvsParser::CContext::GetLoc ( void  ) const

Definition at line 175 of file hgvs_parser.cpp.

References HGVS_THROW.

◆ GetMolType()

CHgvsParser::CContext::EMolType variation_ref::CHgvsParser::CContext::GetMolType ( bool  check = true) const

Definition at line 204 of file hgvs_parser.cpp.

References check, and HGVS_THROW.

◆ GetOffsetLoc()

const CHgvsParser::SOffsetLoc & variation_ref::CHgvsParser::CContext::GetOffsetLoc ( ) const

Definition at line 183 of file hgvs_parser.cpp.

◆ GetScope()

CScope& variation_ref::CHgvsParser::CContext::GetScope ( void  ) const
inline

Definition at line 314 of file hgvs_parser.hpp.

◆ IsSetLoc()

bool variation_ref::CHgvsParser::CContext::IsSetLoc ( ) const
inline

Definition at line 309 of file hgvs_parser.hpp.

◆ SetId()

void variation_ref::CHgvsParser::CContext::SetId ( const CSeq_id id,
EMolType  mol_type 
)

Clear the context and reset it for the given seq-id. If the sequence is cdna and we're working with "c." coordinates, also find the CDS, as the coordinates are (start|stop)codon-relative.

Definition at line 212 of file hgvs_parser.cpp.

References CScope::GetBioseqHandle(), CSeq_feat_Handle::GetData(), CMappedFeat::GetMappedFeature(), HGVS_THROW, CSeqFeatData_Base::IsCdregion(), variation_ref::CHgvsParser::m_scope, and CMappedFeat::Reset().

◆ SetLoc()

void variation_ref::CHgvsParser::CContext::SetLoc ( const SOffsetLoc loc)
inline

Definition at line 304 of file hgvs_parser.hpp.

Referenced by variation_ref::CHgvsParser::x_expr2().

◆ Validate() [1/2]

void variation_ref::CHgvsParser::CContext::Validate ( const CSeq_literal literal) const
inline

Definition at line 291 of file hgvs_parser.hpp.

References GetLoc(), and literal().

◆ Validate() [2/2]

void variation_ref::CHgvsParser::CContext::Validate ( const CSeq_literal literal,
const CSeq_loc loc 
) const

Member Data Documentation

◆ m_bsh

CBioseq_Handle variation_ref::CHgvsParser::CContext::m_bsh
private

Definition at line 331 of file hgvs_parser.hpp.

◆ m_cds

CRef<CSeq_feat> variation_ref::CHgvsParser::CContext::m_cds
private

Definition at line 333 of file hgvs_parser.hpp.

◆ m_loc

SOffsetLoc variation_ref::CHgvsParser::CContext::m_loc
private

Definition at line 335 of file hgvs_parser.hpp.

◆ m_mol_type

EMolType variation_ref::CHgvsParser::CContext::m_mol_type
private

Definition at line 332 of file hgvs_parser.hpp.

◆ m_scope

CRef<CScope> variation_ref::CHgvsParser::CContext::m_scope
mutableprivate

Definition at line 336 of file hgvs_parser.hpp.

◆ m_seq_id

CRef<CSeq_id> variation_ref::CHgvsParser::CContext::m_seq_id
private

Definition at line 334 of file hgvs_parser.hpp.


The documentation for this class was generated from the following files:
Modified on Sun May 05 05:17:41 2024 by modify_doxy.py rev. 669887