NCBI C++ ToolKit
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SSNP_Info Struct Reference

Search Toolkit Book for SSNP_Info

#include <objmgr/impl/snp_info.hpp>

Public Types

enum  ESNP_Type {
  eSNP_Simple , eSNP_Bad_WrongMemberSet , eSNP_Bad_WrongTextId , eSNP_Complex_CommentTooBig ,
  eSNP_Complex_CommentIndexOverflow , eSNP_Complex_LocationIsNotPoint , eSNP_Complex_LocationIsNotGi , eSNP_Complex_LocationGiIsBad ,
  eSNP_Complex_LocationStrandIsBad , eSNP_Complex_IdCountTooLarge , eSNP_Complex_IdCountIsNotOne , eSNP_Complex_AlleleTooBig ,
  eSNP_Complex_AlleleIndexOverflow , eSNP_Complex_AlleleCountTooLarge , eSNP_Complex_WeightBadValue , eSNP_Complex_WeightCountIsNotOne ,
  eSNP_Complex_BadQAdata , eSNP_Complex_NoPlaceForQAdata , eSNP_Complex_QAdataIndexOverflow , eSNP_Type_last
}
 
enum  { kMax_PositionDelta = kMax_UI1 }
 
enum  { kNo_CommentIndex = kMax_UI1 , kMax_CommentIndex = kNo_CommentIndex - 1 }
 
enum  { fwWeightQual = 1 << 0 , fwWeightExt = 1 << 1 , fWeightFlagBits = 2 , kMax_Weight = kMax_UI1>>fWeightFlagBits }
 
enum  { kNo_ExtraIndex = kMax_UI2 , kMax_ExtraIndex = kNo_ExtraIndex - 1 }
 
enum  { kNo_QualityCodesIndex = kMax_UI2 , kMax_QualityCodesIndex = kNo_QualityCodesIndex - 1 }
 
enum  { kMax_AllelesCount = 4 }
 
enum  { kNo_AlleleIndex = kMax_UI2 , kMax_AlleleIndex = kNo_AlleleIndex - 1 }
 
enum  FFlags {
  fRemoved = 1 << 0 , fPlusStrand = 1 << 1 , fMinusStrand = 1 << 2 , fFuzzLimTr = 1 << 3 ,
  fAlleleReplace = 1 << 4 , fQualityCodesStr = 1 << 5 , fQualityCodesOs = 1 << 6 , fQualityCodesMask = fQualityCodesStr | fQualityCodesOs
}
 
typedef CRange< TSeqPosTRange
 
typedef int TSNPId
 
typedef Uint1 TPositionDelta
 
typedef Uint1 TCommentIndex
 
typedef Uint1 TWeight
 
typedef Uint2 TExtraIndex
 
typedef Uint2 TQualityCodesIndex
 
typedef Uint2 TAlleleIndex
 
typedef Uint1 TFlags
 

Public Member Functions

TSeqPos GetFrom (void) const
 
TSeqPos GetTo (void) const
 
bool PlusStrand (void) const
 
bool MinusStrand (void) const
 
bool IsRemoved (void) const
 
bool operator< (const SSNP_Info &snp) const
 
bool operator< (TSeqPos end_position) const
 
bool NoMore (const TRange &range) const
 
bool NotThis (const TRange &range) const
 
ESNP_Type ParseSeq_feat (const CSeq_feat &feat, CSeq_annot_SNP_Info &annot_info)
 
CRef< CSeq_featCreateSeq_feat (const CSeq_annot_SNP_Info &annot_info) const
 
void UpdateSeq_feat (CRef< CSeq_feat > &seq_feat, const CSeq_annot_SNP_Info &annot_info) const
 
void UpdateSeq_feat (CRef< CSeq_feat > &seq_feat, CRef< CSeq_point > &seq_point, CRef< CSeq_interval > &seq_interval, const CSeq_annot_SNP_Info &annot_info) const
 
CRef< CSeq_featx_CreateSeq_feat (void) const
 
void x_UpdateSeq_featData (CSeq_feat &feat, const CSeq_annot_SNP_Info &annot_info) const
 
void x_UpdateSeq_feat (CSeq_feat &feat, const CSeq_annot_SNP_Info &annot_info) const
 
void x_UpdateSeq_feat (CSeq_feat &feat, CRef< CSeq_point > &seq_point, CRef< CSeq_interval > &seq_interval, const CSeq_annot_SNP_Info &annot_info) const
 
bool HasAlleles (void) const
 
size_t GetAllelesCount (void) const
 
TAlleleIndex GetAlleleStrIndex (size_t index) const
 
TExtraIndex GetExtraIndex (void) const
 
CUser_field::TData::E_Choice GetQualityCodesWhich (void) const
 
TQualityCodesIndex GetQualityCodesStrIndex (void) const
 
TQualityCodesIndex GetQualityCodesOsIndex (void) const
 
bool HasLabel (const CSeq_annot_SNP_Info &info) const
 
string GetLabel (const CSeq_annot_SNP_Info &info) const
 

Public Attributes

TSeqPos m_ToPosition
 
TSNPId m_SNP_Id
 
TFlags m_Flags
 
TPositionDelta m_PositionDelta
 
TCommentIndex m_CommentIndex
 
TWeight m_Weight
 
TExtraIndex m_ExtraIndex
 
TQualityCodesIndex m_QualityCodesIndex
 
TAlleleIndex m_AllelesIndices [kMax_AllelesCount]
 

Static Public Attributes

static const char *const s_SNP_Type_Label [eSNP_Type_last]
 

Detailed Description

Definition at line 53 of file snp_info.hpp.

Member Typedef Documentation

◆ TAlleleIndex

Definition at line 152 of file snp_info.hpp.

◆ TCommentIndex

Definition at line 127 of file snp_info.hpp.

◆ TExtraIndex

Definition at line 139 of file snp_info.hpp.

◆ TFlags

Definition at line 158 of file snp_info.hpp.

◆ TPositionDelta

Definition at line 123 of file snp_info.hpp.

◆ TQualityCodesIndex

Definition at line 144 of file snp_info.hpp.

◆ TRange

Definition at line 56 of file snp_info.hpp.

◆ TSNPId

Definition at line 122 of file snp_info.hpp.

◆ TWeight

Definition at line 132 of file snp_info.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMax_PositionDelta 

Definition at line 124 of file snp_info.hpp.

◆ anonymous enum

anonymous enum
Enumerator
kNo_CommentIndex 
kMax_CommentIndex 

Definition at line 128 of file snp_info.hpp.

◆ anonymous enum

anonymous enum
Enumerator
fwWeightQual 
fwWeightExt 
fWeightFlagBits 
kMax_Weight 

Definition at line 133 of file snp_info.hpp.

◆ anonymous enum

anonymous enum
Enumerator
kNo_ExtraIndex 
kMax_ExtraIndex 

Definition at line 140 of file snp_info.hpp.

◆ anonymous enum

anonymous enum
Enumerator
kNo_QualityCodesIndex 
kMax_QualityCodesIndex 

Definition at line 145 of file snp_info.hpp.

◆ anonymous enum

anonymous enum
Enumerator
kMax_AllelesCount 

Definition at line 149 of file snp_info.hpp.

◆ anonymous enum

anonymous enum
Enumerator
kNo_AlleleIndex 
kMax_AlleleIndex 

Definition at line 153 of file snp_info.hpp.

◆ ESNP_Type

Enumerator
eSNP_Simple 
eSNP_Bad_WrongMemberSet 
eSNP_Bad_WrongTextId 
eSNP_Complex_CommentTooBig 
eSNP_Complex_CommentIndexOverflow 
eSNP_Complex_LocationIsNotPoint 
eSNP_Complex_LocationIsNotGi 
eSNP_Complex_LocationGiIsBad 
eSNP_Complex_LocationStrandIsBad 
eSNP_Complex_IdCountTooLarge 
eSNP_Complex_IdCountIsNotOne 
eSNP_Complex_AlleleTooBig 
eSNP_Complex_AlleleIndexOverflow 
eSNP_Complex_AlleleCountTooLarge 
eSNP_Complex_WeightBadValue 
eSNP_Complex_WeightCountIsNotOne 
eSNP_Complex_BadQAdata 
eSNP_Complex_NoPlaceForQAdata 
eSNP_Complex_QAdataIndexOverflow 
eSNP_Type_last 

Definition at line 72 of file snp_info.hpp.

◆ FFlags

Enumerator
fRemoved 
fPlusStrand 
fMinusStrand 
fFuzzLimTr 
fAlleleReplace 
fQualityCodesStr 
fQualityCodesOs 
fQualityCodesMask 

Definition at line 159 of file snp_info.hpp.

Member Function Documentation

◆ CreateSeq_feat()

CRef< CSeq_feat > SSNP_Info::CreateSeq_feat ( const CSeq_annot_SNP_Info annot_info) const

Definition at line 755 of file snp_annot_info.cpp.

References x_CreateSeq_feat(), and x_UpdateSeq_feat().

◆ GetAllelesCount()

size_t SSNP_Info::GetAllelesCount ( void  ) const

◆ GetAlleleStrIndex()

SSNP_Info::TAlleleIndex SSNP_Info::GetAlleleStrIndex ( size_t  index) const
inline

Definition at line 274 of file snp_info.hpp.

References _ASSERT, GetAllelesCount(), and m_AllelesIndices.

◆ GetExtraIndex()

SSNP_Info::TExtraIndex SSNP_Info::GetExtraIndex ( void  ) const
inline

Definition at line 289 of file snp_info.hpp.

References m_ExtraIndex.

◆ GetFrom()

TSeqPos SSNP_Info::GetFrom ( void  ) const
inline

Definition at line 197 of file snp_info.hpp.

References m_PositionDelta, and m_ToPosition.

Referenced by CAnnotObject_Ref::CAnnotObject_Ref(), and NotThis().

◆ GetLabel()

string SSNP_Info::GetLabel ( const CSeq_annot_SNP_Info info) const

◆ GetQualityCodesOsIndex()

SSNP_Info::TQualityCodesIndex SSNP_Info::GetQualityCodesOsIndex ( void  ) const
inline

Definition at line 304 of file snp_info.hpp.

References _ASSERT, fQualityCodesOs, m_Flags, and m_QualityCodesIndex.

◆ GetQualityCodesStrIndex()

SSNP_Info::TQualityCodesIndex SSNP_Info::GetQualityCodesStrIndex ( void  ) const
inline

Definition at line 296 of file snp_info.hpp.

References _ASSERT, fQualityCodesStr, m_Flags, and m_QualityCodesIndex.

◆ GetQualityCodesWhich()

CUser_field::TData::E_Choice SSNP_Info::GetQualityCodesWhich ( void  ) const

◆ GetTo()

TSeqPos SSNP_Info::GetTo ( void  ) const
inline

Definition at line 204 of file snp_info.hpp.

References m_ToPosition.

Referenced by CAnnotObject_Ref::CAnnotObject_Ref(), and NoMore().

◆ HasAlleles()

bool SSNP_Info::HasAlleles ( void  ) const
inline

Definition at line 267 of file snp_info.hpp.

References kNo_AlleleIndex, and m_AllelesIndices.

Referenced by HasLabel().

◆ HasLabel()

bool SSNP_Info::HasLabel ( const CSeq_annot_SNP_Info info) const
inline

Definition at line 282 of file snp_info.hpp.

References HasAlleles().

Referenced by CSeq_annot_SNP_Info::HasLabel().

◆ IsRemoved()

bool SSNP_Info::IsRemoved ( void  ) const
inline

Definition at line 225 of file snp_info.hpp.

References fRemoved, and m_Flags.

Referenced by CSeq_feat_Handle::IsRemoved().

◆ MinusStrand()

bool SSNP_Info::MinusStrand ( void  ) const
inline

◆ NoMore()

bool SSNP_Info::NoMore ( const TRange range) const
inline

◆ NotThis()

bool SSNP_Info::NotThis ( const TRange range) const
inline

Definition at line 260 of file snp_info.hpp.

References GetFrom(), and compile_time_bits::range().

Referenced by CAnnot_Collector::x_SearchObjects().

◆ operator<() [1/2]

bool SSNP_Info::operator< ( const SSNP_Info snp) const
inline

Definition at line 232 of file snp_info.hpp.

References m_ToPosition.

◆ operator<() [2/2]

bool SSNP_Info::operator< ( TSeqPos  end_position) const
inline

Definition at line 239 of file snp_info.hpp.

References m_ToPosition.

◆ ParseSeq_feat()

SSNP_Info::ESNP_Type SSNP_Info::ParseSeq_feat ( const CSeq_feat feat,
CSeq_annot_SNP_Info annot_info 
)

Definition at line 153 of file snp_annot_info.cpp.

References data, delta(), CObject_id_Base::e_Id, CSeqFeatData_Base::e_Imp, CUser_field_Base::C_Data::e_Int, CSeq_loc_Base::e_Int, CUser_field_Base::C_Data::e_Os, CSeq_loc_Base::e_Pnt, CObject_id_Base::e_Str, CUser_field_Base::C_Data::e_Str, CInt_fuzz_Base::eLim_tr, eNa_strand_minus, eNa_strand_plus, eNa_strand_unknown, eSNP_Bad_WrongMemberSet, eSNP_Bad_WrongTextId, eSNP_Complex_AlleleCountTooLarge, eSNP_Complex_AlleleIndexOverflow, eSNP_Complex_AlleleTooBig, eSNP_Complex_BadQAdata, eSNP_Complex_CommentIndexOverflow, eSNP_Complex_CommentTooBig, eSNP_Complex_IdCountIsNotOne, eSNP_Complex_IdCountTooLarge, eSNP_Complex_LocationGiIsBad, eSNP_Complex_LocationIsNotPoint, eSNP_Complex_LocationStrandIsBad, eSNP_Complex_NoPlaceForQAdata, eSNP_Complex_QAdataIndexOverflow, eSNP_Complex_WeightBadValue, eSNP_Complex_WeightCountIsNotOne, eSNP_Simple, fAlleleReplace, fFuzzLimTr, fMinusStrand, fPlusStrand, fQualityCodesMask, fQualityCodesOs, fQualityCodesStr, fWeightFlagBits, fwWeightExt, fwWeightQual, CSeq_feat_Base::GetComment(), CUser_field_Base::GetData(), CUser_object_Base::GetData(), CSeq_feat_Base::GetData(), CDbtag_Base::GetDb(), CSeq_feat_Base::GetDbxref(), CSeq_feat_Base::GetExt(), CSeq_interval_Base::GetFrom(), CSeq_point_Base::GetFuzz(), CSeq_interval_Base::GetId(), CSeq_point_Base::GetId(), CUser_field_Base::C_Data::GetInt(), CSeq_loc_Base::GetInt(), CImp_feat_Base::GetKey(), CUser_field_Base::GetLabel(), CInt_fuzz_Base::GetLim(), CSeq_feat_Base::GetLocation(), CUser_field_Base::C_Data::GetOs(), CSeq_loc_Base::GetPnt(), CSeq_point_Base::GetPoint(), CGb_qual_Base::GetQual(), CSeq_feat_Base::GetQual(), CObject_id_Base::GetStr(), CUser_field_Base::C_Data::GetStr(), CSeq_interval_Base::GetStrand(), CSeq_loc::GetStrand(), CDbtag_Base::GetTag(), CSeq_interval_Base::GetTo(), CUser_object_Base::GetType(), CGb_qual_Base::GetVal(), i, int, CInt_fuzz_Base::IsLim(), CSeq_feat_Base::IsSetCit(), CSeq_feat_Base::IsSetComment(), CSeq_feat_Base::IsSetDbxref(), CImp_feat_Base::IsSetDescr(), CSeq_feat_Base::IsSetExcept(), CSeq_feat_Base::IsSetExcept_text(), CSeq_feat_Base::IsSetExp_ev(), CSeq_feat_Base::IsSetExt(), CSeq_point_Base::IsSetFuzz(), CSeq_interval_Base::IsSetFuzz_from(), CSeq_interval_Base::IsSetFuzz_to(), CSeq_feat_Base::IsSetId(), CImp_feat_Base::IsSetLoc(), CUser_field_Base::IsSetNum(), CSeq_feat_Base::IsSetPartial(), CSeq_feat_Base::IsSetProduct(), CSeq_feat_Base::IsSetPseudo(), CSeq_feat_Base::IsSetQual(), CSeq_interval_Base::IsSetStrand(), CSeq_point_Base::IsSetStrand(), CSeq_feat_Base::IsSetTitle(), CSeq_feat_Base::IsSetXref(), CUser_field_Base::C_Data::IsStr(), ITERATE, kId_allele, kId_dbSNP, kId_dbSnpQAdata, kId_dbSnpSynonymyData, kId_Extra, kId_QualityCodes, kId_replace, kId_variation, kId_weight, kMax_AlleleLength, kMax_AllelesCount, kMax_CommentLength, kMax_PositionDelta, kMax_Weight, kNo_AlleleIndex, kNo_CommentIndex, kNo_ExtraIndex, kNo_QualityCodesIndex, kVal_1, m_AllelesIndices, m_CommentIndex, m_ExtraIndex, m_Flags, m_PositionDelta, m_QualityCodesIndex, m_SNP_Id, m_ToPosition, m_Weight, NStr::StringToInt(), tag, rapidjson::value, CObject_id_Base::Which(), CUser_field_Base::C_Data::Which(), CSeq_loc_Base::Which(), CSeq_annot_SNP_Info::x_CheckId(), CSeq_annot_SNP_Info::x_GetAlleleIndex(), CSeq_annot_SNP_Info::x_GetCommentIndex(), CSeq_annot_SNP_Info::x_GetExtraIndex(), and CSeq_annot_SNP_Info::x_GetQualityCodesIndex().

◆ PlusStrand()

bool SSNP_Info::PlusStrand ( void  ) const
inline

Definition at line 211 of file snp_info.hpp.

References fPlusStrand, and m_Flags.

Referenced by CAnnotObject_Ref::CAnnotObject_Ref(), and x_UpdateSeq_feat().

◆ UpdateSeq_feat() [1/2]

void SSNP_Info::UpdateSeq_feat ( CRef< CSeq_feat > &  seq_feat,
const CSeq_annot_SNP_Info annot_info 
) const

◆ UpdateSeq_feat() [2/2]

void SSNP_Info::UpdateSeq_feat ( CRef< CSeq_feat > &  seq_feat,
CRef< CSeq_point > &  seq_point,
CRef< CSeq_interval > &  seq_interval,
const CSeq_annot_SNP_Info annot_info 
) const

◆ x_CreateSeq_feat()

CRef< CSeq_feat > SSNP_Info::x_CreateSeq_feat ( void  ) const

◆ x_UpdateSeq_feat() [1/2]

void SSNP_Info::x_UpdateSeq_feat ( CSeq_feat feat,
const CSeq_annot_SNP_Info annot_info 
) const

◆ x_UpdateSeq_feat() [2/2]

void SSNP_Info::x_UpdateSeq_feat ( CSeq_feat feat,
CRef< CSeq_point > &  seq_point,
CRef< CSeq_interval > &  seq_interval,
const CSeq_annot_SNP_Info annot_info 
) const

◆ x_UpdateSeq_featData()

void SSNP_Info::x_UpdateSeq_featData ( CSeq_feat feat,
const CSeq_annot_SNP_Info annot_info 
) const

Member Data Documentation

◆ m_AllelesIndices

TAlleleIndex SSNP_Info::m_AllelesIndices[kMax_AllelesCount]

◆ m_CommentIndex

TCommentIndex SSNP_Info::m_CommentIndex

◆ m_ExtraIndex

TExtraIndex SSNP_Info::m_ExtraIndex

◆ m_Flags

TFlags SSNP_Info::m_Flags

◆ m_PositionDelta

TPositionDelta SSNP_Info::m_PositionDelta

Definition at line 184 of file snp_info.hpp.

Referenced by GetFrom(), ParseSeq_feat(), and x_UpdateSeq_feat().

◆ m_QualityCodesIndex

TQualityCodesIndex SSNP_Info::m_QualityCodesIndex

◆ m_SNP_Id

TSNPId SSNP_Info::m_SNP_Id

Definition at line 182 of file snp_info.hpp.

Referenced by CSeq_feat_Handle::GetSNPId(), ParseSeq_feat(), and x_UpdateSeq_featData().

◆ m_ToPosition

TSeqPos SSNP_Info::m_ToPosition

Definition at line 181 of file snp_info.hpp.

Referenced by GetFrom(), GetTo(), operator<(), operator<(), ParseSeq_feat(), and x_UpdateSeq_feat().

◆ m_Weight

TWeight SSNP_Info::m_Weight

◆ s_SNP_Type_Label

const char *const SSNP_Info::s_SNP_Type_Label
static
Initial value:
= {
"simple",
"bad - wrong member set",
"bad - wrong text id",
"complex - comment too big",
"complex - comment index overflow",
"complex - location is not point",
"complex - location is not gi",
"complex - location gi is bad",
"complex - location strand is bad",
"complex - id count is too large",
"complex - id count is not one",
"complex - allele length is too big",
"complex - allele index overflow",
"complex - allele count is too large",
"complex - weight has bad value",
"complex - weight count is not one",
"complex - bad format of dbSnpQAdata",
"complex - no place for dbSnpQAdata",
"complex - dbSnpQAdata index overflow"
}

Definition at line 95 of file snp_info.hpp.


The documentation for this struct was generated from the following files:
Modified on Sat May 25 14:20:37 2024 by modify_doxy.py rev. 669887