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.
enum EStrandMatchRule { eStrandMatch_all , eStrandMatch_at_least_one , eStrandMatch_any } typedef pair< Int8, CMappedFeat > TMappedFeatScore typedef vector< TMappedFeatScore > TMappedFeatScores bool sFeatureGetChildrenOfSubtypeFaster (CMappedFeat, CSeqFeatData::ESubtype, vector< CMappedFeat > &, feature::CFeatTree &) bool sFeatureGetChildrenOfSubtype (CMappedFeat, CSeqFeatData::ESubtype, vector< CMappedFeat > &) bool sGetFeatureGeneBiotypeWrapper (feature::CFeatTree &, CMappedFeat, string &, bool) CMappedFeat GetParentFeature (const CMappedFeat &feat) static EStrandMatchRule s_GetStrandMatchRule (const STypeLink &link, const CFeatTree::CFeatInfo &info, const CFeatTree *tree) static bool s_IsNotSubrange (const CRange< TSeqPos > &r1, const CRange< TSeqPos > &r2) static void s_CollectBestOverlaps (CFeatTree::TFeatArray &features, TBestArray &bests, const STypeLink &link, TRangeArray &pp, CFeatTree *tree, TCanonicalIdsMap &ids_map) static bool s_AllowedParentByOverlap (CSeqFeatData::ESubtype child, CSeqFeatData::ESubtype parent) CMappedFeat GetBestGeneForMrna (const CMappedFeat &mrna_feat, CFeatTree *feat_tree, const SAnnotSelector *base_sel, CFeatTree::EBestGeneType lookup_type) CMappedFeat GetBestGeneForCds (const CMappedFeat &cds_feat, CFeatTree *feat_tree, const SAnnotSelector *base_sel, CFeatTree::EBestGeneType lookup_type) CMappedFeat GetBestMrnaForCds (const CMappedFeat &cds_feat, CFeatTree *feat_tree, const SAnnotSelector *base_sel) CMappedFeat GetBestCdsForMrna (const CMappedFeat &mrna_feat, CFeatTree *feat_tree, const SAnnotSelector *base_sel) void GetMrnasForGene (const CMappedFeat &gene_feat, list< CMappedFeat > &mrna_feats, CFeatTree *feat_tree, const SAnnotSelector *base_sel) void GetCdssForGene (const CMappedFeat &gene_feat, list< CMappedFeat > &cds_feats, CFeatTree *feat_tree, const SAnnotSelector *base_sel) CMappedFeat GetBestGeneForFeat (const CMappedFeat &feat, CFeatTree *feat_tree, const SAnnotSelector *base_sel, CFeatTree::EBestGeneType lookup_type) CMappedFeat GetBestParentForFeat (const CMappedFeat &feat, CSeqFeatData::ESubtype parent_type, CFeatTree *feat_tree, const SAnnotSelector *base_sel) static void GetOverlappingFeatures (CScope &scope, const CSeq_loc &loc, CSeqFeatData::E_Choice, CSeqFeatData::ESubtype feat_subtype, sequence::EOverlapType overlap_type, TMappedFeatScores &feats, const SAnnotSelector *base_sel) static CMappedFeat GetBestOverlappingFeat (CScope &scope, const CSeq_loc &loc, CSeqFeatData::ESubtype feat_subtype, sequence::EOverlapType overlap_type, TBestFeatOpts opts, const SAnnotSelector *base_sel) CMappedFeat GetBestOverlappingFeat (const CMappedFeat &feat, CSeqFeatData::ESubtype need_subtype, sequence::EOverlapType overlap_type, CFeatTree *feat_tree, const SAnnotSelector *base_sel) CRef< CSeq_loc_Mapper > CreateSeqLocMapperFromFeat (const CSeq_feat &feat, CSeq_loc_Mapper::EFeatMapDirection dir, CScope *scope) Create CSeq_loc_Mapper from a feature, check for special cases like exceptions in CDS features. More...RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4