NCBI C++ ToolKit
|
Classes | |
class | CFeatIdRemapper |
class | CFeatComparatorByLabel |
class | CFeatTree |
CFeatTree. More... | |
class | CFeatTree::CFeatInfo |
Typedefs | |
typedef pair< int, CTSE_Handle > | CFeatIdRemapper::TFullId |
typedef map< TFullId, int > | CFeatIdRemapper::TIdMap |
typedef vector< CFeatInfo * > | CFeatTree::CFeatInfo::TChildren |
typedef vector< CFeatInfo * > | CFeatTree::TFeatArray |
typedef vector< CFeatInfo * > | CFeatTree::TChildren |
typedef map< CSeq_feat_Handle, CFeatInfo > | CFeatTree::TInfoMap |
typedef vector< CFeatInfo * > | CFeatTree::TInfoArray |
GetLabel | |
Returns a label for a CSeq_feat. Label may be based on just the type of feature, just the content of the feature, or both. If scope is 0, then the label will not include information from feature products. | |
enum | FFeatLabelFlags { fFGL_Type = 1 << 1 , fFGL_Content = 1 << 2 , fFGL_Both = fFGL_Type | fFGL_Content , fFGL_NoComments = 1 << 3 , fFGL_NoQualifiers = 1 << 4 } |
enum | ELabelType { eType , eContent , eBoth } |
For compatibility with legacy code. More... | |
typedef int | TFeatLabelFlags |
binary OR of FFeatLabelFlags More... | |
void | GetLabel (const CSeq_feat &feat, string *label, TFeatLabelFlags flags, CScope *scope=0) |
void | GetLabel (const CSeq_feat &feat, string *label, ELabelType label_type, CScope *scope=0) |
CMappedFeat | MapSeq_feat (const CSeq_feat_Handle &feat, const CBioseq_Handle &master_seq, const CRange< TSeqPos > &range) |
CMappedFeat | MapSeq_feat (const CSeq_feat_Handle &feat, const CSeq_id_Handle &master_id, const CRange< TSeqPos > &range) |
CMappedFeat | MapSeq_feat (const CSeq_feat_Handle &feat, const CBioseq_Handle &master_seq) |
CMappedFeat | MapSeq_feat (const CSeq_feat_Handle &feat, const CSeq_id_Handle &master_id) |
GetParentFeature | |
Returns a best parent feature for a CMappedFeat. CSeq_feat_Handle is convertible to a CMappedFeat so it can be used too. | |
enum | ELocationInFrame { eLocationInFrame_InFrame = 0 , eLocationInFrame_BadStart , eLocationInFrame_BadStop , eLocationInFrame_BadStartAndStop , eLocationInFrame_NotIn } |
CMappedFeat | GetParentFeature (const CMappedFeat &feat) |
CMappedFeat | GetBestGeneForMrna (const CMappedFeat &mrna_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0, CFeatTree::EBestGeneType lookup_type=CFeatTree::eBestGene_TreeOnly) |
CMappedFeat | GetBestGeneForCds (const CMappedFeat &cds_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0, CFeatTree::EBestGeneType lookup_type=CFeatTree::eBestGene_TreeOnly) |
CMappedFeat | GetBestMrnaForCds (const CMappedFeat &cds_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0) |
CMappedFeat | GetBestCdsForMrna (const CMappedFeat &mrna_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0) |
void | GetMrnasForGene (const CMappedFeat &gene_feat, list< CMappedFeat > &mrna_feats, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0) |
void | GetCdssForGene (const CMappedFeat &gene_feat, list< CMappedFeat > &cds_feats, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0) |
CMappedFeat | GetBestGeneForFeat (const CMappedFeat &feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0, CFeatTree::EBestGeneType lookup_type=CFeatTree::eBestGene_TreeOnly) |
CMappedFeat | GetBestParentForFeat (const CMappedFeat &feat, CSeqFeatData::ESubtype parent_subtype, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0) |
CMappedFeat | GetBestOverlappingFeat (const CMappedFeat &feat, CSeqFeatData::ESubtype need_subtype, sequence::EOverlapType overlap_type, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0) |
CRef< CSeq_loc_Mapper > | CreateSeqLocMapperFromFeat (const CSeq_feat &feat, CSeq_loc_Mapper::EFeatMapDirection dir, CScope *scope=0) |
Create CSeq_loc_Mapper from a feature, check for special cases like exceptions in CDS features. More... | |
void | ClearFeatureIds (const CSeq_entry_EditHandle &entry) |
void | ClearFeatureIds (const CSeq_annot_EditHandle &annot) |
void | ReassignFeatureIds (const CSeq_entry_EditHandle &entry) |
void | ReassignFeatureIds (const CSeq_annot_EditHandle &annot) |
bool | GetFeatureGeneBiotype (feature::CFeatTree &ft, CMappedFeat mf, string &biotype) |
bool | GetFeatureGeneBiotypeFaster (feature::CFeatTree &ft, CMappedFeat mf, string &biotype) |
ELocationInFrame | IsLocationInFrame (const CSeq_feat_Handle &cds, const CSeq_loc &loc) |
Determines whether location loc is in frame with coding region cds. More... | |
bool | PromoteCDSToNucProtSet (objects::CSeq_feat_Handle &orig_feat) |
Promotes coding region from Seq-annot on nucleotide sequence to Seq-annot on nuc-prot-set if necessary and appropriate. More... | |
bool | AdjustFeaturePartialFlagForLocation (CSeq_feat &new_feat) |
AdjustFeaturePartialFlagForLocation A function to ensure that Seq-feat.partial is set if either end of the feature is partial, and clear if neither end of the feature is partial. More... | |
bool | CopyFeaturePartials (CSeq_feat &dst, const CSeq_feat &src) |
CopyFeaturePartials A function to copy the start and end partialness from one feature to another. More... | |
bool | AdjustProteinMolInfoToMatchCDS (CMolInfo &molinfo, const CSeq_feat &cds) |
AdjustProteinMolInfoToMatchCDS A function to change an existing MolInfo to match a coding region. More... | |
bool | AdjustForCDSPartials (const CSeq_feat &cds, CSeq_entry_Handle seh) |
AdjustForCDSPartials A function to make all of the necessary related changes to a Seq-entry after the partialness of a coding region has been changed. More... | |
bool | AdjustForCDSPartials (const CSeq_feat &cds, CScope &scope) |
AdjustForCDSPartials A function to make all of the necessary related changes to a Seq-entry after the partialness of a coding region has been changed. More... | |
bool | RetranslateCDS (const CSeq_feat &cds, CScope &scope) |
RetranslateCDS A function to replace the protein Bioseq pointed to by cds.product with the current translation of the coding region cds. More... | |
void | AddFeatureToBioseq (const CBioseq &seq, const CSeq_feat &f, CScope &scope) |
AddFeatureToBioseq A function to add a feature to a Bioseq - will create a new feature table Seq-annot if necessary. More... | |
void | AddProteinFeature (const CBioseq &seq, const string &protein_name, const CSeq_feat &cds, CScope &scope) |
AddProteinFeature A function to create a protein feature with the specified protein name. More... | |
GetParentFeature | |
The algorithm is the following: 1. Feature types are organized in a tree of possible parent-child relationship: 1.1. operon, gap cannot have a parent, 1.2. gene can have operon as a parent, 1.3. mRNA, VDJ_segment, and C_region can have gene as a parent, 1.4. cdregion can have mRNA, VDJ_segment, or C_region as a parent, 1.5. prot can have cdregion as a parent (by its product location), 1.6. mat_peptide, sig_peptide can have prot as a parent, 1.x. all other feature types can have gene as a parent. 2. If parent of a nearest feature type is not found then the next type in the tree is checked, except prot which will have no parent if no cdregion is found. 3. For each parent type candidate the search is done in several ways: 3.1. first we look for a parent by Seq-feat.xref field, 3.2. then by Gene-ref if current parent type is gene, 3.3. then parent candidates are searched by the best intersection of their locations (product in case of prot -> cdregion link), 3.4. if no candidates are found next parent type is checked. | |
CFeatTree::CFeatTree (void) | |
Construct empty tree. More... | |
CFeatTree::CFeatTree (CFeat_CI it) | |
Construct a tree with features collected by a CFeat_CI. More... | |
CFeatTree::CFeatTree (const CSeq_annot_Handle &sah) | |
Construct a tree with features from a Seq-annot. More... | |
CFeatTree::CFeatTree (const CSeq_annot_Handle &sah, const SAnnotSelector &sel) | |
Construct a tree with features from a Seq-annot, restricted by an annot selector. More... | |
CFeatTree::CFeatTree (const CSeq_entry_Handle &seh) | |
Construct a tree with features from a Seq-entry. More... | |
CFeatTree::CFeatTree (const CSeq_entry_Handle &seh, const SAnnotSelector &sel) | |
Construct a tree with features from a Seq-entry, restricted by an annot selector. More... | |
CFeatTree::~CFeatTree (void) | |
Destructor. More... | |
CFeatTree::CFeatTree (const CFeatTree &) | |
CFeatTree & | CFeatTree::operator= (const CFeatTree &) |
void | CFeatTree::SetFeatIdMode (EFeatIdMode mode) |
void | CFeatTree::SetGeneCheckMode (EGeneCheckMode mode) |
void | CFeatTree::SetIgnoreMissingGeneXref (bool ignore=true) |
void | CFeatTree::SetSNPStrandMode (ESNPStrandMode mode) |
void | CFeatTree::AddFeatures (CFeat_CI it) |
Add all features collected by a CFeat_CI to the tree. More... | |
void | CFeatTree::AddFeature (const CMappedFeat &feat) |
Add a single feature to the tree. More... | |
void | CFeatTree::AddFeaturesFor (CScope &scope, const CSeq_loc &loc, CSeqFeatData::ESubtype bottom_type, CSeqFeatData::ESubtype top_type, const SAnnotSelector *base_sel=0, bool skip_bottom=false) |
Add all features from bottom_type to top_type for a feature. More... | |
void | CFeatTree::AddFeaturesFor (const CMappedFeat &feat, CSeqFeatData::ESubtype bottom_type, CSeqFeatData::ESubtype top_type, const SAnnotSelector *base_sel=0) |
void | CFeatTree::AddFeaturesFor (const CMappedFeat &feat, CSeqFeatData::ESubtype top_type, const SAnnotSelector *base_sel=0) |
void | CFeatTree::AddGenesForMrna (const CMappedFeat &mrna_feat, const SAnnotSelector *base_sel=0) |
Add all necessary features to get genes for a mRNA feature. More... | |
void | CFeatTree::AddCdsForMrna (const CMappedFeat &mrna_feat, const SAnnotSelector *base_sel=0) |
Add all necessary features to get cdregions for a mRNA feature. More... | |
void | CFeatTree::AddMrnasForGene (const CMappedFeat &gene_feat, const SAnnotSelector *base_sel=0) |
Add all necessary features to get mRNAs for a gene feature. More... | |
void | CFeatTree::AddCdsForGene (const CMappedFeat &gene_feat, const SAnnotSelector *base_sel=0) |
Add all necessary features to get cdregions for a gene feature. More... | |
void | CFeatTree::AddGenesForCds (const CMappedFeat &cds_feat, const SAnnotSelector *base_sel=0) |
Add all necessary features to get genes for a cdregion feature. More... | |
void | CFeatTree::AddMrnasForCds (const CMappedFeat &cds_feat, const SAnnotSelector *base_sel=0) |
Add all necessary features to get mRNAs for a cdregion feature. More... | |
void | CFeatTree::AddGenesForFeat (const CMappedFeat &feat, const SAnnotSelector *base_sel=0) |
Add all necessary features to get genes for an arbitrary feature. More... | |
const CMappedFeat & | CFeatTree::GetMappedFeat (const CSeq_feat_Handle &feat) const |
Find a corresponding CMappedFeat for a feature already added to a tree. More... | |
CMappedFeat | CFeatTree::GetParent (const CMappedFeat &feat) |
Return nearest parent of a feature. More... | |
CMappedFeat | CFeatTree::GetParent (const CMappedFeat &feat, CSeqFeatData::E_Choice type) |
Return parent of a feature of the specified type, it may be not the nearest parent, but a parent's parent, and so on. More... | |
CMappedFeat | CFeatTree::GetParent (const CMappedFeat &feat, CSeqFeatData::ESubtype subtype) |
Return parent of a feature of the specified subtype, it may be not the nearest parent, but a parent's parent, and so on. More... | |
vector< CMappedFeat > | CFeatTree::GetChildren (const CMappedFeat &feat) |
Return all nearest children of a feature. More... | |
void | CFeatTree::GetChildrenTo (const CMappedFeat &feat, vector< CMappedFeat > &children) |
Store all nearest children of a feature into a vector. More... | |
CMappedFeat | CFeatTree::GetBestGene (const CMappedFeat &feat, EBestGeneType lookup_type=eBestGene_TreeOnly) |
Return parent gene if exists or best overlapping gene. More... | |
CFeatTree::CFeatInfo::CFeatInfo (void) | |
CFeatTree::CFeatInfo::~CFeatInfo (void) | |
const CTSE_Handle & | CFeatTree::CFeatInfo::GetTSE (void) const |
void | CFeatTree::x_Init (void) |
CFeatInfo & | CFeatTree::x_GetInfo (const CSeq_feat_Handle &feat) |
CFeatInfo & | CFeatTree::x_GetInfo (const CMappedFeat &feat) |
CFeatInfo * | CFeatTree::x_FindInfo (const CSeq_feat_Handle &feat) |
void | CFeatTree::x_AssignParents (void) |
void | CFeatTree::x_AssignParentsByOverlap (TFeatArray &features, const STypeLink &link) |
bool | CFeatTree::x_AssignParentByRef (CFeatInfo &info) |
void | CFeatTree::x_AssignGenesByOverlap (TFeatArray &features) |
void | CFeatTree::x_AssignGenes (void) |
pair< int, CFeatInfo * > | CFeatTree::x_LookupParentByRef (CFeatInfo &info, CSeqFeatData::ESubtype parent_type) |
void | CFeatTree::x_VerifyLinkedToRoot (CFeatInfo &info) |
void | CFeatTree::x_SetParent (CFeatInfo &info, CFeatInfo &parent) |
void | CFeatTree::x_SetNoParent (CFeatInfo &info) |
CFeatInfo * | CFeatTree::x_GetParent (CFeatInfo &info) |
const TChildren & | CFeatTree::x_GetChildren (CFeatInfo &info) |
void | CFeatTree::x_SetGeneRecursive (CFeatInfo &info, CFeatInfo *gene) |
void | CFeatTree::x_SetGene (CFeatInfo &info, CFeatInfo *gene) |
typedef vector<CFeatInfo*> CFeatTree::CFeatInfo::TChildren |
Definition at line 366 of file feature.hpp.
|
protected |
Definition at line 386 of file feature.hpp.
typedef vector<CFeatInfo*> CFeatTree::TFeatArray |
Definition at line 383 of file feature.hpp.
typedef int TFeatLabelFlags |
binary OR of FFeatLabelFlags
Definition at line 78 of file feature.hpp.
|
private |
Definition at line 115 of file feature.hpp.
|
private |
Definition at line 116 of file feature.hpp.
|
protected |
Definition at line 415 of file feature.hpp.
|
protected |
Definition at line 414 of file feature.hpp.
Mode of processing feature ids.
Enumerator | |
---|---|
eBestGeneFeatId_ignore | |
eBestGeneFeatId_always |
Definition at line 212 of file feature.hpp.
Enumerator | |
---|---|
eBestGene_TreeOnly | |
eBestGene_AllowOverlapped | |
eBestGene_OverlappedOnly |
Definition at line 330 of file feature.hpp.
Mode of processing feature ids.
Enumerator | |
---|---|
eFeatId_ignore | |
eFeatId_by_type | |
eFeatId_always |
Definition at line 201 of file feature.hpp.
Mode for taking into account best gene eGeneCheck_match will try to match a parent feature only if they both match to the same gene.
Enumerator | |
---|---|
eGeneCheck_ignore | |
eGeneCheck_match |
Definition at line 224 of file feature.hpp.
Enumerator | |
---|---|
eIsLinkedToRoot_unknown | |
eIsLinkedToRoot_linked | |
eIsLinkedToRoot_linking |
Definition at line 373 of file feature.hpp.
enum ELabelType |
For compatibility with legacy code.
Enumerator | |
---|---|
eType | |
eContent | |
eBoth |
Definition at line 85 of file feature.hpp.
enum ELocationInFrame |
Enumerator | |
---|---|
eLocationInFrame_InFrame | |
eLocationInFrame_BadStart | |
eLocationInFrame_BadStop | |
eLocationInFrame_BadStartAndStop | |
eLocationInFrame_NotIn |
Definition at line 531 of file feature.hpp.
Mode of processing SNP strands.
Enumerator | |
---|---|
eSNPStrand_same | |
eSNPStrand_both |
Definition at line 241 of file feature.hpp.
enum FFeatLabelFlags |
Definition at line 71 of file feature.hpp.
void CFeatTree::AddCdsForGene | ( | const CMappedFeat & | gene_feat, |
const SAnnotSelector * | base_sel = 0 |
||
) |
Add all necessary features to get cdregions for a gene feature.
Definition at line 3278 of file feature.cpp.
References CFeatTree::AddFeaturesFor(), CSeqFeatData::eSubtype_cdregion, and CSeqFeatData::eSubtype_gene.
void CFeatTree::AddCdsForMrna | ( | const CMappedFeat & | mrna_feat, |
const SAnnotSelector * | base_sel = 0 |
||
) |
Add all necessary features to get cdregions for a mRNA feature.
Definition at line 3240 of file feature.cpp.
References CFeatTree::AddFeaturesFor(), CSeqFeatData::eSubtype_cdregion, and CSeqFeatData::eSubtype_mRNA.
void CFeatTree::AddFeature | ( | const CMappedFeat & | feat | ) |
Add a single feature to the tree.
Definition at line 2044 of file feature.cpp.
References _ASSERT, CMappedFeat::GetSeq_feat_Handle(), info, CFeatTree::m_InfoArray, CFeatTree::m_InfoMap, NCBI_THROW, and map_checker< Container >::size().
Referenced by CFeatTree::AddFeatures(), CFeatTree::AddFeaturesFor(), and CFeatTree::operator=().
void CFeatTree::AddFeatures | ( | CFeat_CI | it | ) |
Add all features collected by a CFeat_CI to the tree.
Definition at line 2036 of file feature.cpp.
References CFeatTree::AddFeature().
Referenced by CFeatTree::AddFeaturesFor(), and CFeatTree::CFeatTree().
void CFeatTree::AddFeaturesFor | ( | const CMappedFeat & | feat, |
CSeqFeatData::ESubtype | bottom_type, | ||
CSeqFeatData::ESubtype | top_type, | ||
const SAnnotSelector * | base_sel = 0 |
||
) |
Definition at line 3210 of file feature.cpp.
References CFeatTree::AddFeature(), CFeatTree::AddFeaturesFor(), CMappedFeat::GetLocation(), and CSeq_feat_Handle::GetScope().
void CFeatTree::AddFeaturesFor | ( | const CMappedFeat & | feat, |
CSeqFeatData::ESubtype | top_type, | ||
const SAnnotSelector * | base_sel = 0 |
||
) |
Definition at line 3221 of file feature.cpp.
References CFeatTree::AddFeature(), CFeatTree::AddFeaturesFor(), CSeq_feat_Handle::GetFeatSubtype(), CMappedFeat::GetLocation(), and CSeq_feat_Handle::GetScope().
void CFeatTree::AddFeaturesFor | ( | CScope & | scope, |
const CSeq_loc & | loc, | ||
CSeqFeatData::ESubtype | bottom_type, | ||
CSeqFeatData::ESubtype | top_type, | ||
const SAnnotSelector * | base_sel = 0 , |
||
bool | skip_bottom = false |
||
) |
Add all features from bottom_type to top_type for a feature.
Definition at line 3171 of file feature.cpp.
References CFeatTree::AddFeatures(), CSeq_annot_Base::C_Data::e_not_set, CSeqFeatData::eSubtype_bad, STypeLink::GetMultiParentTypes(), SAnnotSelector::IncludeFeatSubtype(), STypeLink::m_ParentType, SAnnotSelector::SetAdaptiveDepth(), SAnnotSelector::SetAnnotType(), SAnnotSelector::SetFeatSubtype(), SAnnotSelector::SetOverlapTotalRange(), and SAnnotSelector::SetResolveAll().
Referenced by CFeatTree::AddCdsForGene(), CFeatTree::AddCdsForMrna(), CFeatTree::AddFeaturesFor(), CFeatTree::AddGenesForCds(), CFeatTree::AddGenesForFeat(), CFeatTree::AddGenesForMrna(), CFeatTree::AddMrnasForCds(), and CFeatTree::AddMrnasForGene().
AddFeatureToBioseq A function to add a feature to a Bioseq - will create a new feature table Seq-annot if necessary.
seq | The sequence on which to add the feature |
f | The feature to add |
scope | The scope that contains the sequence |
Definition at line 4169 of file feature.cpp.
References CSeq_annot_EditHandle::AddFeat(), CSerialObject::Assign(), CBioseq_EditHandle::AttachAnnot(), f(), CBioseq_Base::GetAnnot(), CScope::GetBioseqHandle(), CScope::GetSeq_annotHandle(), CBioseq_Base::IsSetAnnot(), ITERATE, and CSeq_annot_Base::SetData().
Referenced by AddProteinFeature().
void CFeatTree::AddGenesForCds | ( | const CMappedFeat & | cds_feat, |
const SAnnotSelector * | base_sel = 0 |
||
) |
Add all necessary features to get genes for a cdregion feature.
Definition at line 3250 of file feature.cpp.
References CFeatTree::AddFeaturesFor(), and CSeqFeatData::eSubtype_gene.
void CFeatTree::AddGenesForFeat | ( | const CMappedFeat & | feat, |
const SAnnotSelector * | base_sel = 0 |
||
) |
Add all necessary features to get genes for an arbitrary feature.
Definition at line 3288 of file feature.cpp.
References CFeatTree::AddFeaturesFor(), and CSeqFeatData::eSubtype_gene.
void CFeatTree::AddGenesForMrna | ( | const CMappedFeat & | mrna_feat, |
const SAnnotSelector * | base_sel = 0 |
||
) |
Add all necessary features to get genes for a mRNA feature.
Definition at line 3231 of file feature.cpp.
References CFeatTree::AddFeaturesFor(), and CSeqFeatData::eSubtype_gene.
void CFeatTree::AddMrnasForCds | ( | const CMappedFeat & | cds_feat, |
const SAnnotSelector * | base_sel = 0 |
||
) |
Add all necessary features to get mRNAs for a cdregion feature.
Definition at line 3259 of file feature.cpp.
References CFeatTree::AddFeaturesFor(), and CSeqFeatData::eSubtype_mRNA.
void CFeatTree::AddMrnasForGene | ( | const CMappedFeat & | gene_feat, |
const SAnnotSelector * | base_sel = 0 |
||
) |
Add all necessary features to get mRNAs for a gene feature.
Definition at line 3268 of file feature.cpp.
References CFeatTree::AddFeaturesFor(), CSeqFeatData::eSubtype_gene, and CSeqFeatData::eSubtype_mRNA.
void AddProteinFeature | ( | const CBioseq & | seq, |
const string & | protein_name, | ||
const CSeq_feat & | cds, | ||
CScope & | scope | ||
) |
AddProteinFeature A function to create a protein feature with the specified protein name.
seq | The Bioseq on which to create the protein feature |
protein_name | The protein name |
cds | The coding region for this protein feature |
scope | The scope in which the sequence can be found |
Definition at line 4195 of file feature.cpp.
References AddFeatureToBioseq(), CopyFeaturePartials(), CSeq_loc::GetId(), CBioseq::GetLength(), CSeq_feat_Base::GetProduct(), CSeq_feat_Base::SetData(), and CSeq_feat_Base::SetLocation().
Referenced by g_InstantiateMissingProteins(), CCleanup::SetProteinName(), and CCleanup::WGSCleanup().
AdjustFeaturePartialFlagForLocation A function to ensure that Seq-feat.partial is set if either end of the feature is partial, and clear if neither end of the feature is partial.
new_feat | The feature to be adjusted (if necessary) |
Definition at line 3983 of file feature.cpp.
References eExtreme_Biological, CSeq_feat_Base::GetLocation(), CSeq_feat_Base::GetPartial(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), CSeq_feat_Base::IsSetPartial(), CSeq_feat_Base::ResetPartial(), and CSeq_feat_Base::SetPartial().
Referenced by CResyncPanel::AddCommand(), AdjustProteinFeaturePartialsToMatchCDS(), CLocationEditPolicy::ApplyPolicyToFeature(), BOOST_AUTO_TEST_CASE(), CopyFeaturePartials(), CSequenceEditingEventHandler::ResynchronizePartials(), and CCleanup::SetCDSPartialsByFrameAndTranslation().
AdjustForCDSPartials A function to make all of the necessary related changes to a Seq-entry after the partialness of a coding region has been changed.
cds | The feature for which adjustments are to be made |
scope | The scope in which to find the protein sequence |
Definition at line 4062 of file feature.cpp.
References AdjustProteinMolInfoToMatchCDS(), CSerialObject::Assign(), CopyFeaturePartials(), CSeqFeatData::eSubtype_prot, f(), CScope::GetBioseqHandle(), CBioseq_Handle::GetEditHandle(), CSeq_entry_Handle::GetEditHandle(), CSeq_annot_Handle::GetParentEntry(), CSeq_feat_Base::GetProduct(), CSeq_feat_Base::IsSetProduct(), NON_CONST_ITERATE, CSeq_feat_EditHandle::Replace(), and CBioseq_EditHandle::SetDescr().
Referenced by AdjustForCDSPartials(), and RetranslateCDS().
bool AdjustForCDSPartials | ( | const CSeq_feat & | cds, |
CSeq_entry_Handle | seh | ||
) |
AdjustForCDSPartials A function to make all of the necessary related changes to a Seq-entry after the partialness of a coding region has been changed.
cds | The feature for which adjustments are to be made |
seh | The Seq-entry-handle to be adjusted (if necessary) |
Definition at line 4115 of file feature.cpp.
Referenced by ApplyPolicyToFeature(), BOOST_AUTO_TEST_CASE(), and CCleanup::WGSCleanup().
AdjustProteinMolInfoToMatchCDS A function to change an existing MolInfo to match a coding region.
molinfo | The MolInfo to be adjusted (if necessary) |
cds | The CDS to match |
Definition at line 4024 of file feature.cpp.
Referenced by CTruncateCDS::AdjustMolinfo(), CFeatGapInfo::AdjustProteinSeq(), BOOST_AUTO_TEST_CASE(), GetSynchronizeProductMolInfoCommand(), CFeatTableEdit::xGenerate_mRNA_Product(), and CFeatureTableReader::xTranslateProtein().
CFeatTree::CFeatInfo::CFeatInfo | ( | void | ) |
Definition at line 3146 of file feature.cpp.
|
explicit |
Construct a tree with features collected by a CFeat_CI.
Definition at line 1929 of file feature.cpp.
References CFeatTree::AddFeatures(), and CFeatTree::x_Init().
Definition at line 1971 of file feature.cpp.
|
explicit |
Construct a tree with features from a Seq-annot.
Definition at line 1936 of file feature.cpp.
References CFeatTree::AddFeatures(), and CFeatTree::x_Init().
|
explicit |
Construct a tree with features from a Seq-annot, restricted by an annot selector.
Definition at line 1943 of file feature.cpp.
References CFeatTree::AddFeatures(), and CFeatTree::x_Init().
|
explicit |
Construct a tree with features from a Seq-entry.
Definition at line 1951 of file feature.cpp.
References CFeatTree::AddFeatures(), and CFeatTree::x_Init().
|
explicit |
Construct a tree with features from a Seq-entry, restricted by an annot selector.
Definition at line 1958 of file feature.cpp.
References CFeatTree::AddFeatures(), and CFeatTree::x_Init().
CFeatTree::CFeatTree | ( | void | ) |
void ClearFeatureIds | ( | const CSeq_annot_EditHandle & | annot | ) |
Definition at line 3727 of file feature.cpp.
References CSeq_feat_EditHandle::ClearFeatIds(), and CSeq_feat_EditHandle::ClearFeatXrefs().
Referenced by ReassignFeatureIds().
void ClearFeatureIds | ( | const CSeq_entry_EditHandle & | entry | ) |
Definition at line 3737 of file feature.cpp.
References CSeq_feat_EditHandle::ClearFeatIds(), and CSeq_feat_EditHandle::ClearFeatXrefs().
CopyFeaturePartials A function to copy the start and end partialness from one feature to another.
dst | The feature to be adjusted (if necessary) |
src | The CDS to match |
Definition at line 4006 of file feature.cpp.
References AdjustFeaturePartialFlagForLocation(), eExtreme_Biological, CSeq_feat_Base::GetLocation(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), and CSeq_feat_Base::SetLocation().
Referenced by AddProteinFeature(), AdjustForCDSPartials(), CCleanup::SetGenePartialByLongestContainedFeature(), CCleanup::WGSCleanup(), CFeatTableEdit::xGenerate_mRNA_Product(), and CFeatureTableReader::xTranslateProtein().
CRef<CSeq_loc_Mapper> CreateSeqLocMapperFromFeat | ( | const CSeq_feat & | feat, |
CSeq_loc_Mapper::EFeatMapDirection | dir, | ||
CScope * | scope = 0 |
||
) |
Create CSeq_loc_Mapper from a feature, check for special cases like exceptions in CDS features.
Return null on error.
Definition at line 3698 of file feature.cpp.
References eExtreme_Biological, CSeq_feat_Base::GetExcept(), CSeq_feat_Base::GetExcept_text(), CSeq_feat_Base::GetLocation(), CSeq_loc::IsPartialStart(), CSeq_feat_Base::IsSetExcept(), CSeq_feat_Base::IsSetExcept_text(), CSeq_feat_Base::IsSetProduct(), CSeq_loc::IsTruncatedStart(), and CRef< C, Locker >::Reset().
CMappedFeat GetBestCdsForMrna | ( | const CMappedFeat & | mrna_feat, |
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 |
||
) |
Definition at line 3360 of file feature.cpp.
References CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_mRNA, CFeatTree::GetChildren(), CSeq_feat_Handle::GetFeatSubtype(), ITERATE, and NCBI_THROW.
Referenced by GetBestOverlappingFeat(), GetRelatedFeatureApplyObjects(), GetRelatedFeatures(), CDemoApp::Run(), variation_ref::CVariationUtil::SetVariantProperties(), CAlignedFeatureGraph::x_GatherCluster(), CGuiObjectInfoSeq_feat::x_GetProductSequence(), and CFeatTableEdit::xFeatureAddProteinIdMrna().
CMappedFeat CFeatTree::GetBestGene | ( | const CMappedFeat & | feat, |
EBestGeneType | lookup_type = eBestGene_TreeOnly |
||
) |
Return parent gene if exists or best overlapping gene.
Definition at line 3127 of file feature.cpp.
References CFeatTree::eBestGene_AllowOverlapped, CFeatTree::eBestGene_TreeOnly, CSeqFeatData::eSubtype_gene, CFeatTree::GetParent(), CFeatTree::CFeatInfo::m_Feat, CFeatTree::CFeatInfo::m_Gene, CFeatTree::x_AssignGenes(), and CFeatTree::x_GetInfo().
Referenced by GetBestGeneForCds(), GetBestGeneForFeat(), and GetBestGeneForMrna().
|
inline |
Definition at line 216 of file feature.hpp.
References CFeatTree::m_BestGeneFeatIdMode.
CMappedFeat GetBestGeneForCds | ( | const CMappedFeat & | cds_feat, |
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 , |
||
CFeatTree::EBestGeneType | lookup_type = CFeatTree::eBestGene_TreeOnly |
||
) |
Definition at line 3321 of file feature.cpp.
References CSeqFeatData::eSubtype_cdregion, CFeatTree::GetBestGene(), CSeq_feat_Handle::GetFeatSubtype(), and NCBI_THROW.
Referenced by CCreateProteinId::apply(), CCreateLocusTagGene::apply(), CConvertBadCdsAndRnaToMiscFeat::apply(), GetBestOverlappingFeat(), CFixForTransSplicing::GetCommand(), CFeatTableEdit::InferPartials(), MakemRNAforCDS(), TAsyncToken::ParentGene(), CExtendCDSToStop::ResetGenes(), s_GetBestGeneForFeat(), CLinkUtils::x_AddDbxrefFeatureLinks(), CDeflineGenerator::x_GetGeneRefViaCDS(), CGffIdGenerator::xGetIdForCds(), and CFeatTableEdit::xGetLinkedFeature().
CMappedFeat GetBestGeneForFeat | ( | const CMappedFeat & | feat, |
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 , |
||
CFeatTree::EBestGeneType | lookup_type = CFeatTree::eBestGene_TreeOnly |
||
) |
Definition at line 3443 of file feature.cpp.
References CFeatTree::GetBestGene(), and NCBI_THROW.
Referenced by CGffFeatureContext::FindBestGeneParent(), CFeatureIndex::GetBestGene(), GetBestOverlappingFeat(), CGeneXrefsFromFeats::GetCommand(), CDemoApp::Run(), sGetClosestGeneRef(), CGeneFeatTreeProcess::TestFeatureGeneTree(), CFeatTableEdit::xAdjustExistingParentGene(), CGtfWriter::xAssignFeatureAttributeGeneId(), CGffIdGenerator::xExtractGeneLocusTagOrLocus(), CFeatTableEdit::xGenerateMissingMrnaForCds(), CFeatTableEdit::xGetCurrentLocusTagPrefix(), CGffIdGenerator::xGetIdForRna(), CFeatTableEdit::xMakeGeneForFeature(), CFeatTableEdit::xNextProteinId(), and CFeatTableEdit::xNextTranscriptId().
CMappedFeat GetBestGeneForMrna | ( | const CMappedFeat & | mrna_feat, |
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 , |
||
CFeatTree::EBestGeneType | lookup_type = CFeatTree::eBestGene_TreeOnly |
||
) |
Definition at line 3301 of file feature.cpp.
References CSeqFeatData::eSubtype_mRNA, CFeatTree::GetBestGene(), CSeq_feat_Handle::GetFeatSubtype(), and NCBI_THROW.
Referenced by CGffFeatureContext::FindBestGeneParent(), GetBestOverlappingFeat(), CDemoApp::Run(), s_GetBestGeneForFeat(), CLinkUtils::x_AddDbxrefFeatureLinks(), CFlatGatherer::x_GatherFeatures(), CFlatGatherer::x_GatherFeaturesIdx(), and CGffIdGenerator::xGetIdForRna().
CMappedFeat GetBestMrnaForCds | ( | const CMappedFeat & | cds_feat, |
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 |
||
) |
Definition at line 3341 of file feature.cpp.
References CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_mRNA, CSeq_feat_Handle::GetFeatSubtype(), CFeatTree::GetParent(), and NCBI_THROW.
Referenced by CSplitCDSwithTooManyXs::AdjustSingleCDS(), CExtendCDSToStop::ExtendmRNA(), GetBestOverlappingFeat(), CSeqUtils::GetMrnaForCds(), GetProtAndRnaForCDS(), GetRelatedFeatureApplyObjects(), GetRelatedFeatures(), CFeatTableEdit::InferPartials(), TAsyncToken::ParentMrna(), CFeatTableEdit::xAddTranscriptAndProteinIdsToCdsAndParentMrna(), CGff3Writer::xAssignFeatureAttributeParentMrna(), CFeatTableEdit::xFeatureAddProteinIdCds(), CFeatTableEdit::xFeatureAddTranscriptIdCds(), CFeatTableEdit::xGenerateLocusIdsRegenerate(), CFeatTableEdit::xGetLinkedFeature(), and CExonNumberAssigner::xInitialize().
CMappedFeat GetBestOverlappingFeat | ( | const CMappedFeat & | feat, |
CSeqFeatData::ESubtype | need_subtype, | ||
sequence::EOverlapType | overlap_type, | ||
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 |
||
) |
Definition at line 3653 of file feature.cpp.
References CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, CSeqFeatData::eSubtype_operon, GetBestCdsForMrna(), GetBestGeneForCds(), GetBestGeneForFeat(), GetBestGeneForMrna(), GetBestMrnaForCds(), GetBestOverlappingFeat(), GetBestParentForFeat(), CSeq_feat_Handle::GetFeatSubtype(), CMappedFeat::GetLocation(), and CSeq_feat_Handle::GetScope().
Referenced by CSequenceEditingEventHandler::CDSGeneRangeErrorRestore(), CSequenceEditingEventHandler::CDSGeneRangeErrorSuppress(), CConvertImpToProt::Convert(), CGeneFinder::GetFeatViaSubsetThenExtremesIfPossible(), CGeneFinder::GetFeatViaSubsetThenExtremesIfPossible_Helper_extremes(), CGeneFinder::GetFeatViaSubsetThenExtremesIfPossible_Helper_subset(), GetGeneForFeature(), GetmRNAforCDS(), GetProductForCDS(), CmRNACDSLinker::LinkByOverlap(), CDemoApp::Run(), s_GetBestGeneForFeat(), s_GetCDSformRNA(), s_GetmRNAForCDS(), s_GetProductFlagFromCDSProductNames(), s_GetProteinName(), s_TitleFromSegment(), s_VerifyTree(), CMiscFeatValidator::Validate(), CValidError_bioseq::ValidateBadGeneOverlap(), CValidError_bioseq::ValidateSeqDescContext(), CSpliceProblems::ValidateSpliceExon(), CSpliceProblems::ValidateSpliceMrna(), CGeneFeatFromOtherFeatDlg::x_AddGeneQuals(), x_GetDivisionProc(), CDeflineGenerator::x_GetLongestProtein(), x_GetSegSeqInfoViaCDS(), x_GetSourceFeatViaCDS(), CValidError_bioseq::x_IsSameAsCDS(), CConvertFeatureBase::x_MoveFeatureToProtein(), CCdregionValidator::x_ValidateBadMRNAOverlap(), CCdregionValidator::x_ValidateCDSPeptides(), CRNAValidator::x_ValidateTrnaOverlap(), and CFeatTableEdit::xGenerateMissingMrnaForCds().
CMappedFeat GetBestParentForFeat | ( | const CMappedFeat & | feat, |
CSeqFeatData::ESubtype | parent_subtype, | ||
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 |
||
) |
Definition at line 3462 of file feature.cpp.
References CFeatTree::GetParent(), and NCBI_THROW.
Referenced by GetBestOverlappingFeat(), CFeatureIndex::GetBestParent(), s_VerifyTree(), CGff3Writer::xAssignFeatureAttributeParentCds(), CGff3Writer::xAssignFeatureAttributeParentMrna(), CGff3Writer::xAssignFeatureAttributeParentpreRNA(), CGff3Writer::xAssignFeatureAttributeParentRegion(), and CGff3Writer::xAssignFeatureAttributeParentVDJsegmentCregion().
void GetCdssForGene | ( | const CMappedFeat & | gene_feat, |
list< CMappedFeat > & | cds_feats, | ||
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 |
||
) |
Definition at line 3409 of file feature.cpp.
References CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, CFeatTree::GetChildren(), CSeq_feat_Handle::GetFeatSubtype(), ITERATE, and NCBI_THROW.
Referenced by GetRelatedFeatures(), CAlignedFeatureGraph::x_GatherCluster(), and CFlatFeatureRetrieveJob::x_Run().
vector< CMappedFeat > CFeatTree::GetChildren | ( | const CMappedFeat & | feat | ) |
Return all nearest children of a feature.
Will throw an exception if the feature is not in the tree. Will return an empty vector if the feature has no children. If the feat argument is null then all the features without parent are returned.
Definition at line 3100 of file feature.cpp.
References CFeatTree::GetChildrenTo().
Referenced by GetBestCdsForMrna(), GetCdssForGene(), GetMrnasForGene(), CFeatTree::GetRootFeatures(), and s_SetChildrenFeatureIds().
|
inline |
Definition at line 362 of file feature.hpp.
References CFeatTree::CFeatInfo::IsGene(), and CFeatTree::CFeatInfo::m_Gene.
Referenced by CFeatTree::x_AssignGenes().
void CFeatTree::GetChildrenTo | ( | const CMappedFeat & | feat, |
vector< CMappedFeat > & | children | ||
) |
Store all nearest children of a feature into a vector.
Will throw an exception if the feature is not in the tree. The second argument will become empty if the feature has no children. If the feat argument is null then all the features without parent are returned.
Definition at line 3108 of file feature.cpp.
References ITERATE, CFeatTree::CFeatInfo::m_Children, CFeatTree::m_RootInfo, CFeatTree::x_AssignParents(), CFeatTree::x_GetChildren(), and CFeatTree::x_GetInfo().
Referenced by CFeatTree::GetChildren(), and CFeatTree::GetRootFeaturesTo().
|
inline |
Definition at line 206 of file feature.hpp.
References CFeatTree::m_FeatIdMode.
size_t CFeatIdRemapper::GetFeatIdsCount | ( | void | ) | const |
Definition at line 800 of file feature.cpp.
References CFeatIdRemapper::m_IdMap, and map_checker< Container >::size().
bool GetFeatureGeneBiotype | ( | feature::CFeatTree & | ft, |
CMappedFeat | mf, | ||
string & | biotype | ||
) |
Definition at line 4495 of file feature.cpp.
References sGetFeatureGeneBiotypeWrapper().
bool GetFeatureGeneBiotypeFaster | ( | feature::CFeatTree & | ft, |
CMappedFeat | mf, | ||
string & | biotype | ||
) |
Definition at line 4485 of file feature.cpp.
References sGetFeatureGeneBiotypeWrapper().
Referenced by CGff2Writer::xAssignFeatureAttributeGeneBiotype().
|
inline |
Definition at line 228 of file feature.hpp.
References CFeatTree::m_GeneCheckMode.
Referenced by CFeatTree::x_AssignParentsByOverlap().
|
inline |
Mode for taking into account gene xref to a missing genes.
Definition at line 235 of file feature.hpp.
References CFeatTree::m_IgnoreMissingGeneXref.
Referenced by CFeatTree::x_AssignParentByRef().
void GetLabel | ( | const CSeq_feat & | feat, |
string * | label, | ||
ELabelType | label_type, | ||
CScope * | scope = 0 |
||
) |
Definition at line 779 of file feature.cpp.
References eBoth, eContent, eType, fFGL_Both, fFGL_Content, fFGL_Type, flags, GetLabel(), and label.
void GetLabel | ( | const CSeq_feat & | feat, |
string * | label, | ||
TFeatLabelFlags | flags, | ||
CScope * | scope = 0 |
||
) |
Definition at line 742 of file feature.cpp.
References fFGL_Content, fFGL_Type, flags, label, s_GetContentLabel(), and s_GetTypeLabel().
Referenced by GetLabel(), and CFeatComparatorByLabel::Less().
const CMappedFeat & CFeatTree::GetMappedFeat | ( | const CSeq_feat_Handle & | feat | ) | const |
Find a corresponding CMappedFeat for a feature already added to a tree.
Will throw an exception if the feature is not in the tree.
Definition at line 2084 of file feature.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), CFeatTree::m_InfoMap, and NCBI_THROW.
void GetMrnasForGene | ( | const CMappedFeat & | gene_feat, |
list< CMappedFeat > & | mrna_feats, | ||
CFeatTree * | feat_tree = 0 , |
||
const SAnnotSelector * | base_sel = 0 |
||
) |
Definition at line 3384 of file feature.cpp.
References CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, CFeatTree::GetChildren(), CSeq_feat_Handle::GetFeatSubtype(), ITERATE, and NCBI_THROW.
Referenced by CAlignedFeatureGraph::x_GatherCluster(), and CFlatFeatureRetrieveJob::x_Run().
CMappedFeat CFeatTree::GetParent | ( | const CMappedFeat & | feat | ) |
Return nearest parent of a feature.
Will throw an exception if the feature is not in the tree. Will return null CMappedFeat if the feature has no parent.
Definition at line 3067 of file feature.cpp.
References info, CFeatTree::x_GetInfo(), and CFeatTree::x_GetParent().
Referenced by CCdsMatchInfo::AssignMatch(), CFeatTree::GetBestGene(), GetBestMrnaForCds(), GetBestParentForFeat(), and CFeatTree::GetParent().
CMappedFeat CFeatTree::GetParent | ( | const CMappedFeat & | feat, |
CSeqFeatData::E_Choice | type | ||
) |
Return parent of a feature of the specified type, it may be not the nearest parent, but a parent's parent, and so on.
Will throw an exception if the feature is not in the tree. Will return null CMappedFeat if the feature has no parent of the type.
Definition at line 3078 of file feature.cpp.
References CSeq_feat_Handle::GetFeatType(), and CFeatTree::GetParent().
CMappedFeat CFeatTree::GetParent | ( | const CMappedFeat & | feat, |
CSeqFeatData::ESubtype | subtype | ||
) |
Return parent of a feature of the specified subtype, it may be not the nearest parent, but a parent's parent, and so on.
Will throw an exception if the feature is not in the tree. Will return null CMappedFeat if the feature has no parent of the type.
Definition at line 3089 of file feature.cpp.
References CSeq_feat_Handle::GetFeatSubtype(), and CFeatTree::GetParent().
CMappedFeat GetParentFeature | ( | const CMappedFeat & | feat | ) |
Definition at line 1615 of file feature.cpp.
References CSeq_feat_Handle::GetFeatSubtype(), CMappedFeat::GetLocation(), and CSeq_feat_Handle::GetScope().
Referenced by CGtfWriter::xAssignFeatureAttributeTranscriptId().
|
inline |
Return all root features (w/o parent).
Definition at line 322 of file feature.hpp.
References CFeatTree::GetChildren().
|
inline |
Store all root features (w/o parent) into a vector.
Definition at line 326 of file feature.hpp.
References CFeatTree::GetChildrenTo().
|
inline |
Definition at line 245 of file feature.hpp.
References CFeatTree::m_SNPStrandMode.
|
inline |
Definition at line 353 of file feature.hpp.
References CSeq_feat_Handle::GetFeatSubtype(), and CFeatTree::CFeatInfo::m_Feat.
Referenced by CDisambiguator::Add(), CFeatTree::CFeatInfo::IsGene(), CFeatTree::x_AssignParentsByOverlap(), and CFeatTree::x_LookupParentByRef().
const CTSE_Handle & CFeatTree::CFeatInfo::GetTSE | ( | void | ) | const |
Definition at line 3165 of file feature.cpp.
|
inline |
Definition at line 359 of file feature.hpp.
References CFeatTree::CFeatInfo::IsGene(), and CFeatTree::CFeatInfo::IsSetGene().
Referenced by CFeatTree::x_AssignGenes().
|
inline |
Definition at line 356 of file feature.hpp.
References CSeqFeatData::eSubtype_gene, and CFeatTree::CFeatInfo::GetSubtype().
Referenced by CFeatTree::CFeatInfo::GetChildrenGene(), and CFeatTree::CFeatInfo::GivesGeneToChildren().
ELocationInFrame IsLocationInFrame | ( | const CSeq_feat_Handle & | cds, |
const CSeq_loc & | loc | ||
) |
Determines whether location loc is in frame with coding region cds.
cds | coding region feature [in] |
loc | location to compare to coding region |
Definition at line 3818 of file feature.cpp.
References Compare(), eContains, eExtreme_Biological, CCdregion_Base::eFrame_not_set, CCdregion_Base::eFrame_one, CCdregion_Base::eFrame_three, CCdregion_Base::eFrame_two, eLocationInFrame_BadStart, eLocationInFrame_BadStartAndStop, eLocationInFrame_BadStop, eLocationInFrame_InFrame, eLocationInFrame_NotIn, eOffset_FromStart, eSame, fCompareOverlapping, CSeqFeatData_Base::GetCdregion(), CSeq_feat_Handle::GetData(), CCdregion_Base::GetFrame(), GetLength(), CSeq_feat_Handle::GetLocation(), CSeq_feat_Handle::GetScope(), CSeqFeatData_Base::IsCdregion(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), CSeq_feat_Handle::IsSetData(), LocationOffset(), s_MakePointForLocationStop(), and tmp.
Referenced by BOOST_AUTO_TEST_CASE(), CCleanup::GetProteinLocationFromNucleotideLocation(), s_GetCdsByLocation(), and CPeptideValidator::x_ValidatePeptideOnCodonBoundary().
|
inline |
Definition at line 350 of file feature.hpp.
References CFeatTree::CFeatInfo::m_IsSetGene.
Referenced by CFeatTree::CFeatInfo::GivesGeneToChildren(), and CFeatTree::x_SetGeneRecursive().
|
inline |
Definition at line 347 of file feature.hpp.
References CFeatTree::CFeatInfo::m_IsSetParent.
|
virtual |
Implements IFeatComparator.
Definition at line 891 of file feature.cpp.
References NStr::Compare(), NStr::CompareNocase(), fFGL_Both, CSeq_feat_Base::GetComment(), CSeq_feat_Base::GetData(), CSeqFeatData_Base::GetGene(), CObject_id_Base::GetId(), CSeq_feat_Base::GetId(), GetLabel(), CFeat_id_Base::GetLocal(), CGene_ref_Base::GetLocus_tag(), CObject_id_Base::GetStr(), CSeqFeatData_Base::IsCdregion(), CSeqFeatData_Base::IsGene(), CObject_id_Base::IsId(), CFeat_id_Base::IsLocal(), CSeq_feat_Base::IsSetComment(), CSeq_feat_Base::IsSetData(), CSeq_feat_Base::IsSetId(), CGene_ref_Base::IsSetLocus_tag(), CObject_id_Base::IsStr(), CObject_id_Base::Which(), and CFeat_id_Base::Which().
CMappedFeat MapSeq_feat | ( | const CSeq_feat_Handle & | feat, |
const CBioseq_Handle & | master_seq | ||
) |
Definition at line 1011 of file feature.cpp.
References MapSeq_feat().
CMappedFeat MapSeq_feat | ( | const CSeq_feat_Handle & | feat, |
const CBioseq_Handle & | master_seq, | ||
const CRange< TSeqPos > & | range | ||
) |
Definition at line 973 of file feature.cpp.
References depth, CSeq_feat_Handle::GetAnnot(), CSeq_feat_Handle::GetFeatSubtype(), CSeq_feat_Base::GetLocation(), CSeq_feat_Handle::GetOriginalSeq_feat(), NCBI_THROW, compile_time_bits::range(), SAnnotSelector::SetExactDepth(), SAnnotSelector::SetLimitSeqAnnot(), SAnnotSelector::SetResolveAll(), SAnnotSelector::SetResolveDepth(), and SAnnotSelector::SetSourceLoc().
Referenced by MapSeq_feat().
CMappedFeat MapSeq_feat | ( | const CSeq_feat_Handle & | feat, |
const CSeq_id_Handle & | master_id | ||
) |
Definition at line 1019 of file feature.cpp.
References CScope::GetBioseqHandle(), CSeq_feat_Handle::GetScope(), MapSeq_feat(), and NCBI_THROW.
CMappedFeat MapSeq_feat | ( | const CSeq_feat_Handle & | feat, |
const CSeq_id_Handle & | master_id, | ||
const CRange< TSeqPos > & | range | ||
) |
Definition at line 997 of file feature.cpp.
References CScope::GetBioseqHandle(), CSeq_feat_Handle::GetScope(), MapSeq_feat(), NCBI_THROW, and compile_time_bits::range().
Definition at line 1977 of file feature.cpp.
References CFeatTree::AddFeature(), map_checker< Container >::clear(), ITERATE, CFeatTree::m_AssignedGenes, CFeatTree::m_AssignedParents, CFeatTree::m_BestGeneFeatIdMode, CFeatTree::m_FeatIdMode, CFeatTree::m_GeneCheckMode, CFeatTree::m_IgnoreMissingGeneXref, CFeatTree::m_Index, CFeatTree::m_InfoArray, CFeatTree::m_InfoMap, CFeatTree::m_RootInfo, and CFeatTree::m_SNPStrandMode.
bool PromoteCDSToNucProtSet | ( | objects::CSeq_feat_Handle & | orig_feat | ) |
Promotes coding region from Seq-annot on nucleotide sequence to Seq-annot on nuc-prot-set if necessary and appropriate.
orig_feat | coding region feature [in] |
Definition at line 3914 of file feature.cpp.
References CSeq_entry_EditHandle::AttachAnnot(), CBioseq_set_Base::eClass_nuc_prot, CSeq_annot_CI::eSearch_entry, ftable, CSeq_feat_EditHandle::GetAnnot(), CScope::GetBioseqHandle(), CBioseq_set_Handle::GetClass(), CSeq_annot_Base::GetData(), CSeq_annot_Handle::GetEditHandle(), CSeq_entry_Handle::GetEditHandle(), CSeq_annot_Base::C_Data::GetFtable(), CSeq_entry_Handle::GetParentBioseq_set(), CBioseq_set_Handle::GetParentEntry(), CSeq_annot_Handle::GetParentEntry(), CSeq_annot_EditHandle::GetParentEntry(), CBioseq_Handle::GetScope(), CSeq_annot_Handle::GetSeq_annotCore(), CSeq_entry_Handle::GetSet(), CSeq_entry_Handle::IsSet(), CBioseq_set_Handle::IsSetClass(), CSeq_annot_EditHandle::Remove(), CSeq_annot_Base::SetData(), and CSeq_annot_EditHandle::TakeFeat().
Referenced by BOOST_AUTO_TEST_CASE(), CCmdChangeSeq_feat::Execute(), and CNewCleanup_imp::x_MoveCDSFromNucAnnotToSetAnnot().
void ReassignFeatureIds | ( | const CSeq_annot_EditHandle & | annot | ) |
Definition at line 3797 of file feature.cpp.
References ClearFeatureIds(), and s_SetChildrenFeatureIds().
void ReassignFeatureIds | ( | const CSeq_entry_EditHandle & | entry | ) |
Definition at line 3787 of file feature.cpp.
References ClearFeatureIds(), and s_SetChildrenFeatureIds().
Definition at line 835 of file feature.cpp.
References CAnnotTypes_CI::GetAnnot(), CSeq_annot_Handle::GetTSE_Handle(), local, and CFeatIdRemapper::RemapId().
bool CFeatIdRemapper::RemapId | ( | CFeat_id & | id, |
const CTSE_Handle & | tse | ||
) |
Definition at line 817 of file feature.cpp.
References local, and CFeatIdRemapper::RemapId().
int CFeatIdRemapper::RemapId | ( | int | old_id, |
const CTSE_Handle & | tse | ||
) |
Definition at line 806 of file feature.cpp.
References int, ncbi::grid::netcache::search::fields::key, CFeatIdRemapper::m_IdMap, and map_checker< Container >::size().
Referenced by CFeatIdRemapper::RemapId(), and CFeatIdRemapper::RemapIds().
Definition at line 873 of file feature.cpp.
References CMappedFeat::GetMappedFeature(), CSeq_feat_Base::IsSetId(), CSeqFeatXref_Base::IsSetId(), CSeq_feat_Base::IsSetXref(), NON_CONST_ITERATE, CFeatIdRemapper::RemapId(), SerialClone(), CSeq_feat_Base::SetId(), CSeqFeatXref_Base::SetId(), and CSeq_feat_Base::SetXref().
bool CFeatIdRemapper::RemapIds | ( | CSeq_feat & | feat, |
const CTSE_Handle & | tse | ||
) |
Definition at line 853 of file feature.cpp.
References CSeq_feat_Base::IsSetId(), CSeqFeatXref_Base::IsSetId(), CSeq_feat_Base::IsSetXref(), NON_CONST_ITERATE, CFeatIdRemapper::RemapId(), CSeq_feat_Base::SetId(), CSeqFeatXref_Base::SetId(), and CSeq_feat_Base::SetXref().
void CFeatIdRemapper::Reset | ( | void | ) |
Definition at line 794 of file feature.cpp.
References map_checker< Container >::clear(), and CFeatIdRemapper::m_IdMap.
RetranslateCDS A function to replace the protein Bioseq pointed to by cds.product with the current translation of the coding region cds.
cds | The feature for which adjustments are to be made |
Definition at line 4121 of file feature.cpp.
References AdjustForCDSPartials(), CSerialObject::Assign(), CSeq_feat_Base::CanGetLocation(), CSeq_interval_Base::CanGetTo(), CSeqFeatData::eSubtype_prot, f(), CScope::GetBioseqHandle(), CSeq_feat_Base::GetData(), CBioseq_Handle::GetEditHandle(), CSeq_entry_Handle::GetEditHandle(), CBioseq_Base::GetInst(), CSeq_loc_Base::GetInt(), CBioseq::GetLength(), CSeq_feat_Base::GetLocation(), CSeq_annot_Handle::GetParentEntry(), CSeq_feat_Base::GetProduct(), CBioseq_Handle::GetSeq_entry_Handle(), CSeqFeatData_Base::IsCdregion(), CSeq_loc_Base::IsInt(), CBioseq_Handle::IsProtein(), CSeq_feat_Base::IsSetData(), CBioseq_Base::IsSetInst(), CSeq_feat_Base::IsSetProduct(), CSeq_feat_EditHandle::Replace(), CBioseq_EditHandle::SetInst(), CSeq_feat_Base::SetLocation(), and CSeqTranslator::TranslateToProtein().
Referenced by ApplyPolicyToFeature(), ExtendPartialFeatureEnds(), CCleanup::WGSCleanup(), CCleanupApp::x_BatchExtendCDS(), and CCleanupApp::x_FixCDS().
void CFeatTree::SetBestGeneFeatIdMode | ( | EBestGeneFeatIdMode | mode | ) |
void CFeatTree::SetFeatIdMode | ( | EFeatIdMode | mode | ) |
Definition at line 2012 of file feature.cpp.
References CFeatTree::m_FeatIdMode.
void CFeatTree::SetGeneCheckMode | ( | EGeneCheckMode | mode | ) |
Definition at line 2018 of file feature.cpp.
References CFeatTree::m_GeneCheckMode.
Definition at line 2024 of file feature.cpp.
References CFeatTree::m_IgnoreMissingGeneXref.
void CFeatTree::SetSNPStrandMode | ( | ESNPStrandMode | mode | ) |
Definition at line 2030 of file feature.cpp.
References CFeatTree::m_SNPStrandMode.
|
protected |
Definition at line 2862 of file feature.cpp.
References arr, CFeatTree::eBestGeneFeatId_always, CSeqFeatData::eSubtype_gene, CFeatTree::CFeatInfo::GetChildrenGene(), CFeatTree::CFeatInfo::GivesGeneToChildren(), info, CFeatTree::m_AssignedGenes, CFeatTree::m_BestGeneFeatIdMode, CFeatTree::m_InfoArray, swap(), CFeatTree::x_AssignGenesByOverlap(), CFeatTree::x_LookupParentByRef(), CFeatTree::x_SetGene(), and CFeatTree::x_SetGeneRecursive().
Referenced by CFeatTree::GetBestGene().
|
protected |
Definition at line 2818 of file feature.cpp.
References _ASSERT, cnt, CSeqFeatData::eSubtype_gene, CFeatTreeIndex::GetIndex(), i, info, CFeatTreeIndex::m_CanonicalIds, CFeatTree::m_Index, CFeatTree::m_InfoArray, s_CollectBestOverlaps(), and CFeatTree::x_SetGene().
Referenced by CFeatTree::x_AssignGenes().
Definition at line 2174 of file feature.cpp.
References _ASSERT, CFeatTree::eBestGeneFeatId_ignore, CFeatTree::eFeatId_always, CFeatTree::eFeatId_by_type, CFeatTree::eFeatId_ignore, CSeqFeatData::eSubtype_any, CSeqFeatData::eSubtype_gene, CFeatTree::GetIgnoreMissingGeneXref(), info, CFeatTree::m_BestGeneFeatIdMode, CFeatTree::m_FeatIdMode, STypeLink::m_ParentType, CFeatTree::x_LookupParentByRef(), CFeatTree::x_SetGene(), and CFeatTree::x_SetParent().
Referenced by CFeatTree::x_AssignParents().
|
protected |
Definition at line 2931 of file feature.cpp.
References CFeatTree::eFeatId_always, CFeatTree::eFeatId_ignore, CSeqFeatData::eSubtype_max, info, ITERATE, CFeatTree::m_AssignedParents, CFeatTree::m_FeatIdMode, CFeatTree::m_InfoArray, CFeatTree::m_InfoMap, ct::sort(), type, CFeatTree::x_AssignParentByRef(), CFeatTree::x_AssignParentsByOverlap(), CFeatTree::x_SetNoParent(), and CFeatTree::x_VerifyLinkedToRoot().
Referenced by CFeatTree::GetChildrenTo(), CFeatTree::x_GetChildren(), and CFeatTree::x_GetParent().
|
protected |
Definition at line 2731 of file feature.cpp.
References _ASSERT, cnt, CFeatTree::eGeneCheck_match, CSeqFeatData::eSubtype_bad, CSeqFeatData::eSubtype_gene, CFeatTree::GetGeneCheckMode(), CFeatTreeIndex::GetIndex(), STypeLink::GetMultiParentTypes(), CFeatTree::CFeatInfo::GetSubtype(), i, info, ITERATE, STypeLink::m_ByProduct, CFeatTreeIndex::m_CanonicalIds, CFeatTree::m_Index, CFeatTree::m_InfoArray, STypeLink::m_ParentType, s_AllowedParentByOverlap(), s_CollectBestOverlaps(), swap(), CFeatTree::x_SetNoParent(), and CFeatTree::x_SetParent().
Referenced by CFeatTree::x_AssignParents().
|
protected |
Definition at line 2095 of file feature.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), and CFeatTree::m_InfoMap.
Referenced by CFeatTree::x_LookupParentByRef().
|
protected |
Definition at line 3060 of file feature.cpp.
References info, and CFeatTree::x_AssignParents().
Referenced by CFeatTree::GetChildrenTo().
|
protected |
Definition at line 2067 of file feature.cpp.
References CMappedFeat::GetSeq_feat_Handle(), and CFeatTree::x_GetInfo().
|
protected |
Definition at line 2073 of file feature.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), CFeatTree::m_InfoMap, and NCBI_THROW.
Referenced by CFeatTree::GetBestGene(), CFeatTree::GetChildrenTo(), CFeatTree::GetParent(), and CFeatTree::x_GetInfo().
|
protected |
Definition at line 3051 of file feature.cpp.
References info, and CFeatTree::x_AssignParents().
Referenced by CFeatTree::GetParent().
|
protected |
Definition at line 2000 of file feature.cpp.
References CFeatTree::eBestGeneFeatId_always, CFeatTree::eFeatId_by_type, CFeatTree::eGeneCheck_match, CFeatTree::eSNPStrand_both, CFeatTree::m_AssignedGenes, CFeatTree::m_AssignedParents, CFeatTree::m_BestGeneFeatIdMode, CFeatTree::m_FeatIdMode, CFeatTree::m_GeneCheckMode, CFeatTree::m_IgnoreMissingGeneXref, and CFeatTree::m_SNPStrandMode.
Referenced by CFeatTree::CFeatTree().
|
protected |
Definition at line 2106 of file feature.cpp.
References data, CSeqFeatData::eSubtype_any, CSeqFeatData::eSubtype_gene, CSeqFeatXref_Base::GetData(), CTSE_Handle::GetFeaturesWithId(), CTSE_Handle::GetGenesByRef(), CSeqFeatXref_Base::GetId(), CFeatTree::CFeatInfo::GetSubtype(), info, CSeqFeatXref_Base::IsSetData(), CSeqFeatXref_Base::IsSetId(), ITERATE, and CFeatTree::x_FindInfo().
Referenced by CFeatTree::x_AssignGenes(), and CFeatTree::x_AssignParentByRef().
Definition at line 3043 of file feature.cpp.
Referenced by CFeatTree::x_AssignGenes(), CFeatTree::x_AssignGenesByOverlap(), CFeatTree::x_AssignParentByRef(), and CFeatTree::x_SetGeneRecursive().
Definition at line 2850 of file feature.cpp.
References info, CFeatTree::CFeatInfo::IsSetGene(), ITERATE, and CFeatTree::x_SetGene().
Referenced by CFeatTree::x_AssignGenes().
|
protected |
Definition at line 3033 of file feature.cpp.
References _ASSERT, info, CFeatTree::CFeatInfo::m_Children, and CFeatTree::m_RootInfo.
Referenced by CFeatTree::x_AssignParents(), and CFeatTree::x_AssignParentsByOverlap().
Definition at line 3020 of file feature.cpp.
References _ASSERT, info, CFeatTree::CFeatInfo::m_Children, CFeatTree::CFeatInfo::m_IsLinkedToRoot, and CFeatTree::CFeatInfo::m_IsSetChildren.
Referenced by CFeatTree::x_AssignParentByRef(), and CFeatTree::x_AssignParentsByOverlap().
|
protected |
Definition at line 3000 of file feature.cpp.
References _ASSERT, info, MSerial_AsnText, NCBI_THROW, NcbiCout, and NcbiEndl.
Referenced by CFeatTree::x_AssignParents().
CFeatTree::CFeatInfo::~CFeatInfo | ( | void | ) |
Definition at line 3160 of file feature.cpp.
CFeatTree::~CFeatTree | ( | void | ) |
Destructor.
Definition at line 1966 of file feature.cpp.
size_t CFeatTree::CFeatInfo::m_AddIndex |
Definition at line 368 of file feature.hpp.
Referenced by PByFeatInfoAddIndex::operator()().
|
protected |
Definition at line 417 of file feature.hpp.
Referenced by CFeatTree::operator=(), CFeatTree::x_AssignGenes(), and CFeatTree::x_Init().
|
protected |
Definition at line 417 of file feature.hpp.
Referenced by CFeatTree::operator=(), CFeatTree::x_AssignParents(), and CFeatTree::x_Init().
|
protected |
Definition at line 422 of file feature.hpp.
Referenced by CFeatTree::GetBestGeneFeatIdMode(), CFeatTree::operator=(), CFeatTree::x_AssignGenes(), CFeatTree::x_AssignParentByRef(), and CFeatTree::x_Init().
bool CFeatTree::CFeatInfo::m_CanMatchByQual |
Definition at line 371 of file feature.hpp.
TChildren CFeatTree::CFeatInfo::m_Children |
Definition at line 381 of file feature.hpp.
Referenced by CDisambiguator::Add(), CFeatTree::GetChildrenTo(), CFeatTree::x_SetNoParent(), and CFeatTree::x_SetParent().
CMappedFeat CFeatTree::CFeatInfo::m_Feat |
Definition at line 369 of file feature.hpp.
Referenced by CFeatTree::GetBestGene(), CFeatTree::CFeatInfo::GetSubtype(), and s_CollectBestOverlaps().
|
protected |
Definition at line 421 of file feature.hpp.
Referenced by CFeatTree::GetFeatIdMode(), CFeatTree::operator=(), CFeatTree::SetFeatIdMode(), CFeatTree::x_AssignParentByRef(), CFeatTree::x_AssignParents(), and CFeatTree::x_Init().
CFeatInfo* CFeatTree::CFeatInfo::m_Gene |
Definition at line 380 of file feature.hpp.
Referenced by CFeatTree::GetBestGene(), and CFeatTree::CFeatInfo::GetChildrenGene().
|
protected |
Definition at line 423 of file feature.hpp.
Referenced by CFeatTree::GetGeneCheckMode(), CFeatTree::operator=(), CFeatTree::SetGeneCheckMode(), and CFeatTree::x_Init().
|
private |
Definition at line 117 of file feature.hpp.
Referenced by CFeatIdRemapper::GetFeatIdsCount(), CFeatIdRemapper::RemapId(), and CFeatIdRemapper::Reset().
|
protected |
Definition at line 424 of file feature.hpp.
Referenced by CFeatTree::GetIgnoreMissingGeneXref(), CFeatTree::operator=(), CFeatTree::SetIgnoreMissingGeneXref(), and CFeatTree::x_Init().
|
protected |
Definition at line 426 of file feature.hpp.
Referenced by CFeatTree::operator=(), CFeatTree::x_AssignGenesByOverlap(), and CFeatTree::x_AssignParentsByOverlap().
|
protected |
Definition at line 419 of file feature.hpp.
Referenced by CFeatTree::AddFeature(), CFeatTree::operator=(), CFeatTree::x_AssignGenes(), CFeatTree::x_AssignGenesByOverlap(), CFeatTree::x_AssignParents(), and CFeatTree::x_AssignParentsByOverlap().
|
protected |
Definition at line 418 of file feature.hpp.
Referenced by CFeatTree::AddFeature(), CFeatTree::GetMappedFeat(), CFeatTree::operator=(), CFeatTree::x_AssignParents(), CFeatTree::x_FindInfo(), and CFeatTree::x_GetInfo().
EIsLinkedToRoot CFeatTree::CFeatInfo::m_IsLinkedToRoot |
Definition at line 378 of file feature.hpp.
Referenced by CFeatTree::x_SetParent().
bool CFeatTree::CFeatInfo::m_IsSetChildren |
Definition at line 372 of file feature.hpp.
Referenced by CFeatTree::x_SetParent().
bool CFeatTree::CFeatInfo::m_IsSetGene |
Definition at line 372 of file feature.hpp.
Referenced by CFeatTree::CFeatInfo::IsSetGene().
bool CFeatTree::CFeatInfo::m_IsSetParent |
Definition at line 372 of file feature.hpp.
Referenced by CFeatTree::CFeatInfo::IsSetParent().
Definition at line 370 of file feature.hpp.
bool CFeatTree::CFeatInfo::m_MultiId |
Definition at line 372 of file feature.hpp.
CFeatInfo* CFeatTree::CFeatInfo::m_Parent |
Definition at line 379 of file feature.hpp.
|
protected |
Definition at line 420 of file feature.hpp.
Referenced by CFeatTree::GetChildrenTo(), CFeatTree::operator=(), and CFeatTree::x_SetNoParent().
|
protected |
Definition at line 425 of file feature.hpp.
Referenced by CFeatTree::GetSNPStrandMode(), CFeatTree::operator=(), CFeatTree::SetSNPStrandMode(), and CFeatTree::x_Init().