NCBI C++ ToolKit
Classes | Macros | Enumerations | Functions
gather_items.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <objects/seq/Bioseq.hpp>
#include <objects/seq/Seq_inst.hpp>
#include <objects/seq/Seq_hist.hpp>
#include <objects/seq/Seq_hist_rec.hpp>
#include <objects/seq/Seqdesc.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/seq/Seq_ext.hpp>
#include <objects/seq/Delta_ext.hpp>
#include <objects/seq/Delta_seq.hpp>
#include <objects/seq/Seq_literal.hpp>
#include <objects/seq/Annotdesc.hpp>
#include <objects/seq/Annot_descr.hpp>
#include <objects/seq/Seq_gap.hpp>
#include <objects/seq/Linkage_evidence.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objects/general/User_object.hpp>
#include <objects/general/User_field.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/misc/sequence_macros.hpp>
#include <objects/pub/Pub.hpp>
#include <objects/pub/Pub_equiv.hpp>
#include <objects/seqblock/GB_block.hpp>
#include <objects/seqfeat/BioSource.hpp>
#include <objects/seqfeat/Org_ref.hpp>
#include <objects/seqfeat/OrgName.hpp>
#include <objmgr/scope.hpp>
#include <objmgr/bioseq_handle.hpp>
#include <objmgr/bioseq_ci.hpp>
#include <objmgr/seq_entry_handle.hpp>
#include <objmgr/seq_entry_ci.hpp>
#include <objmgr/seq_map.hpp>
#include <objmgr/seq_map_ci.hpp>
#include <objmgr/seqdesc_ci.hpp>
#include <objmgr/annot_ci.hpp>
#include <objmgr/feat_ci.hpp>
#include <objmgr/util/sequence.hpp>
#include <objmgr/util/feature.hpp>
#include <objmgr/seq_loc_mapper.hpp>
#include <objmgr/align_ci.hpp>
#include <objmgr/annot_selector.hpp>
#include <algorithm>
#include <objtools/format/item_ostream.hpp>
#include <objtools/format/flat_expt.hpp>
#include <objtools/format/items/contig_item.hpp>
#include <objtools/format/items/locus_item.hpp>
#include <objtools/format/items/defline_item.hpp>
#include <objtools/format/items/accession_item.hpp>
#include <objtools/format/items/version_item.hpp>
#include <objtools/format/items/keywords_item.hpp>
#include <objtools/format/items/source_item.hpp>
#include <objtools/format/items/reference_item.hpp>
#include <objtools/format/items/comment_item.hpp>
#include <objtools/format/items/basecount_item.hpp>
#include <objtools/format/items/sequence_item.hpp>
#include <objtools/format/items/feature_item.hpp>
#include <objtools/format/items/segment_item.hpp>
#include <objtools/format/items/ctrl_items.hpp>
#include <objtools/format/items/alignment_item.hpp>
#include <objtools/format/items/gap_item.hpp>
#include <objtools/format/items/html_anchor_item.hpp>
#include <objtools/format/gather_items.hpp>
#include <objtools/format/gather_iter.hpp>
#include <objtools/format/genbank_gather.hpp>
#include <objtools/format/embl_gather.hpp>
#include <objtools/format/ftable_gather.hpp>
#include <objtools/format/feature_gather.hpp>
#include <objtools/format/context.hpp>
#include <objtools/error_codes.hpp>
#include <objmgr/util/feature_edit.hpp>
#include <objmgr/util/objutil.hpp>
#include <objmgr/util/seq_loc_util.hpp>
#include <connect/ncbi_socket.hpp>
+ Include dependency graph for gather_items.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CSubtypeEquals
 
class  CDbEquals
 
class  COrgModEquals
 
struct  SSortSourceByLoc
 
struct  SGapIdxData
 

Macros

#define NCBI_USE_ERRCODE_X   Objtools_Fmt_Gather
 

Enumerations

enum  EEndsOnBioseqOpt { eEndsOnBioseqOpt_LastPartOfSeqLoc = 1 , eEndsOnBioseqOpt_AnyPartOfSeqLoc }
 

Functions

 USING_SCOPE (sequence)
 
static bool s_LocationsTouch (const CSeq_loc &loc1, const CSeq_loc &loc2)
 
static bool s_LocationsOverlap (const CSeq_loc &loc1, const CSeq_loc &loc2, CScope *p_scope)
 
static bool s_IsSegmented (const CBioseq_Handle &seq)
 
static bool s_HasSegments (const CBioseq_Handle &seq)
 
bool s_BioSeqHasContig (const CBioseq_Handle &seq, CFlatFileContext &ctx)
 
bool s_IsJustUids (const CPubdesc &pubdesc)
 
bool s_FilterPubdesc (const CPubdesc &pubdesc, CBioseqContext &ctx)
 
static bool s_IsCircularTopology (CBioseqContext &ctx)
 
static bool s_NsAreGaps (const CBioseq_Handle &seq, CBioseqContext &ctx)
 
bool s_HasRefTrackStatus (const CBioseq_Handle &bsh)
 
static bool s_GiInCSeq_hist_ids (const TGi gi, const CSeq_hist_rec_Base::TIds &ids)
 
static int s_StrucCommOrder (const string &str)
 
static bool s_SeqDescCompare (const CConstRef< CSeqdesc > &desc1, const CConstRef< CSeqdesc > &desc2)
 
static CConstRef< CSeq_locs_NormalizeNullsBetween (CConstRef< CSeq_loc > loc, bool force_adding_nulls=false)
 
void s_SetSelection (SAnnotSelector &sel, CBioseqContext &ctx)
 
static bool s_SeqLocEndsOnBioseq (const CSeq_loc &loc, CBioseqContext &ctx, EEndsOnBioseqOpt mode, CSeqFeatData::E_Choice feat_type)
 
static bool s_CopyCDSFromCDNA (CBioseqContext &ctx)
 
CSeqMap_CI s_CreateGapMapIter (const CSeq_loc &loc, CBioseqContext &ctx)
 
static CRef< CGapItems_NewGapItem (CSeqMap_CI &gap_it, CBioseqContext &ctx)
 
static CRef< CGapItems_NewGapItem (TSeqPos gap_start, TSeqPos gap_end, TSeqPos gap_length, const string &gap_type, const vector< string > &evidence, bool isUnknownLength, bool isAssemblyGap, CBioseqContext &ctx)
 
static bool s_IsDuplicateFeatures (const CSeq_feat_Handle &f1, const CSeq_feat_Handle &f2)
 
static string s_GetFeatDesc (const CSeq_feat_Handle &feat)
 
static void s_CleanCDDFeature (const CSeq_feat &feat)
 
bool s_CoincidingGapFeatures (CFeat_CI it, const TSeqPos gap_start, const TSeqPos gap_end)
 
static CMappedFeat s_GetMappedFeat (CRef< CSeq_feat > &feat, CScope &scope)
 
static CMappedFeat s_GetTrimmedMappedFeat (const CSeq_feat &feat, const CRange< TSeqPos > &range, CScope &scope)
 
static bool s_IsCDD (const CSeq_feat_Handle &feat)
 
static void s_SetGapIdxData (SGapIdxData &gapdat, const vector< CRef< CGapIndex >> &gaps)
 
CRef< CSeq_loc_Mappers_MakeSliceMapper (const CSeq_loc &loc, CBioseqContext &ctx)
 
static bool s_ContainsGaps (const CSeq_loc &loc)
 
SAnnotSelector s_GetCdsProductSel (CBioseqContext &ctx)
 
void s_FixIntervalProtToCds (const CSeq_feat &srcFeat, const CSeq_loc &srcLoc, CRef< CSeq_loc > pDestLoc)
 
static void s_GiveOneResidueIntervalsBogusFuzz_Helper (CSeq_interval &interval)
 
static void s_RemoveBogusFuzzFromIntervals_Helper (CSeq_interval &interval)
 

Macro Definition Documentation

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   Objtools_Fmt_Gather

Definition at line 114 of file gather_items.cpp.

Enumeration Type Documentation

◆ EEndsOnBioseqOpt

Enumerator
eEndsOnBioseqOpt_LastPartOfSeqLoc 
eEndsOnBioseqOpt_AnyPartOfSeqLoc 

Definition at line 2548 of file gather_items.cpp.

Function Documentation

◆ s_BioSeqHasContig()

bool s_BioSeqHasContig ( const CBioseq_Handle seq,
CFlatFileContext ctx 
)

◆ s_CleanCDDFeature()

static void s_CleanCDDFeature ( const CSeq_feat feat)
static

◆ s_CoincidingGapFeatures()

bool s_CoincidingGapFeatures ( CFeat_CI  it,
const TSeqPos  gap_start,
const TSeqPos  gap_end 
)

◆ s_ContainsGaps()

static bool s_ContainsGaps ( const CSeq_loc loc)
static

◆ s_CopyCDSFromCDNA()

static bool s_CopyCDSFromCDNA ( CBioseqContext ctx)
static

◆ s_CreateGapMapIter()

CSeqMap_CI s_CreateGapMapIter ( const CSeq_loc loc,
CBioseqContext ctx 
)

◆ s_FilterPubdesc()

bool s_FilterPubdesc ( const CPubdesc pubdesc,
CBioseqContext ctx 
)

◆ s_FixIntervalProtToCds()

void s_FixIntervalProtToCds ( const CSeq_feat srcFeat,
const CSeq_loc srcLoc,
CRef< CSeq_loc pDestLoc 
)

◆ s_GetCdsProductSel()

SAnnotSelector s_GetCdsProductSel ( CBioseqContext ctx)

◆ s_GetFeatDesc()

static string s_GetFeatDesc ( const CSeq_feat_Handle feat)
static

◆ s_GetMappedFeat()

static CMappedFeat s_GetMappedFeat ( CRef< CSeq_feat > &  feat,
CScope scope 
)
static

◆ s_GetTrimmedMappedFeat()

static CMappedFeat s_GetTrimmedMappedFeat ( const CSeq_feat feat,
const CRange< TSeqPos > &  range,
CScope scope 
)
static

◆ s_GiInCSeq_hist_ids()

static bool s_GiInCSeq_hist_ids ( const TGi  gi,
const CSeq_hist_rec_Base::TIds ids 
)
static

Definition at line 1426 of file gather_items.cpp.

References ITERATE.

Referenced by CFlatGatherer::x_HistoryComments().

◆ s_GiveOneResidueIntervalsBogusFuzz_Helper()

static void s_GiveOneResidueIntervalsBogusFuzz_Helper ( CSeq_interval interval)
static

◆ s_HasRefTrackStatus()

bool s_HasRefTrackStatus ( const CBioseq_Handle bsh)

◆ s_HasSegments()

static bool s_HasSegments ( const CBioseq_Handle seq)
static

◆ s_IsCDD()

static bool s_IsCDD ( const CSeq_feat_Handle feat)
static

◆ s_IsCircularTopology()

static bool s_IsCircularTopology ( CBioseqContext ctx)
static

◆ s_IsDuplicateFeatures()

static bool s_IsDuplicateFeatures ( const CSeq_feat_Handle f1,
const CSeq_feat_Handle f2 
)
static

◆ s_IsJustUids()

bool s_IsJustUids ( const CPubdesc pubdesc)

◆ s_IsSegmented()

static bool s_IsSegmented ( const CBioseq_Handle seq)
static

◆ s_LocationsOverlap()

static bool s_LocationsOverlap ( const CSeq_loc loc1,
const CSeq_loc loc2,
CScope p_scope 
)
static

◆ s_LocationsTouch()

static bool s_LocationsTouch ( const CSeq_loc loc1,
const CSeq_loc loc2 
)
static

◆ s_MakeSliceMapper()

CRef<CSeq_loc_Mapper> s_MakeSliceMapper ( const CSeq_loc loc,
CBioseqContext ctx 
)

◆ s_NewGapItem() [1/2]

static CRef<CGapItem> s_NewGapItem ( CSeqMap_CI gap_it,
CBioseqContext ctx 
)
static

◆ s_NewGapItem() [2/2]

static CRef<CGapItem> s_NewGapItem ( TSeqPos  gap_start,
TSeqPos  gap_end,
TSeqPos  gap_length,
const string gap_type,
const vector< string > &  evidence,
bool  isUnknownLength,
bool  isAssemblyGap,
CBioseqContext ctx 
)
static

Definition at line 2782 of file gather_items.cpp.

References ctx, and bm::gap_length().

◆ s_NormalizeNullsBetween()

static CConstRef<CSeq_loc> s_NormalizeNullsBetween ( CConstRef< CSeq_loc loc,
bool  force_adding_nulls = false 
)
static

◆ s_NsAreGaps()

static bool s_NsAreGaps ( const CBioseq_Handle seq,
CBioseqContext ctx 
)
static

◆ s_RemoveBogusFuzzFromIntervals_Helper()

static void s_RemoveBogusFuzzFromIntervals_Helper ( CSeq_interval interval)
static

◆ s_SeqDescCompare()

static bool s_SeqDescCompare ( const CConstRef< CSeqdesc > &  desc1,
const CConstRef< CSeqdesc > &  desc2 
)
static

◆ s_SeqLocEndsOnBioseq()

static bool s_SeqLocEndsOnBioseq ( const CSeq_loc loc,
CBioseqContext ctx,
EEndsOnBioseqOpt  mode,
CSeqFeatData::E_Choice  feat_type 
)
static

◆ s_SetGapIdxData()

static void s_SetGapIdxData ( SGapIdxData gapdat,
const vector< CRef< CGapIndex >> &  gaps 
)
static

◆ s_SetSelection()

void s_SetSelection ( SAnnotSelector sel,
CBioseqContext ctx 
)

Definition at line 2474 of file gather_items.cpp.

References ctx, CSeqFeatData_Base::e_Biosrc, CSeqFeatData_Base::e_Bond, CSeqFeatData_Base::e_Comment, CSeqFeatData_Base::e_Het, CSeqFeatData_Base::e_Imp, CSeqFeatData_Base::e_Region, CSeqFeatData_Base::e_Site, eNa_strand_minus, SAnnotSelector::eOverlap_Intervals, SAnnotSelector::eSortOrder_Normal, SAnnotSelector::eSortOrder_Reverse, CSeqFeatData::eSubtype_assembly_gap, CSeqFeatData::eSubtype_exon, CSeqFeatData::eSubtype_gap, CSeqFeatData::eSubtype_intron, CSeqFeatData::eSubtype_misc_feature, CSeqFeatData::eSubtype_non_std_residue, CSeqFeatData::eSubtype_preprotein, CSeqFeatData::eSubtype_pub, CSeqFeatData::eSubtype_rsite, CSeqFeatData::eSubtype_seq, SAnnotSelector::ExcludeFeatSubtype(), SAnnotSelector::ExcludeFeatType(), SAnnotSelector::ExcludeNamedAnnots(), GetStrand(), CFlatFileConfig::HideCDDFeatures(), CFlatFileConfig::HideExonFeatures(), CFlatFileConfig::HideGapFeatures(), CFlatFileConfig::HideImpFeatures(), CFlatFileConfig::HideIntronFeatures(), CFlatFileConfig::HideMiscFeatures(), CFlatFileConfig::HideRemoteImpFeatures(), CFlatFileConfig::HideSNPFeatures(), CFlatFileConfig::IsPolicyFtp(), CFlatFileConfig::IsPolicyGenomes(), SAnnotSelector::SetAdaptiveDepth(), SAnnotSelector::SetFeatComparator(), SAnnotSelector::SetLimitTSE(), SAnnotSelector::SetOverlapType(), SAnnotSelector::SetResolveAll(), SAnnotSelector::SetResolveTSE(), SAnnotSelector::SetSortOrder(), and CFlatFileConfig::ShowContigFeatures().

Referenced by CFlatGatherer::x_GatherFeatures(), and CFlatGatherer::x_GatherFeaturesIdx().

◆ s_StrucCommOrder()

static int s_StrucCommOrder ( const string str)
static

Definition at line 1593 of file gather_items.cpp.

References NStr::StartsWith(), and str().

Referenced by s_SeqDescCompare().

◆ USING_SCOPE()

USING_SCOPE ( sequence  )
Modified on Sun May 19 04:39:43 2024 by modify_doxy.py rev. 669887