NCBI C++ ToolKit
|
Search Toolkit Book for CSeq_feat
namespace ncbi::objects:: More...
#include <objects/seqfeat/Seq_feat.hpp>
Public Types | |
enum | EAddExt { fAddExt_ReplaceAll = 1 << 0 } |
typedef set< CTempStringEx, PNocase > | TExceptionTextSet |
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< Uint8 > | TCounter |
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_ref * | GetGeneXref (void) const |
See related function in util/feature.hpp. More... | |
void | SetGeneXref (CGene_ref &value) |
CGene_ref & | SetGeneXref (void) |
const CProt_ref * | GetProtXref (void) const |
get protein (if present) from Seq-feat.xref list More... | |
void | SetProtXref (CProt_ref &value) |
CProt_ref & | SetProtXref (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< CDbtag > | GetNamedDbxref (const CTempString &db) const |
Return a specified DB xref. More... | |
const string & | GetNamedQual (const CTempString &qual_name) const |
Return a named qualifier. More... | |
AutoPtr< TExceptionTextSet > | GetTempExceptionTextSet (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_object > | FindExt (const string &ext_type) const |
Find extension by type in exts container. More... | |
CRef< CUser_object > | FindExt (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 TId & | GetId (void) const |
Get the Id member data. More... | |
void | SetId (TId &value) |
Assign a value to Id data member. More... | |
TId & | SetId (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 TData & | GetData (void) const |
Get the Data member data. More... | |
void | SetData (TData &value) |
Assign a value to Data data member. More... | |
TData & | SetData (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... | |
TPartial & | SetPartial (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... | |
TExcept & | SetExcept (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 TComment & | GetComment (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) |
TComment & | SetComment (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 TProduct & | GetProduct (void) const |
Get the Product member data. More... | |
void | SetProduct (TProduct &value) |
Assign a value to Product data member. More... | |
TProduct & | SetProduct (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 TLocation & | GetLocation (void) const |
Get the Location member data. More... | |
void | SetLocation (TLocation &value) |
Assign a value to Location data member. More... | |
TLocation & | SetLocation (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 TQual & | GetQual (void) const |
Get the Qual member data. More... | |
TQual & | SetQual (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 TTitle & | GetTitle (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) |
TTitle & | SetTitle (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 TExt & | GetExt (void) const |
Get the Ext member data. More... | |
void | SetExt (TExt &value) |
Assign a value to Ext data member. More... | |
TExt & | SetExt (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 TCit & | GetCit (void) const |
Get the Cit member data. More... | |
void | SetCit (TCit &value) |
Assign a value to Cit data member. More... | |
TCit & | SetCit (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_ev & | SetExp_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 TXref & | GetXref (void) const |
Get the Xref member data. More... | |
TXref & | SetXref (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 TDbxref & | GetDbxref (void) const |
Get the Dbxref member data. More... | |
TDbxref & | SetDbxref (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... | |
TPseudo & | SetPseudo (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_text & | GetExcept_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_text & | SetExcept_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 TIds & | GetIds (void) const |
Get the Ids member data. More... | |
TIds & | SetIds (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 TExts & | GetExts (void) const |
Get the Exts member data. More... | |
TExts & | SetExts (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 TSupport & | GetSupport (void) const |
Get the Support member data. More... | |
void | SetSupport (TSupport &value) |
Assign a value to Support data member. More... | |
TSupport & | SetSupport (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 CTypeInfo * | GetThisTypeInfo (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 string & | GetNamespaceName (void) const |
Get namespace name. More... | |
bool | HasNamespacePrefix (void) const |
Check if data type has namespace prefix. More... | |
const string & | GetNamespacePrefix (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... | |
CObject & | operator= (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< string > | GetListOfLegalExceptions (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_feat & | operator= (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... | |
namespace ncbi::objects::
Definition at line 56 of file Seq_feat.hpp.
typedef int CSeq_feat::TAddExt |
binary OR of EAddExt
Definition at line 196 of file Seq_feat.hpp.
typedef set<CTempStringEx, PNocase> CSeq_feat::TExceptionTextSet |
Warning: This is invalidated if the underlying except_text is changed in any way.
Definition at line 132 of file Seq_feat.hpp.
|
private |
Definition at line 59 of file Seq_feat.hpp.
enum CSeq_feat::EAddExt |
Enumerator | |
---|---|
fAddExt_ReplaceAll | Before adding, remove all previous. |
Definition at line 193 of file Seq_feat.hpp.
|
inline |
constructor
Definition at line 225 of file Seq_feat.hpp.
CSeq_feat::~CSeq_feat | ( | void | ) |
destructor
Definition at line 54 of file Seq_feat.cpp.
Prohibit copy constructor and assignment operator.
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().
Definition at line 356 of file Seq_feat.cpp.
References CDbtag_Base::SetDb(), CSeq_feat_Base::SetDbxref(), CDbtag_Base::SetTag(), and tag.
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().
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.
ext | The 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().
Add a qualifier to this feature, or replace the value for the first one if it already exists.
Definition at line 299 of file Seq_feat.cpp.
References AddQualifier(), CSeq_feat_Base::IsSetQual(), NON_CONST_ITERATE, and CSeq_feat_Base::SetQual().
Referenced by CConvertSelectedGaps::apply_impl(), CEditSelectedGaps::apply_impl(), CEditingActionFeatPseudo::SetValue(), CGff2Reader::xFeatureSetQualifier(), CGff3ImportData::xInitializeDataRna(), and CBedReader::xSetFeatureDisplayData().
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().
bool CSeq_feat::AddSeqFeatXref | ( | const CSeqFeatXref::TId & | id | ) |
Definition at line 279 of file Seq_feat.cpp.
References HasSeqFeatXref(), and CSeq_feat_Base::SetXref().
Referenced by CFeatureGenePanel::AddReciprocicalXref(), BOOST_AUTO_TEST_CASE(), CreateReciprocalLinks(), CGff3AnnotAssembler::FinalizeAnnot(), CBedAnnotAssembler::ProcessRecord(), CCleanup::RepairXrefs(), CFeatTableEdit::xGenerate_mRNA_Product(), and CFeatureTableReader::xTranslateProtein().
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<().
|
inline |
Definition at line 232 of file Seq_feat.hpp.
References CSeq_loc::Compare(), CompareNonLocation(), and CSeq_loc::fCompare_Default.
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().
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.
CRef< CUser_object > CSeq_feat::FindExt | ( | const string & | ext_type | ) |
Non-const version of FindExt().
Definition at line 597 of file Seq_feat.cpp.
References f(), CSeq_feat_Base::GetExt(), CObject_id_Base::GetStr(), CSeq_feat_Base::IsSetExt(), CSeq_feat_Base::IsSetExts(), CObject_id_Base::IsStr(), NON_CONST_ITERATE, CRef< C, Locker >::Reset(), CSeq_feat_Base::SetData(), CSeq_feat_Base::SetExt(), and CSeq_feat_Base::SetExts().
CConstRef< CUser_object > CSeq_feat::FindExt | ( | const string & | ext_type | ) | const |
Find extension by type in exts container.
ext_type | String id of the extension to find. |
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().
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().
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().
|
virtual |
Return a specified DB xref.
This will find the *first* item in the given referenced database. If no item is found, an empty CConstRef<> is returned.
Implements ISeq_feat.
Definition at line 415 of file Seq_feat.cpp.
References CSeq_feat_Base::GetDbxref(), CSeq_feat_Base::IsSetDbxref(), and ITERATE.
Referenced by CRmvCddFeatDbxref::apply_to(), CSeq_feat_Handle::GetNamedDbxref(), NSnp::GetTag(), CTestBMApp::Run(), s_CleanCDDFeature(), SGeneCdsmRnaFeats::s_CreateDBXref(), CCreateGeneModelTask::s_GetGeneID(), s_IsCCDS(), CGeneModelTrack::x_NeedHighlight(), CXcompareAnnotsApplication::x_ProcessComparison(), CGeneModelFeatJob::x_ProcessLandMarkFeatures(), and CCreateGeneModelTask::x_UpdateGeneOnSequence().
|
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().
get protein (if present) from Seq-feat.xref list
Implements ISeq_feat.
Definition at line 222 of file Seq_feat.cpp.
References CSeq_feat_Base::GetXref(), and ITERATE.
Referenced by CBulkCDS::GetCommandFromValuesTable(), GetProductForCDS(), CSeq_feat_Handle::GetProtXref(), CEditingActionFeatEcNumber::Modify(), CEditingActionFeatFunction::Modify(), CEditingActionFeatProduct::Modify(), s_SetProtRef(), CEditingActionFeatEcNumber::SetValue(), CEditingActionFeatProduct::SetValue(), CFastaOstreamEx::x_AddProteinNameAttribute(), and CImportFeatTable::x_DoImportCDS().
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().
|
static |
Definition at line 95 of file Seq_feat.cpp.
References min(), and s_TypeOrder.
|
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().
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.
exception_text | The 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().
bool CSeq_feat::HasSeqFeatXref | ( | const CSeqFeatXref::TId & | id | ) | const |
Definition at line 265 of file Seq_feat.cpp.
References CSeq_feat_Base::GetXref(), CSeq_feat_Base::IsSetXref(), and ITERATE.
Referenced by AddSeqFeatXref(), and CValidError_feat::ValidateOneFeatXrefPair().
|
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().
Indicates whether this specific text is a RefSeq-only exception.
Definition at line 553 of file Seq_feat.cpp.
Referenced by CSingleFeatValidator::x_ValidateExceptText().
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().
Remove all Exts with the given type.
Note: Runs in linear time relative to the number of Exts total.
ext_type | String 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().
Remove all qualifiers with the given name; do nothing if no such qualifier exists.
Complexity is linear in the number of quals, which is the best that can be done since quals may not be sorted.
Definition at line 315 of file Seq_feat.cpp.
References CSeq_feat_Base::GetQual(), CSeq_feat_Base::IsSetQual(), ITERATE, CSeq_feat_Base::ResetQual(), CSeq_feat_Base::SetQual(), and ncbi::grid::netcache::search::fields::size.
Referenced by CFeatTableEdit::GenerateLocusTags(), CBulkCDS::GetCommandFromValuesTable(), CCdsFromGeneMrnaExon::GetNameFromExon(), CmRNAFromGeneCdsExon::GetNameFromExon(), CCdsFromGeneMrnaExon::GetNameFromGene(), CmRNAFromGeneCdsExon::GetNameFromGene(), CtRNAFromGene::GetNameFromGene(), CEditingActionFeatPseudo::ResetValue(), CEditingActionFeatPseudo::SetValue(), CFeatTableEdit::SubmitFixProducts(), CImportFeatTable::x_DoImportCDS(), CFeatTableEdit::xGenerate_mRNA_Product(), CFeatureTableReader::xTranslateProtein(), and CGff3AnnotAssembler::xUnmarkLocationPending().
void CSeq_feat::SetGeneXref | ( | CGene_ref & | value | ) |
Definition at line 192 of file Seq_feat.cpp.
References CSeqFeatXref_Base::GetData(), CSeqFeatData_Base::IsGene(), CSeqFeatXref_Base::IsSetData(), NON_CONST_ITERATE, CSeqFeatXref_Base::SetData(), CSeq_feat_Base::SetXref(), and rapidjson::value.
Referenced by CGeneRefColumn::AddToFeature(), BOOST_AUTO_TEST_CASE(), CGeneRefColumn::ClearInFeature(), CGeneXrefsFromFeats::GetCommand(), CEditingActionFeatSynonym::Modify(), CEditingActionFeatLocus_tag::ResetValue(), CEditingActionFeatMaploc::ResetValue(), CEditingActionFeatAllele::ResetValue(), CEditingActionFeatGeneLocus::ResetValue(), CEditingActionFeatLocus_tag::SetValue(), CEditingActionFeatMaploc::SetValue(), CEditingActionFeatSynonym::SetValue(), CEditingActionFeatAllele::SetValue(), CEditingActionFeatGeneLocus::SetValue(), CFeatureGenePanel::TransferDataFromWindow(), and CFeatureTableReader_Imp::x_AddQualifierToFeature().
CGene_ref & CSeq_feat::SetGeneXref | ( | void | ) |
Definition at line 208 of file Seq_feat.cpp.
References CSeqFeatXref_Base::GetData(), CSeqFeatData_Base::IsGene(), CSeqFeatXref_Base::IsSetData(), NON_CONST_ITERATE, CSeqFeatXref_Base::SetData(), and CSeq_feat_Base::SetXref().
void CSeq_feat::SetProtXref | ( | CProt_ref & | value | ) |
Definition at line 233 of file Seq_feat.cpp.
References CSeqFeatXref_Base::GetData(), CSeqFeatData_Base::IsProt(), CSeqFeatXref_Base::IsSetData(), NON_CONST_ITERATE, CSeqFeatXref_Base::SetData(), CSeq_feat_Base::SetXref(), and rapidjson::value.
Referenced by CBulkCDS::GetCommandFromValuesTable(), CEditingActionFeatEcNumber::Modify(), CEditingActionFeatFunction::Modify(), CEditingActionFeatProduct::Modify(), CEditingActionFeatEcNumber::SetValue(), CEditingActionFeatFunction::SetValue(), CEditingActionFeatProduct::SetValue(), CFeatureTableReader_Imp::x_AddQualifierToCdregion(), and CFeatTableEdit::xGenerate_mRNA_Product().
CProt_ref & CSeq_feat::SetProtXref | ( | void | ) |
Definition at line 249 of file Seq_feat.cpp.
References CSeqFeatXref_Base::GetData(), CSeqFeatData_Base::IsProt(), CSeqFeatXref_Base::IsSetData(), NON_CONST_ITERATE, CSeqFeatXref_Base::SetData(), and CSeq_feat_Base::SetXref().