NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | List of all members
CSeq_feat Class Reference

Represents ASN.1 type Seq-feat defined in file seqfeat.asn

Search Toolkit Book for CSeq_feat

namespace ncbi::objects:: More...

#include <objects/seqfeat/Seq_feat.hpp>

+ Inheritance diagram for CSeq_feat:
+ Collaboration diagram for CSeq_feat:

Public Types

enum  EAddExt { fAddExt_ReplaceAll = 1 << 0 }
 
typedef set< CTempStringEx, PNocaseTExceptionTextSet
 Warning: This is invalidated if the underlying except_text is changed in any way. More...
 
typedef int TAddExt
 binary OR of EAddExt More...
 
- Public Types inherited from CSeq_feat_Base
enum  EExp_ev { eExp_ev_experimental = 1 , eExp_ev_not_experimental = 2 }
 evidence for existence of feature More...
 
enum class  E_memberIndex {
  e__allMandatory = 0 , e_id , e_data , e_partial ,
  e_except , e_comment , e_product , e_location ,
  e_qual , e_title , e_ext , e_cit ,
  e_exp_ev , e_xref , e_dbxref , e_pseudo ,
  e_except_text , e_ids , e_exts , e_support
}
 
typedef CFeat_id TId
 
typedef CSeqFeatData TData
 
typedef bool TPartial
 
typedef bool TExcept
 
typedef string TComment
 
typedef CSeq_loc TProduct
 
typedef CSeq_loc TLocation
 
typedef vector< CRef< CGb_qual > > TQual
 
typedef string TTitle
 
typedef CUser_object TExt
 
typedef CPub_set TCit
 
typedef EExp_ev TExp_ev
 
typedef vector< CRef< CSeqFeatXref > > TXref
 
typedef vector< CRef< CDbtag > > TDbxref
 
typedef bool TPseudo
 
typedef string TExcept_text
 
typedef list< CRef< CFeat_id > > TIds
 
typedef list< CRef< CUser_object > > TExts
 
typedef CSeqFeatSupport TSupport
 
typedef Tparent::CMemberIndex< E_memberIndex, 20 > TmemberIndex
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CSeq_feat (void)
 constructor More...
 
 ~CSeq_feat (void)
 destructor More...
 
const CGene_refGetGeneXref (void) const
 See related function in util/feature.hpp. More...
 
void SetGeneXref (CGene_ref &value)
 
CGene_refSetGeneXref (void)
 
const CProt_refGetProtXref (void) const
 get protein (if present) from Seq-feat.xref list More...
 
void SetProtXref (CProt_ref &value)
 
CProt_refSetProtXref (void)
 
bool HasSeqFeatXref (const CSeqFeatXref::TId &id) const
 
bool AddSeqFeatXref (const CSeqFeatXref::TId &id)
 
void AddQualifier (const string &qual_name, const string &qual_val)
 Add a qualifier to this feature. More...
 
void AddOrReplaceQualifier (const string &qual_name, const string &qual_val)
 Add a qualifier to this feature, or replace the value for the first one if it already exists. More...
 
void RemoveQualifier (const string &qual_name)
 Remove all qualifiers with the given name; do nothing if no such qualifier exists. More...
 
void AddDbxref (const string &db_name, const string &db_key)
 add a DB xref to this feature More...
 
void AddDbxref (const string &db_name, int db_key)
 
void AddExceptText (const string &exception_text)
 Add the given exception_text and set the except flag to true. More...
 
void RemoveExceptText (const string &exception_text)
 Remove all instances of the given exception text in this feature, and reset the except flag if there are no exception texts left. More...
 
CConstRef< CDbtagGetNamedDbxref (const CTempString &db) const
 Return a specified DB xref. More...
 
const stringGetNamedQual (const CTempString &qual_name) const
 Return a named qualifier. More...
 
AutoPtr< TExceptionTextSetGetTempExceptionTextSet (void) const
 Returns a case-insensitive set of exception texts. More...
 
bool HasExceptionText (const string &exception_text) const
 Returns whether or not the given exception_text is set for this feature. More...
 
int Compare (const CSeq_feat &f2) const
 Compare relative order of this feature and feature f2, ordering first by features' coordinates, by importance of their type, by complexity of location, and by some other fields depending on their types. More...
 
int Compare (const CSeq_feat &f2, const CSeq_loc &mapped1, const CSeq_loc &mapped2) const
 
int CompareStrict (const CSeq_feat &f2) const
 Compare features more thoroughly than Compare() - return zero only if the features are identical, otherwise use ASN.1 text representation to compare features. More...
 
int CompareNonLocation (const CSeq_feat &f2, const CSeq_loc &loc1, const CSeq_loc &loc2) const
 Compare relative order of this feature and feature f2 similarily to the Compare() method, assuming their locations are already compared as unordered. More...
 
int GetTypeSortingOrder (void) const
 Return relative importance order of features by their type. More...
 
CConstRef< CUser_objectFindExt (const string &ext_type) const
 Find extension by type in exts container. More...
 
CRef< CUser_objectFindExt (const string &ext_type)
 Non-const version of FindExt(). More...
 
void AddExt (CRef< CUser_object > ext, TAddExt add_flags=0)
 Add an extension by type in exts container. More...
 
void RemoveExt (const string &ext_type)
 Remove all Exts with the given type. More...
 
- Public Member Functions inherited from CSeq_feat_Base
 CSeq_feat_Base (void)
 
virtual ~CSeq_feat_Base (void)
 
 DECLARE_INTERNAL_TYPE_INFO ()
 
bool IsSetId (void) const
 Check if a value has been assigned to Id data member. More...
 
bool CanGetId (void) const
 Check if it is safe to call GetId method. More...
 
void ResetId (void)
 Reset Id data member. More...
 
const TIdGetId (void) const
 Get the Id member data. More...
 
void SetId (TId &value)
 Assign a value to Id data member. More...
 
TIdSetId (void)
 Assign a value to Id data member. More...
 
bool IsSetData (void) const
 the specific data Check if a value has been assigned to Data data member. More...
 
bool CanGetData (void) const
 Check if it is safe to call GetData method. More...
 
void ResetData (void)
 Reset Data data member. More...
 
const TDataGetData (void) const
 Get the Data member data. More...
 
void SetData (TData &value)
 Assign a value to Data data member. More...
 
TDataSetData (void)
 Assign a value to Data data member. More...
 
bool IsSetPartial (void) const
 incomplete in some way? Check if a value has been assigned to Partial data member. More...
 
bool CanGetPartial (void) const
 Check if it is safe to call GetPartial method. More...
 
void ResetPartial (void)
 Reset Partial data member. More...
 
TPartial GetPartial (void) const
 Get the Partial member data. More...
 
void SetPartial (TPartial value)
 Assign a value to Partial data member. More...
 
TPartialSetPartial (void)
 Assign a value to Partial data member. More...
 
bool IsSetExcept (void) const
 something funny about this? Check if a value has been assigned to Except data member. More...
 
bool CanGetExcept (void) const
 Check if it is safe to call GetExcept method. More...
 
void ResetExcept (void)
 Reset Except data member. More...
 
TExcept GetExcept (void) const
 Get the Except member data. More...
 
void SetExcept (TExcept value)
 Assign a value to Except data member. More...
 
TExceptSetExcept (void)
 Assign a value to Except data member. More...
 
bool IsSetComment (void) const
 Check if a value has been assigned to Comment data member. More...
 
bool CanGetComment (void) const
 Check if it is safe to call GetComment method. More...
 
void ResetComment (void)
 Reset Comment data member. More...
 
const TCommentGetComment (void) const
 Get the Comment member data. More...
 
void SetComment (const TComment &value)
 Assign a value to Comment data member. More...
 
void SetComment (TComment &&value)
 
TCommentSetComment (void)
 Assign a value to Comment data member. More...
 
bool IsSetProduct (void) const
 product of process Check if a value has been assigned to Product data member. More...
 
bool CanGetProduct (void) const
 Check if it is safe to call GetProduct method. More...
 
void ResetProduct (void)
 Reset Product data member. More...
 
const TProductGetProduct (void) const
 Get the Product member data. More...
 
void SetProduct (TProduct &value)
 Assign a value to Product data member. More...
 
TProductSetProduct (void)
 Assign a value to Product data member. More...
 
bool IsSetLocation (void) const
 feature made from Check if a value has been assigned to Location data member. More...
 
bool CanGetLocation (void) const
 Check if it is safe to call GetLocation method. More...
 
void ResetLocation (void)
 Reset Location data member. More...
 
const TLocationGetLocation (void) const
 Get the Location member data. More...
 
void SetLocation (TLocation &value)
 Assign a value to Location data member. More...
 
TLocationSetLocation (void)
 Assign a value to Location data member. More...
 
bool IsSetQual (void) const
 qualifiers Check if a value has been assigned to Qual data member. More...
 
bool CanGetQual (void) const
 Check if it is safe to call GetQual method. More...
 
void ResetQual (void)
 Reset Qual data member. More...
 
const TQualGetQual (void) const
 Get the Qual member data. More...
 
TQualSetQual (void)
 Assign a value to Qual data member. More...
 
bool IsSetTitle (void) const
 for user defined label Check if a value has been assigned to Title data member. More...
 
bool CanGetTitle (void) const
 Check if it is safe to call GetTitle method. More...
 
void ResetTitle (void)
 Reset Title data member. More...
 
const TTitleGetTitle (void) const
 Get the Title member data. More...
 
void SetTitle (const TTitle &value)
 Assign a value to Title data member. More...
 
void SetTitle (TTitle &&value)
 
TTitleSetTitle (void)
 Assign a value to Title data member. More...
 
bool IsSetExt (void) const
 user defined structure extension Check if a value has been assigned to Ext data member. More...
 
bool CanGetExt (void) const
 Check if it is safe to call GetExt method. More...
 
void ResetExt (void)
 Reset Ext data member. More...
 
const TExtGetExt (void) const
 Get the Ext member data. More...
 
void SetExt (TExt &value)
 Assign a value to Ext data member. More...
 
TExtSetExt (void)
 Assign a value to Ext data member. More...
 
bool IsSetCit (void) const
 citations for this feature Check if a value has been assigned to Cit data member. More...
 
bool CanGetCit (void) const
 Check if it is safe to call GetCit method. More...
 
void ResetCit (void)
 Reset Cit data member. More...
 
const TCitGetCit (void) const
 Get the Cit member data. More...
 
void SetCit (TCit &value)
 Assign a value to Cit data member. More...
 
TCitSetCit (void)
 Assign a value to Cit data member. More...
 
bool IsSetExp_ev (void) const
 Check if a value has been assigned to Exp_ev data member. More...
 
bool CanGetExp_ev (void) const
 Check if it is safe to call GetExp_ev method. More...
 
void ResetExp_ev (void)
 Reset Exp_ev data member. More...
 
TExp_ev GetExp_ev (void) const
 Get the Exp_ev member data. More...
 
void SetExp_ev (TExp_ev value)
 Assign a value to Exp_ev data member. More...
 
TExp_evSetExp_ev (void)
 Assign a value to Exp_ev data member. More...
 
bool IsSetXref (void) const
 cite other relevant features Check if a value has been assigned to Xref data member. More...
 
bool CanGetXref (void) const
 Check if it is safe to call GetXref method. More...
 
void ResetXref (void)
 Reset Xref data member. More...
 
const TXrefGetXref (void) const
 Get the Xref member data. More...
 
TXrefSetXref (void)
 Assign a value to Xref data member. More...
 
bool IsSetDbxref (void) const
 support for xref to other databases Check if a value has been assigned to Dbxref data member. More...
 
bool CanGetDbxref (void) const
 Check if it is safe to call GetDbxref method. More...
 
void ResetDbxref (void)
 Reset Dbxref data member. More...
 
const TDbxrefGetDbxref (void) const
 Get the Dbxref member data. More...
 
TDbxrefSetDbxref (void)
 Assign a value to Dbxref data member. More...
 
bool IsSetPseudo (void) const
 annotated on pseudogene? Check if a value has been assigned to Pseudo data member. More...
 
bool CanGetPseudo (void) const
 Check if it is safe to call GetPseudo method. More...
 
void ResetPseudo (void)
 Reset Pseudo data member. More...
 
TPseudo GetPseudo (void) const
 Get the Pseudo member data. More...
 
void SetPseudo (TPseudo value)
 Assign a value to Pseudo data member. More...
 
TPseudoSetPseudo (void)
 Assign a value to Pseudo data member. More...
 
bool IsSetExcept_text (void) const
 explain if except=TRUE Check if a value has been assigned to Except_text data member. More...
 
bool CanGetExcept_text (void) const
 Check if it is safe to call GetExcept_text method. More...
 
void ResetExcept_text (void)
 Reset Except_text data member. More...
 
const TExcept_textGetExcept_text (void) const
 Get the Except_text member data. More...
 
void SetExcept_text (const TExcept_text &value)
 Assign a value to Except_text data member. More...
 
void SetExcept_text (TExcept_text &&value)
 
TExcept_textSetExcept_text (void)
 Assign a value to Except_text data member. More...
 
bool IsSetIds (void) const
 set of Ids; will replace 'id' field Check if a value has been assigned to Ids data member. More...
 
bool CanGetIds (void) const
 Check if it is safe to call GetIds method. More...
 
void ResetIds (void)
 Reset Ids data member. More...
 
const TIdsGetIds (void) const
 Get the Ids member data. More...
 
TIdsSetIds (void)
 Assign a value to Ids data member. More...
 
bool IsSetExts (void) const
 set of extensions; will replace 'ext' field Check if a value has been assigned to Exts data member. More...
 
bool CanGetExts (void) const
 Check if it is safe to call GetExts method. More...
 
void ResetExts (void)
 Reset Exts data member. More...
 
const TExtsGetExts (void) const
 Get the Exts member data. More...
 
TExtsSetExts (void)
 Assign a value to Exts data member. More...
 
bool IsSetSupport (void) const
 will replace /experiment, /inference, model-evidence Check if a value has been assigned to Support data member. More...
 
bool CanGetSupport (void) const
 Check if it is safe to call GetSupport method. More...
 
void ResetSupport (void)
 Reset Support data member. More...
 
const TSupportGetSupport (void) const
 Get the Support member data. More...
 
void SetSupport (TSupport &value)
 Assign a value to Support data member. More...
 
TSupportSetSupport (void)
 Assign a value to Support 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 CTypeInfoGetThisTypeInfo (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 stringGetNamespaceName (void) const
 Get namespace name. More...
 
bool HasNamespacePrefix (void) const
 Check if data type has namespace prefix. More...
 
const stringGetNamespacePrefix (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...
 
CObjectoperator= (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
 
- Public Member Functions inherited from ISeq_feat
virtual ~ISeq_feat (void)
 

Static Public Member Functions

static vector< stringGetListOfLegalExceptions (bool include_refseq)
 Produces the list of legal exceptions. More...
 
static bool IsExceptionTextInLegalList (const string &exception_text, bool allow_refseq)
 Indicates whether this specific text occurs in the list of legal exceptions. More...
 
static bool IsExceptionTextRefSeqOnly (const string &exception_text)
 Indicates whether this specific text is a RefSeq-only exception. More...
 
static int GetTypeSortingOrder (CSeqFeatData::E_Choice type)
 
- Static Public Member Functions inherited from CSeq_feat_Base
static const NCBI_NS_NCBI::CEnumeratedTypeValues *ENUM_METHOD_NAME() EExp_ev (void)
 Access to EExp_ev's attributes (values, names) as defined in spec. More...
 
- Static Public Member Functions inherited from CSerialObject
static void SetVerifyDataThread (ESerialVerifyData verify)
 
static void SetVerifyDataGlobal (ESerialVerifyData verify)
 
static string UnassignedString (void)
 
static CStringUTF8 UnassignedStringUTF8 (void)
 
static char UnassignedByte (void)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 

Private Types

typedef CSeq_feat_Base Tparent
 

Private Member Functions

 CSeq_feat (const CSeq_feat &value)
 Prohibit copy constructor and assignment operator. More...
 
CSeq_featoperator= (const CSeq_feat &value)
 

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...
 

Detailed Description

namespace ncbi::objects::

Definition at line 56 of file Seq_feat.hpp.

Member Typedef Documentation

◆ TAddExt

binary OR of EAddExt

Definition at line 196 of file Seq_feat.hpp.

◆ TExceptionTextSet

Warning: This is invalidated if the underlying except_text is changed in any way.

Definition at line 132 of file Seq_feat.hpp.

◆ Tparent

Definition at line 59 of file Seq_feat.hpp.

Member Enumeration Documentation

◆ EAddExt

Enumerator
fAddExt_ReplaceAll 

Before adding, remove all previous.

Definition at line 193 of file Seq_feat.hpp.

Constructor & Destructor Documentation

◆ CSeq_feat() [1/2]

CSeq_feat::CSeq_feat ( void  )
inline

constructor

Definition at line 225 of file Seq_feat.hpp.

◆ ~CSeq_feat()

CSeq_feat::~CSeq_feat ( void  )

destructor

Definition at line 54 of file Seq_feat.cpp.

◆ CSeq_feat() [2/2]

CSeq_feat::CSeq_feat ( const CSeq_feat value)
private

Prohibit copy constructor and assignment operator.

Member Function Documentation

◆ AddDbxref() [1/2]

void CSeq_feat::AddDbxref ( const string db_name,
const string db_key 
)

add a DB xref to this feature

Definition at line 347 of file Seq_feat.cpp.

References CDbtag_Base::SetDb(), CSeq_feat_Base::SetDbxref(), CDbtag_Base::SetTag(), and tag.

Referenced by SGeneCdsmRnaFeats::s_CreateDBXref().

◆ AddDbxref() [2/2]

void CSeq_feat::AddDbxref ( const string db_name,
int  db_key 
)

◆ AddExceptText()

void CSeq_feat::AddExceptText ( const string exception_text)

Add the given exception_text and set the except flag to true.

If the exception_text is already there, it just sets the except flag.

Definition at line 364 of file Seq_feat.cpp.

References HasExceptionText(), CSeq_feat_Base::IsSetExcept_text(), CSeq_feat_Base::SetExcept(), CSeq_feat_Base::SetExcept_text(), and NStr::TruncateSpaces().

◆ AddExt()

void CSeq_feat::AddExt ( CRef< CUser_object ext,
TAddExt  add_flags = 0 
)

Add an extension by type in exts container.

Note that it's always added to the Exts field, never the Ext field. Also, it does not check for dups.

Parameters
extThe ext to be added. It will NOT be copied.

Definition at line 631 of file Seq_feat.cpp.

References fAddExt_ReplaceAll, CObject_id_Base::GetStr(), CUser_object_Base::GetType(), CUser_object_Base::IsSetType(), CObject_id_Base::IsStr(), NCBI_USER_THROW, RemoveExt(), and CSeq_feat_Base::SetExts().

Referenced by CFeatureGenerator::SImplementation::x_CreateProteinBioseq(), and CFeatureGenerator::SImplementation::x_SetComment().

◆ AddOrReplaceQualifier()

void CSeq_feat::AddOrReplaceQualifier ( const string qual_name,
const string qual_val 
)

◆ AddQualifier()

void CSeq_feat::AddQualifier ( const string qual_name,
const string qual_val 
)

Add a qualifier to this feature.

Definition at line 291 of file Seq_feat.cpp.

References CGb_qual_Base::SetQual(), CSeq_feat_Base::SetQual(), and CGb_qual_Base::SetVal().

Referenced by AddGoodImpFeat(), CExonFromCds::AddIntron(), AddOrReplaceQualifier(), BOOST_AUTO_TEST_CASE(), CExonFromCds::GetCommand(), C5ColImportData::Initialize(), CMacroFunction_AddorSetContElement::s_AddGBQualifier(), s_TestOneWrongQual(), CEditingActionFeatGbQual::SetValue(), CEditingActionFeatDualVal1::SetValue(), CEditingActionFeatDualVal2::SetValue(), CEditingActionFeatCodonsRecognized::SetValue(), CEditingActionFeatAnticodon::SetValue(), CEditingActionFeatTranslExcept::SetValue(), CEditingActionFeatRnaQual::SetValue(), CEditingActionFeatRegion::SetValue(), CEditingActionFeatCodonStart::SetValue(), CEditingActionFeatTranslTable::SetValue(), CEditingActionFeatDesc::SetValue(), CEditingActionFeatLocus_tag::SetValue(), CEditingActionFeatMaploc::SetValue(), CEditingActionFeatSynonym::SetValue(), CEditingActionFeatAllele::SetValue(), CEditingActionFeatActivity::SetValue(), CEditingActionFeatTranslation::SetValue(), CEditingActionFeatEcNumber::SetValue(), CEditingActionFeatFunction::SetValue(), CEditingActionFeatProduct::SetValue(), CEditingActionFeatGeneLocus::SetValue(), CEditingActionFeatTranscriptId::SetValue(), CFeatTableEdit::SubmitFixProducts(), CFeatureCreateDialog::TransferDataFromWindow(), CNewCleanup_imp::x_AddReplaceQual(), CGtfReader::xFeatureAddQualifiers(), CGtfAnnotAssembler::xFeatureSetQualifiers(), CGff3ImportData::xInitializeAttributes(), CGff3ImportData::xInitializeMultiValue(), CGff3AnnotAssembler::xMarkLocationPending(), CGff2Record::xMigrateAttributeDefault(), and CGff2Record::xMigrateAttributeSingle().

◆ AddSeqFeatXref()

bool CSeq_feat::AddSeqFeatXref ( const CSeqFeatXref::TId id)

◆ Compare() [1/2]

int CSeq_feat::Compare ( const CSeq_feat f2) const
inline

Compare relative order of this feature and feature f2, ordering first by features' coordinates, by importance of their type, by complexity of location, and by some other fields depending on their types.

Return a value < 0 if this feature should come before f2. Return a value > 0 if this feature should come after f2. Return zero if the features are unordered. Note, that zero value doesn't mean that the features are identical.

Definition at line 242 of file Seq_feat.hpp.

References CSeq_feat_Base::GetLocation().

Referenced by CompareStrict(), CCdsToMatPeptide::FindAnnot(), SFeats_OpLess::operator()(), SFeatSortPredicate::operator()(), CMatchFeat::operator<(), and operator<().

◆ Compare() [2/2]

int CSeq_feat::Compare ( const CSeq_feat f2,
const CSeq_loc mapped1,
const CSeq_loc mapped2 
) const
inline

◆ CompareNonLocation()

int CSeq_feat::CompareNonLocation ( const CSeq_feat f2,
const CSeq_loc loc1,
const CSeq_loc loc2 
) const

Compare relative order of this feature and feature f2 similarily to the Compare() method, assuming their locations are already compared as unordered.

The features' locations are still needed because the order depends also on complexity of location (mix or not, etc). The features are assumed to have location as given in arguments: loc1 - location of this feature, loc2 - location of feature f2. This method is useful if features are mapped to a master sequence, so their location are changed after mapping. Return a value < 0 if this feature should come before f2. Return a value > 0 if this feature should come after f2. Return zero if the features are unordered. Note, that zero value doesn't mean that the features are identical.

Definition at line 103 of file Seq_feat.cpp.

References _ASSERT, NStr::CompareNocase(), CSeq_loc::CompareSubLoc(), CSeqFeatData_Base::e_Cdregion, CSeqFeatData_Base::e_Imp, CSeq_feat_Base::GetData(), CSeqFeatData_Base::GetImp(), CImp_feat_Base::GetKey(), CSeq_loc::GetStrand(), CSeqFeatData::GetSubtype(), GetTypeSortingOrder(), IsReverse(), s_GetCdregionOrder(), s_IsOperon(), and CSeqFeatData_Base::Which().

Referenced by Compare().

◆ CompareStrict()

int CSeq_feat::CompareStrict ( const CSeq_feat f2) const

Compare features more thoroughly than Compare() - return zero only if the features are identical, otherwise use ASN.1 text representation to compare features.

Definition at line 170 of file Seq_feat.cpp.

References Compare(), and MSerial_AsnText.

◆ FindExt() [1/2]

CRef< CUser_object > CSeq_feat::FindExt ( const string ext_type)

◆ FindExt() [2/2]

CConstRef< CUser_object > CSeq_feat::FindExt ( const string ext_type) const

Find extension by type in exts container.

Parameters
ext_typeString id of the extension to find.
Returns
User-object of the requested type or NULL.

Definition at line 564 of file Seq_feat.cpp.

References f(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetExt(), CSeq_feat_Base::GetExts(), CObject_id_Base::GetStr(), CSeq_feat_Base::IsSetExt(), CSeq_feat_Base::IsSetExts(), CObject_id_Base::IsStr(), ITERATE, and CConstRef< C, Locker >::Reset().

Referenced by NSnpGui::isFromVcf(), and s_GetVcfAttribute().

◆ GetGeneXref()

const CGene_ref * CSeq_feat::GetGeneXref ( void  ) const
virtual

See related function in util/feature.hpp.

void GetLabel (const CSeq_feat&, string*, ELabelType, CScope*) get gene (if present) from Seq-feat.xref list

Implements ISeq_feat.

Definition at line 181 of file Seq_feat.cpp.

References CSeq_feat_Base::GetXref(), and ITERATE.

Referenced by CGeneRefColumn::AddToFeature(), BOOST_AUTO_TEST_CASE(), CFeatureGenePanel::CreateControls(), GetBestGeneForCds(), GetBestGeneForMrna(), CSeq_feat_Handle::GetGeneXref(), GetLocusTagForFeature(), NMacroUtil::GetLocusTagFromProtRef(), GetMrnasForGene(), CEditingActionFeatLocus_tag::GetValue(), CEditingActionFeatMaploc::GetValue(), CEditingActionFeatAllele::GetValue(), CEditingActionFeatGeneLocus::GetValue(), CValidError_feat::IsOverlappingGenePseudo(), CEditingActionFeatLocus_tag::IsSetValue(), CEditingActionFeatMaploc::IsSetValue(), CEditingActionFeatAllele::IsSetValue(), CEditingActionFeatGeneLocus::IsSetValue(), CEditingActionFeatSynonym::Modify(), CGFFReader::Read(), CEditingActionFeatLocus_tag::ResetValue(), CEditingActionFeatMaploc::ResetValue(), CEditingActionFeatAllele::ResetValue(), CEditingActionFeatGeneLocus::ResetValue(), CMacroFunction_RemoveQual::s_RemoveFields(), CEditingActionFeatLocus_tag::SetValue(), CEditingActionFeatMaploc::SetValue(), CEditingActionFeatSynonym::SetValue(), CEditingActionFeatAllele::SetValue(), CEditingActionFeatGeneLocus::SetValue(), CMacroFunction_SwapQual::TheFunction(), CValidError_bioseq::ValidateBadGeneOverlap(), CImportFeatTable::x_CreateCommand(), CGFFReader::x_CreateGeneFeatures(), CFeatureTableReader_Imp::x_CreateGenesFromCDSs(), CValidErrorFormat::x_GetLocusTag(), CSingleFeatValidator::x_ValidateGeneXRef(), CSingleFeatValidator::x_ValidateLocusTagGeneralMatch(), CMRNAValidator::x_ValidateMrnaGene(), CSingleFeatValidator::x_ValidateOldLocusTag(), and CRNAValidator::x_ValidateTrnaType().

◆ GetListOfLegalExceptions()

vector< string > CSeq_feat::GetListOfLegalExceptions ( bool  include_refseq)
static

Produces the list of legal exceptions.

Note that more than one of these values might occur in Seq-feat.exception_text, separated by commas, however RefSeq-only exceptions should only appear alone.

Definition at line 526 of file Seq_feat.cpp.

Referenced by CExceptionPanel::CreateControls(), CGenericPropsPanel::CreateControls(), and CSetExceptionsTreeItemData::x_AddParamPanel().

◆ GetNamedDbxref()

CConstRef< CDbtag > CSeq_feat::GetNamedDbxref ( const CTempString db) const
virtual

◆ GetNamedQual()

const string & CSeq_feat::GetNamedQual ( const CTempString qual_name) const
virtual

Return a named qualifier.

This will return the first item matching the qualifier name. If no such qualifier is found, an empty string is returned.

Implements ISeq_feat.

Definition at line 429 of file Seq_feat.cpp.

References CSeq_feat_Base::GetQual(), CSeq_feat_Base::IsSetQual(), ITERATE, and kEmptyStr.

Referenced by AddMiscRNAFeatures(), CAutoDefMobileElementClause::CAutoDefMobileElementClause(), CAutoDefSatelliteClause::CAutoDefSatelliteClause(), CGuiObjectInfoSeq_feat::CreateObject(), CSoMap::FeatureToSoType(), TAsyncToken::FindGeneByLocusTag(), TAsyncToken::FindMrnaByQual(), GetBestCdsForMrna(), GetBestMrnaForCds(), CAutoDefFeatureClause::GetClauseType(), CFeatGlyph::GetCustomColorIdx(), CSeq_featHandler::GetLabel(), CSeq_feat_Handle::GetNamedQual(), CCdsFromGeneMrnaExon::GetNameFromExon(), CmRNAFromGeneCdsExon::GetNameFromExon(), CCdsFromGeneMrnaExon::GetNameFromGene(), CmRNAFromGeneCdsExon::GetNameFromGene(), CtRNAFromGene::GetNameFromGene(), GetRNAProductString(), CEditingActionFeatPseudo::GetValue(), CAutoDefFeatureClause::IsInsertionSequence(), CAutoDefFeatureClause::IsPromoter(), CAutoDefFeatureClause::IsSatellite(), CFeatureTableReader::MakeGap(), CGFFReader::Read(), NSearchFeatPanel::s_GetFeatureLabel(), NSearchFeatPanel::s_LabelFromQualifiers(), s_SetProtRef(), s_UnknownEstimatedLength(), CMacroFunction_SatelliteFields::TheFunction(), CMacroFunction_MobileElementTypeFields::TheFunction(), CFastaOstreamEx::x_AddMiscQualifierAttributes(), CFastaOstreamEx::x_AddPseudoGeneAttribute(), CFeatureItem::x_AddQualOperon(), CFeatureItem::x_AddQualsGene(), CFastaOstreamEx::x_AddRNAProductAttribute(), CFastaOstreamEx::x_AddTranscriptIdAttribute(), CImportFeatTable::x_CreateCommand(), CImportFeatTable::x_DoImportCDS(), CAutoDefFeatureClause::x_GetDescription(), CAutoDefFeatureClause::x_GetFeatureTypeWord(), CGuiObjectInfoSeq_feat::x_GetProductLengthRow(), CAutoDefNcRNAClause::x_GetProductName(), CSeq_featHandler::x_LabelFromQualifiers(), CGFFReader::x_SetProducts(), CGff3Reader::xFeatureSetXrefGrandParent(), CFeatTableEdit::xGenerate_mRNA_Product(), CGff2Reader::xGenerateParentChildXrefs(), CGtfReader::xPostProcessAnnot(), CGff2Reader::xSetAncestryLine(), CFeatureTableReader::xTranslateProtein(), and CBedGraphWriter::xWriteSingleFeature().

◆ GetProtXref()

const CProt_ref * CSeq_feat::GetProtXref ( void  ) const
virtual

◆ GetTempExceptionTextSet()

AutoPtr< CSeq_feat::TExceptionTextSet > CSeq_feat::GetTempExceptionTextSet ( void  ) const

Returns a case-insensitive set of exception texts.

Warning: The returned contents are invalidated if the underlying exception_text is changed in any way.

Definition at line 443 of file Seq_feat.cpp.

References NStr::fSplit_Tokenize, CSeq_feat_Base::GetExcept(), CSeq_feat_Base::GetExcept_text(), CSeq_feat_Base::IsSetExcept(), CSeq_feat_Base::IsSetExcept_text(), ITERATE, NStr::Split(), and NStr::TruncateSpaces_Unsafe().

Referenced by HasExceptionText().

◆ GetTypeSortingOrder() [1/2]

int CSeq_feat::GetTypeSortingOrder ( CSeqFeatData::E_Choice  type)
static

Definition at line 95 of file Seq_feat.cpp.

References min(), and s_TypeOrder.

◆ GetTypeSortingOrder() [2/2]

int CSeq_feat::GetTypeSortingOrder ( void  ) const
inline

Return relative importance order of features by their type.

These methods are used by Compare() and CompareNonLocation() methods.

Definition at line 249 of file Seq_feat.hpp.

References CSeq_feat_Base::GetData().

Referenced by CompareNonLocation(), and CAnnotObjectType_Less::GetTypeOrder().

◆ HasExceptionText()

bool CSeq_feat::HasExceptionText ( const string exception_text) const

Returns whether or not the given exception_text is set for this feature.

Note that it always returns false if IsExcept is set, even if there is exception text.

Parameters
exception_textThe exception text to search for.

Definition at line 464 of file Seq_feat.cpp.

References CTempString::empty(), GetTempExceptionTextSet(), and NStr::TruncateSpaces_Unsafe().

Referenced by AddExceptText(), and CCleanup::SetGeneticCodes().

◆ HasSeqFeatXref()

bool CSeq_feat::HasSeqFeatXref ( const CSeqFeatXref::TId id) const

◆ IsExceptionTextInLegalList()

bool CSeq_feat::IsExceptionTextInLegalList ( const string exception_text,
bool  allow_refseq 
)
static

Indicates whether this specific text occurs in the list of legal exceptions.

Definition at line 542 of file Seq_feat.cpp.

Referenced by CSingleFeatValidator::x_ValidateExceptText().

◆ IsExceptionTextRefSeqOnly()

bool CSeq_feat::IsExceptionTextRefSeqOnly ( const string exception_text)
static

Indicates whether this specific text is a RefSeq-only exception.

Definition at line 553 of file Seq_feat.cpp.

Referenced by CSingleFeatValidator::x_ValidateExceptText().

◆ operator=()

CSeq_feat& CSeq_feat::operator= ( const CSeq_feat value)
private

◆ RemoveExceptText()

void CSeq_feat::RemoveExceptText ( const string exception_text)

Remove all instances of the given exception text in this feature, and reset the except flag if there are no exception texts left.

Definition at line 386 of file Seq_feat.cpp.

References NStr::EqualNocase(), NStr::fSplit_Tokenize, CSeq_feat_Base::GetExcept(), CSeq_feat_Base::GetExcept_text(), CSeq_feat_Base::IsSetExcept(), CSeq_feat_Base::IsSetExcept_text(), ITERATE, CSeq_feat_Base::ResetExcept(), CSeq_feat_Base::SetExcept_text(), NStr::Split(), and NStr::TruncateSpaces_Unsafe().

◆ RemoveExt()

void CSeq_feat::RemoveExt ( const string ext_type)

Remove all Exts with the given type.

Note: Runs in linear time relative to the number of Exts total.

Parameters
ext_typeString id of the extension to find.

Definition at line 649 of file Seq_feat.cpp.

References ERASE_ITERATE, f(), CSeq_feat_Base::GetExt(), CObject_id_Base::GetStr(), CSeq_feat_Base::IsSetExt(), CSeq_feat_Base::IsSetExts(), CObject_id_Base::IsStr(), NON_CONST_ITERATE, CSeq_feat_Base::ResetExt(), CSeq_feat_Base::ResetExts(), CUser_object_Base::SetData(), CSeq_feat_Base::SetExt(), and CSeq_feat_Base::SetExts().

Referenced by AddExt().

◆ RemoveQualifier()

void CSeq_feat::RemoveQualifier ( const string qual_name)

◆ SetGeneXref() [1/2]

void CSeq_feat::SetGeneXref ( CGene_ref value)

◆ SetGeneXref() [2/2]

CGene_ref & CSeq_feat::SetGeneXref ( void  )

◆ SetProtXref() [1/2]

void CSeq_feat::SetProtXref ( CProt_ref value)

◆ SetProtXref() [2/2]

CProt_ref & CSeq_feat::SetProtXref ( void  )

The documentation for this class was generated from the following files:
Modified on Wed Apr 17 13:08:38 2024 by modify_doxy.py rev. 669887