NCBI C++ ToolKit
Functions
convert_raw_to_delta.cpp File Reference
#include <ncbi_pch.hpp>
#include <objects/seq/Seq_inst.hpp>
#include <objects/seq/Seq_data.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seq/seq_id_handle.hpp>
#include <objects/seqfeat/Feat_id.hpp>
#include <objtools/cleanup/fix_feature_id.hpp>
#include <objmgr/feat_ci.hpp>
#include <objmgr/align_ci.hpp>
#include <objmgr/bioseq_ci.hpp>
#include <objmgr/seq_annot_ci.hpp>
#include <objmgr/util/sequence.hpp>
#include <objtools/edit/cds_fix.hpp>
#include <objtools/edit/seq_entry_edit.hpp>
#include <util/sequtil/sequtil_convert.hpp>
#include <gui/objutils/cmd_composite.hpp>
#include <gui/objutils/cmd_create_feat.hpp>
#include <gui/objutils/cmd_add_cds.hpp>
#include <gui/objutils/cmd_change_seq_feat.hpp>
#include <gui/objutils/cmd_del_seq_feat.hpp>
#include <gui/objutils/cmd_change_bioseq_inst.hpp>
#include <gui/objutils/cmd_del_bioseq.hpp>
#include <gui/objutils/cmd_del_seq_align.hpp>
#include <gui/objutils/convert_raw_to_delta.hpp>
+ Include dependency graph for convert_raw_to_delta.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

 USING_SCOPE (objects)
 
void GapLocationsFromNs (const CSeq_inst &inst, const size_t min_unknown, const long max_unknown, const size_t min_known, const long max_known, vector< pair< int, int >> &start_length_locs, vector< bool > &vec_is_known)
 
void UpdateDensegAlignment (CSeq_align_Handle ah, CBioseq_Handle bsh, CRef< CCmdComposite > composite, const vector< pair< int, int >> &start_length_locs, const vector< bool > &vec_is_known, set< const CSeq_align * > &deleted_aligns)
 
static void UpdateFeaturesForGaps (const map< CBioseq_Handle, pair< vector< pair< int, int >>, vector< bool >>> &map_gaps, CRef< CCmdComposite > composite, bool break_features, bool keep_gap_length, bool create_general_only, CObject_id::TId &max_feat_id, map< CObject_id::TId, CObject_id::TId > &old_to_new, bool create_xref_map)
 
static void s_ReplaceFeatureIdXref (CSeq_feat &f, map< CObject_id::TId, CObject_id::TId > &old_to_new)
 
static void x_AdjustOrigLabel (CSeq_feat &feat, size_t &id_offset, string &id_label, const string &qual)
 
static void s_UpdateCodeBreaksAndAnticodons (CSeq_feat &feat, CScope &scope, const map< CBioseq_Handle, vector< SGap >> &gaps, bool break_features, bool keep_gap_length)
 
static void AdjustSingleFeature (const CMappedFeat &feat, CScope &scope, const map< CBioseq_Handle, vector< SGap >> &gaps, CRef< CCmdComposite > composite, bool split_gene_locations, bool break_features, bool keep_gap_length, bool create_general_only, CObject_id::TId &max_feat_id, map< CObject_id::TId, CObject_id::TId > &old_to_new, bool create_xref_map)
 
void AdjustFeatureLocations (const map< CBioseq_Handle, vector< SGap >> &map_gaps, CRef< CCmdComposite > composite, bool split_gene_locations, bool break_features, bool keep_gap_length, bool create_general_only, CObject_id::TId &max_feat_id, map< CObject_id::TId, CObject_id::TId > &old_to_new, bool create_xref_map)
 
void FindNewLocations (const CSeq_loc &feat_loc, CScope &scope, const map< CBioseq_Handle, vector< SGap >> &map_gaps, vector< CRef< CSeq_loc >> &locations, bool &comment, bool break_features, bool keep_gap_length)
 
static void s_AddComment (CRef< CSeq_feat > new_feat)
 
CRef< CSeq_featUpdateFeat (CRef< CSeq_loc > changed_loc, const CSeq_feat &feat, bool comment, CScope &scope)
 
void RemapOtherProtFeats (const CSeq_feat &old_cds, CSeq_feat &cds, CBioseq_Handle bh, CRef< CCmdComposite > composite, bool &any_actions)
 
void RemapOtherProtFeats (const CSeq_feat &old_cds, CSeq_feat &cds, CSeq_feat_Handle fh, vector< CRef< CSeq_feat >> &other_prot_feats, CObject_id::TId &max_feat_id, map< CObject_id::TId, CObject_id::TId > &old_to_new, bool create_xref_map)
 
static CRef< CCmdCompositeConvertRawToDeltaByNsCommand_impl (const CSeq_entry_Handle &seh, const SGapRequestInfo &request, bool &remove_alignments, int &count, map< CObject_id::TId, CObject_id::TId > &old_to_new, bool create_xref_map)
 
CRef< CCmdCompositeConvertRawToDeltaByNsCommand (const CSeq_entry_Handle &seh, const SGapRequestInfo &request, bool &remove_alignments, int &count)
 
static CRef< CCmdCompositeConvertRawToDeltaByNsHugeFileCmd_impl (const CSeq_entry_Handle &seh, const SGapRequestInfo &request, CObject_id::TId &max_feat_id, bool &remove_alignments, int &count, map< CObject_id::TId, CObject_id::TId > &old_to_new, bool create_xref_map)
 
CRef< CCmdCompositeConvertRawToDeltaByNsHugeFileCmd (const CSeq_entry_Handle &seh, const SGapRequestInfo &request, CObject_id::TId &max_feat_id, bool &remove_alignments, int &count)
 

Function Documentation

◆ AdjustFeatureLocations()

void AdjustFeatureLocations ( const map< CBioseq_Handle, vector< SGap >> &  map_gaps,
CRef< CCmdComposite composite,
bool  split_gene_locations,
bool  break_features,
bool  keep_gap_length,
bool  create_general_only,
CObject_id::TId max_feat_id,
map< CObject_id::TId, CObject_id::TId > &  old_to_new,
bool  create_xref_map 
)

Definition at line 582 of file convert_raw_to_delta.cpp.

References AdjustSingleFeature().

Referenced by UpdateFeaturesForGaps().

◆ AdjustSingleFeature()

static void AdjustSingleFeature ( const CMappedFeat feat,
CScope scope,
const map< CBioseq_Handle, vector< SGap >> &  gaps,
CRef< CCmdComposite composite,
bool  split_gene_locations,
bool  break_features,
bool  keep_gap_length,
bool  create_general_only,
CObject_id::TId max_feat_id,
map< CObject_id::TId, CObject_id::TId > &  old_to_new,
bool  create_xref_map 
)
static

Definition at line 371 of file convert_raw_to_delta.cpp.

References CCmdComposite::AddCommand(), AdjustProteinFeaturePartialsToMatchCDS(), CSerialObject::Assign(), cmd, CSeq_inst_Base::eMol_aa, NStr::EndsWith(), CSeq_inst_Base::eRepr_raw, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, CSeqFeatData::eSubtype_prot, NStr::Find(), FindNewLocations(), CSeq_feat_Handle::GetAnnot(), CScope::GetBioseqHandle(), CBioseq_Handle::GetCompleteBioseq(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetExcept_text(), CSeq_feat_Handle::GetFeatSubtype(), CObject_id_Base::GetId(), CBioseq_Base::GetId(), CSeq_feat_Base::GetId(), CSeq_loc::GetId(), CBioseq::GetLength(), CFeat_id_Base::GetLocal(), CSeq_feat_Base::GetLocation(), CMappedFeat::GetLocation(), GetNewProtId(), GetNewProtIdFromExistingProt(), CMappedFeat::GetOriginalFeature(), CSeq_annot_Handle::GetParentEntry(), CSeq_feat_Base::GetProduct(), CMappedFeat::GetSeq_feat(), CMappedFeat::GetSeq_feat_Handle(), CSeqFeatData_Base::IsCdregion(), CObject_id_Base::IsId(), CFeat_id_Base::IsLocal(), CSeq_feat_Base::IsSetData(), CSeq_feat_Base::IsSetExcept_text(), CSeq_feat_Base::IsSetId(), CSeq_feat_Base::IsSetProduct(), prot, RemapOtherProtFeats(), CRef< C, Locker >::Reset(), CSeq_feat_Base::ResetLocation(), s_ReplaceFeatureIdXref(), s_UpdateCodeBreaksAndAnticodons(), CSeq_feat_Base::SetId(), CBioseq_Base::SetInst(), CSeq_feat_Base::SetLocation(), CSeq_feat_Base::SetProduct(), CSeqTranslator::Translate(), UpdateFeat(), and x_AdjustOrigLabel().

Referenced by AdjustFeatureLocations().

◆ ConvertRawToDeltaByNsCommand()

CRef<CCmdComposite> ConvertRawToDeltaByNsCommand ( const CSeq_entry_Handle seh,
const SGapRequestInfo request,
bool remove_alignments,
int count 
)

Definition at line 1068 of file convert_raw_to_delta.cpp.

References ConvertRawToDeltaByNsCommand_impl(), and count.

◆ ConvertRawToDeltaByNsCommand_impl()

static CRef<CCmdComposite> ConvertRawToDeltaByNsCommand_impl ( const CSeq_entry_Handle seh,
const SGapRequestInfo request,
bool remove_alignments,
int count,
map< CObject_id::TId, CObject_id::TId > &  old_to_new,
bool  create_xref_map 
)
static

◆ ConvertRawToDeltaByNsHugeFileCmd()

CRef<CCmdComposite> ConvertRawToDeltaByNsHugeFileCmd ( const CSeq_entry_Handle seh,
const SGapRequestInfo request,
CObject_id::TId max_feat_id,
bool remove_alignments,
int count 
)

Definition at line 1153 of file convert_raw_to_delta.cpp.

References ConvertRawToDeltaByNsHugeFileCmd_impl(), and count.

◆ ConvertRawToDeltaByNsHugeFileCmd_impl()

static CRef<CCmdComposite> ConvertRawToDeltaByNsHugeFileCmd_impl ( const CSeq_entry_Handle seh,
const SGapRequestInfo request,
CObject_id::TId max_feat_id,
bool remove_alignments,
int count,
map< CObject_id::TId, CObject_id::TId > &  old_to_new,
bool  create_xref_map 
)
static

◆ FindNewLocations()

void FindNewLocations ( const CSeq_loc feat_loc,
CScope scope,
const map< CBioseq_Handle, vector< SGap >> &  map_gaps,
vector< CRef< CSeq_loc >> &  locations,
bool comment,
bool  break_features,
bool  keep_gap_length 
)

◆ GapLocationsFromNs()

void GapLocationsFromNs ( const CSeq_inst inst,
const size_t  min_unknown,
const long  max_unknown,
const size_t  min_known,
const long  max_known,
vector< pair< int, int >> &  start_length_locs,
vector< bool > &  vec_is_known 
)

◆ RemapOtherProtFeats() [1/2]

void RemapOtherProtFeats ( const CSeq_feat old_cds,
CSeq_feat cds,
CBioseq_Handle  bh,
CRef< CCmdComposite composite,
bool any_actions 
)

◆ RemapOtherProtFeats() [2/2]

void RemapOtherProtFeats ( const CSeq_feat old_cds,
CSeq_feat cds,
CSeq_feat_Handle  fh,
vector< CRef< CSeq_feat >> &  other_prot_feats,
CObject_id::TId max_feat_id,
map< CObject_id::TId, CObject_id::TId > &  old_to_new,
bool  create_xref_map 
)

◆ s_AddComment()

static void s_AddComment ( CRef< CSeq_feat new_feat)
static

◆ s_ReplaceFeatureIdXref()

static void s_ReplaceFeatureIdXref ( CSeq_feat f,
map< CObject_id::TId, CObject_id::TId > &  old_to_new 
)
static

◆ s_UpdateCodeBreaksAndAnticodons()

static void s_UpdateCodeBreaksAndAnticodons ( CSeq_feat feat,
CScope scope,
const map< CBioseq_Handle, vector< SGap >> &  gaps,
bool  break_features,
bool  keep_gap_length 
)
static

◆ UpdateDensegAlignment()

void UpdateDensegAlignment ( CSeq_align_Handle  ah,
CBioseq_Handle  bsh,
CRef< CCmdComposite composite,
const vector< pair< int, int >> &  start_length_locs,
const vector< bool > &  vec_is_known,
set< const CSeq_align * > &  deleted_aligns 
)

◆ UpdateFeat()

CRef<CSeq_feat> UpdateFeat ( CRef< CSeq_loc changed_loc,
const CSeq_feat feat,
bool  comment,
CScope scope 
)

◆ UpdateFeaturesForGaps()

static void UpdateFeaturesForGaps ( const map< CBioseq_Handle, pair< vector< pair< int, int >>, vector< bool >>> &  map_gaps,
CRef< CCmdComposite composite,
bool  break_features,
bool  keep_gap_length,
bool  create_general_only,
CObject_id::TId max_feat_id,
map< CObject_id::TId, CObject_id::TId > &  old_to_new,
bool  create_xref_map 
)
static

◆ USING_SCOPE()

USING_SCOPE ( objects  )

◆ x_AdjustOrigLabel()

static void x_AdjustOrigLabel ( CSeq_feat feat,
size_t &  id_offset,
string id_label,
const string qual 
)
static
Modified on Wed Sep 04 15:05:30 2024 by modify_doxy.py rev. 669887