NCBI C++ ToolKit
Typedefs | Functions | Variables
miscedit_util.cpp File Reference
#include <ncbi_pch.hpp>
#include <gui/framework/workbench_impl.hpp>
#include <gui/framework/view_manager_service.hpp>
#include <gui/core/project_tree_view.hpp>
#include <objects/seqfeat/Cdregion.hpp>
#include <objects/seqfeat/seqfeat_macros.hpp>
#include <objects/misc/sequence_macros.hpp>
#include <objects/seqloc/Seq_loc_mix.hpp>
#include <objects/pub/Pub_equiv.hpp>
#include <objects/pub/Pub.hpp>
#include <objects/biblio/Cit_gen.hpp>
#include <objects/biblio/Cit_book.hpp>
#include <objects/biblio/Cit_proc.hpp>
#include <objects/biblio/Cit_art.hpp>
#include <objects/biblio/Cit_pat.hpp>
#include <objects/biblio/Cit_let.hpp>
#include <objects/biblio/Cit_jour.hpp>
#include <objects/biblio/Title.hpp>
#include <objects/biblio/Affil.hpp>
#include <objects/general/Name_std.hpp>
#include <objects/general/Person_id.hpp>
#include <objects/general/User_object.hpp>
#include <objects/general/User_field.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/seqblock/GB_block.hpp>
#include <objects/valid/Comment_rule.hpp>
#include <objects/valid/Comment_set.hpp>
#include <objmgr/seqdesc_ci.hpp>
#include <objmgr/bioseq_ci.hpp>
#include <objmgr/util/sequence.hpp>
#include <objmgr/seq_vector.hpp>
#include <objmgr/seq_entry_ci.hpp>
#include <util/sequtil/sequtil_convert.hpp>
#include <objtools/format/flat_file_config.hpp>
#include <objtools/format/flat_file_generator.hpp>
#include <objtools/format/flat_expt.hpp>
#include <objtools/edit/seqid_guesser.hpp>
#include <objtools/edit/cds_fix.hpp>
#include <gui/objutils/utils.hpp>
#include <gui/objutils/descriptor_change.hpp>
#include <gui/objutils/cmd_create_desc.hpp>
#include <gui/objutils/cmd_del_desc.hpp>
#include <gui/objutils/cmd_change_seq_feat.hpp>
#include <gui/objutils/cmd_del_seq_feat.hpp>
#include <gui/objutils/cmd_create_feat.hpp>
#include <gui/objutils/cmd_change_bioseq_inst.hpp>
#include <gui/objutils/pub_fieldtype.hpp>
#include <gui/objutils/util_cmds.hpp>
#include <gui/widgets/edit/singleauthor_panel.hpp>
#include <gui/widgets/edit/field_type_constants.hpp>
#include <gui/widgets/edit/dblink_fieldtype.hpp>
#include <gui/widgets/edit/molinfo_fieldtype.hpp>
#include <gui/packages/pkg_sequence_edit/pub_field.hpp>
#include <gui/packages/pkg_sequence_edit/miscedit_util.hpp>
#include <gui/packages/pkg_sequence_edit/molinfoedit_util.hpp>
#include <gui/packages/pkg_sequence_edit/dblink_field.hpp>
#include <gui/packages/pkg_sequence_edit/seq_table_grid.hpp>
+ Include dependency graph for miscedit_util.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Typedefs

typedef SStaticPair< const char *, CGeneralIDField::EGeneralIDPartTGeneralIDPart
 
typedef CStaticArrayMap< string, CGeneralIDField::EGeneralIDPartTGenIdPartMap
 

Functions

 USING_SCOPE (ncbi::objects)
 
 USING_SCOPE (edit)
 
 DEFINE_STATIC_ARRAY_MAP (TGenIdPartMap, sm_GenIdMap, s_GenIDPartName)
 
static const string kStructComment ("StructuredComment")
 
static const string kStructCommentPrefix ("StructuredCommentPrefix")
 
static const string kStructCommentSuffix ("StructuredCommentSuffix")
 
void AddMiscColumnsToTable (CRef< CSeq_table > table, const vector< string > &fields, CSeq_entry_Handle entry)
 
static size_t s_GetMaxRows (const vector< size_t > &rows)
 
CRef< CSeq_tableGetMiscTableFromSeqEntry (const vector< string > &fields, CSeq_entry_Handle entry)
 
void x_AdjustListPair (vector< CRef< CApplyObject > > prev_list, vector< CRef< CApplyObject > > this_list)
 
string GetExistingTextInstruction (EExistingText existing)
 
string MakeTableMetaInfoString (EExistingText rule, bool erase_blanks)
 
CRef< CUser_fieldMakeTableMetaInfoField (EExistingText rule, bool erase_blanks)
 
vector< CConstRef< CSeq_feat > > s_GetProtFeatures (CBioseq_Handle p_bsh, CSeqFeatData::ESubtype constraint_type)
 
vector< CConstRef< CSeq_feat > > GetRelatedFeatures (const CSeq_feat &obj_feat, CSeqFeatData::ESubtype constraint_type, CRef< CScope > scope)
 
vector< CRef< CApplyObject > > s_GetProtApplyObjectsFeatures (CBioseq_Handle p_bsh, CSeqFeatData::ESubtype constraint_type)
 
vector< CRef< CApplyObject > > GetRelatedFeatureApplyObjects (const CSeq_feat &obj_feat, CSeqFeatData::ESubtype constraint_type, CRef< CScope > scope)
 
CSeq_entry_Handle s_GetNPParent (CSeq_entry_Handle seh)
 
bool DoesObjectMatchFieldConstraint (const CObject &object, const string &field_name, CRef< CStringConstraint > string_constraint, CRef< CScope > scope)
 
bool DoesApplyObjectMatchFieldConstraint (const CApplyObject &object, const string &field_name, CRef< CStringConstraint > string_constraint)
 
bool IsSeqOrNP (CSeq_entry_Handle entry)
 
bool PropagateDescriptor (CSeq_entry_Handle entry, const CSeqdesc &desc, CCmdComposite &cmd)
 
bool PropagateDBLink (CSeq_entry_Handle entry, CCmdComposite &cmd)
 
CRef< CCmdCompositeGetPropagateDBLinkCmd (CSeq_entry_Handle entry)
 
CRef< CCmdCompositeGetCommandFromApplyObject (CApplyObject &obj)
 
void GetViewObjects (IWorkbench *workbench, TConstScopedObjects &objects)
 
int GetNumberOfViewedBioseqs (TConstScopedObjects &objects)
 
bool FocusedOnNucleotides (TConstScopedObjects &objects, const CSeq_entry_Handle &tse)
 
bool FocusedOnAll (TConstScopedObjects &objects, const objects::CSeq_entry_Handle &tse)
 

Variables

static const string kGenomeProjectId = "ProjectID"
 
static const TGeneralIDPart s_GenIDPartName []
 

Typedef Documentation

◆ TGeneralIDPart

Definition at line 1107 of file miscedit_util.cpp.

◆ TGenIdPartMap

Definition at line 1115 of file miscedit_util.cpp.

Function Documentation

◆ AddMiscColumnsToTable()

void AddMiscColumnsToTable ( CRef< CSeq_table table,
const vector< string > &  fields,
CSeq_entry_Handle  entry 
)

◆ DEFINE_STATIC_ARRAY_MAP()

DEFINE_STATIC_ARRAY_MAP ( TGenIdPartMap  ,
sm_GenIdMap  ,
s_GenIDPartName   
)

◆ DoesApplyObjectMatchFieldConstraint()

bool DoesApplyObjectMatchFieldConstraint ( const CApplyObject object,
const string field_name,
CRef< CStringConstraint string_constraint 
)

◆ DoesObjectMatchFieldConstraint()

bool DoesObjectMatchFieldConstraint ( const CObject object,
const string field_name,
CRef< CStringConstraint string_constraint,
CRef< CScope scope 
)

◆ FocusedOnAll()

bool FocusedOnAll ( TConstScopedObjects objects,
const objects::CSeq_entry_Handle &  tse 
)

Definition at line 3805 of file miscedit_util.cpp.

References CSeq_inst_Base::eMol_na, and GetNumberOfViewedBioseqs().

Referenced by s_Create5ColFeatTable().

◆ FocusedOnNucleotides()

bool FocusedOnNucleotides ( TConstScopedObjects objects,
const CSeq_entry_Handle tse 
)

Definition at line 3790 of file miscedit_util.cpp.

References CSeq_inst_Base::eMol_na, and GetNumberOfViewedBioseqs().

◆ GetCommandFromApplyObject()

CRef<CCmdComposite> GetCommandFromApplyObject ( CApplyObject obj)

◆ GetExistingTextInstruction()

string GetExistingTextInstruction ( EExistingText  existing)

◆ GetMiscTableFromSeqEntry()

CRef<CSeq_table> GetMiscTableFromSeqEntry ( const vector< string > &  fields,
CSeq_entry_Handle  entry 
)

◆ GetNumberOfViewedBioseqs()

int GetNumberOfViewedBioseqs ( TConstScopedObjects objects)

Definition at line 3775 of file miscedit_util.cpp.

References ITERATE.

Referenced by FocusedOnAll(), and FocusedOnNucleotides().

◆ GetPropagateDBLinkCmd()

CRef<CCmdComposite> GetPropagateDBLinkCmd ( CSeq_entry_Handle  entry)

Definition at line 3688 of file miscedit_util.cpp.

References cmd, NULL, and PropagateDBLink().

◆ GetRelatedFeatureApplyObjects()

vector<CRef<CApplyObject> > GetRelatedFeatureApplyObjects ( const CSeq_feat obj_feat,
CSeqFeatData::ESubtype  constraint_type,
CRef< CScope scope 
)

◆ GetRelatedFeatures()

vector<CConstRef<CSeq_feat> > GetRelatedFeatures ( const CSeq_feat obj_feat,
CSeqFeatData::ESubtype  constraint_type,
CRef< CScope scope 
)

◆ GetViewObjects()

void GetViewObjects ( IWorkbench workbench,
TConstScopedObjects objects 
)

◆ IsSeqOrNP()

bool IsSeqOrNP ( CSeq_entry_Handle  entry)

◆ kStructComment()

static const string kStructComment ( "StructuredComment"  )
static

◆ kStructCommentPrefix()

static const string kStructCommentPrefix ( "StructuredCommentPrefix"  )
static

◆ kStructCommentSuffix()

static const string kStructCommentSuffix ( "StructuredCommentSuffix"  )
static

◆ MakeTableMetaInfoField()

CRef<CUser_field> MakeTableMetaInfoField ( EExistingText  rule,
bool  erase_blanks 
)

Definition at line 3106 of file miscedit_util.cpp.

References MakeTableMetaInfoString(), and CUser_field_Base::SetData().

◆ MakeTableMetaInfoString()

string MakeTableMetaInfoString ( EExistingText  rule,
bool  erase_blanks 
)

Definition at line 3092 of file miscedit_util.cpp.

References GetExistingTextInstruction(), and rapidjson::value.

Referenced by MakeTableMetaInfoField().

◆ PropagateDBLink()

bool PropagateDBLink ( CSeq_entry_Handle  entry,
CCmdComposite cmd 
)

◆ PropagateDescriptor()

bool PropagateDescriptor ( CSeq_entry_Handle  entry,
const CSeqdesc desc,
CCmdComposite cmd 
)

◆ s_GetMaxRows()

static size_t s_GetMaxRows ( const vector< size_t > &  rows)
static

Definition at line 2947 of file miscedit_util.cpp.

References i.

Referenced by GetMiscTableFromSeqEntry().

◆ s_GetNPParent()

CSeq_entry_Handle s_GetNPParent ( CSeq_entry_Handle  seh)

◆ s_GetProtApplyObjectsFeatures()

vector<CRef<CApplyObject> > s_GetProtApplyObjectsFeatures ( CBioseq_Handle  p_bsh,
CSeqFeatData::ESubtype  constraint_type 
)

◆ s_GetProtFeatures()

vector<CConstRef<CSeq_feat> > s_GetProtFeatures ( CBioseq_Handle  p_bsh,
CSeqFeatData::ESubtype  constraint_type 
)

Definition at line 3114 of file miscedit_util.cpp.

References f().

Referenced by GetRelatedFeatures().

◆ USING_SCOPE() [1/2]

USING_SCOPE ( edit  )

◆ USING_SCOPE() [2/2]

USING_SCOPE ( ncbi::objects  )

◆ x_AdjustListPair()

void x_AdjustListPair ( vector< CRef< CApplyObject > >  prev_list,
vector< CRef< CApplyObject > >  this_list 
)

Definition at line 3010 of file miscedit_util.cpp.

References NON_CONST_ITERATE, and t.

Variable Documentation

◆ kGenomeProjectId

const string kGenomeProjectId = "ProjectID"
static

◆ s_GenIDPartName

const TGeneralIDPart s_GenIDPartName[]
static
Initial value:

Definition at line 1108 of file miscedit_util.cpp.

Modified on Sun Jun 16 04:29:42 2024 by modify_doxy.py rev. 669887