NCBI C++ ToolKit
Classes | Typedefs | Functions | Variables
srcedit_util.cpp File Reference
#include <ncbi_pch.hpp>
#include <util/static_map.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objects/submit/Seq_submit.hpp>
#include <objects/submit/Submit_block.hpp>
#include <objects/submit/Contact_info.hpp>
#include <objects/biblio/Author.hpp>
#include <objects/biblio/Affil.hpp>
#include <objects/general/Person_id.hpp>
#include <objects/general/Name_std.hpp>
#include <objects/general/User_object.hpp>
#include <objects/general/User_field.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/seqfeat/BioSource.hpp>
#include <objects/seqfeat/Org_ref.hpp>
#include <objects/seqfeat/OrgName.hpp>
#include <objects/seqfeat/PCRReactionSet.hpp>
#include <objects/seqfeat/PCRPrimer.hpp>
#include <objects/seqfeat/PCRPrimerSeq.hpp>
#include <objects/seqset/Bioseq_set.hpp>
#include <objects/seq/Bioseq.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/misc/sequence_macros.hpp>
#include <objmgr/seqdesc_ci.hpp>
#include <objmgr/bioseq_ci.hpp>
#include <objmgr/feat_ci.hpp>
#include <gui/widgets/wx/wx_utils.hpp>
#include <gui/packages/pkg_sequence_edit/srcedit_util.hpp>
#include <gui/widgets/object_list/object_list_widget.hpp>
#include <gui/objutils/cmd_composite.hpp>
#include <gui/objutils/cmd_create_desc.hpp>
#include <gui/objutils/cmd_del_desc.hpp>
#include <gui/objutils/descriptor_change.hpp>
#include <gui/widgets/wx/csv_exporter.hpp>
#include <gui/widgets/edit/biosource_autocomplete.hpp>
#include <objects/seqtable/SeqTable_multi_data.hpp>
#include <objects/seqtable/SeqTable_column_info.hpp>
#include <objects/general/Dbtag.hpp>
#include <objtools/edit/source_edit.hpp>
#include <gui/packages/pkg_sequence_edit/subprep_util.hpp>
#include <gui/widgets/edit/field_type_constants.hpp>
+ Include dependency graph for srcedit_util.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.


struct  exampletable


typedef struct exampletable ExampleTableData
typedef SStaticPair< const char *, CSrcStructuredVoucherPartColumn::EStructVouchPartTStructVoucherPart
typedef CStaticArrayMap< string, CSrcStructuredVoucherPartColumn::EStructVouchPartTStrcVouchMap


 USING_SCOPE (objects)
static bool s_IsAllNumbers (string val)
static string s_MakeUniquenessVal (vector< CRef< CSeqTable_column > > cols, size_t row)
static bool IsExampleTableRowAcceptable (const ExampleTableData *e1, string field_name, CSourceRequirements::EWizardType wizard_type, CSourceRequirements::EWizardSrcType src_type)
static int CompareExampleTableRows (const ExampleTableData *e1, const ExampleTableData *e2)
CSourceRequirementsGetSrcRequirements (CSourceRequirements::EWizardType wizard_type, CSourceRequirements::EWizardSrcType source_type, CRef< CSeq_table > values_table)
string GetPrimerSetNameValues (const CPCRPrimerSet &primer_set)
string GetPrimerSetSeqValues (const CPCRPrimerSet &primer_set)
void RemoveLastCharacter (string &str)
string JoinValues (const string &name, const vector< string > &values)
void SplitValues (const string &name, const string &newValue, vector< string > &values)
CRef< CSeq_tableGetSeqTableFromSeqEntry (CSeq_entry_Handle seh)
CRef< CSeq_tableGetSeqTableForSrcQualFromSeqEntry (CSeq_entry_Handle seh, vector< string > qual_names)
 DEFINE_STATIC_ARRAY_MAP (TStrcVouchMap, sm_VouchMap, s_StrVouchPartName)
bool IsFwdPrimerName (string name)
bool IsRevPrimerName (string name)
bool IsFwdPrimerSeq (string name)
bool IsRevPrimerSeq (string name)
CRef< CCmdCompositeApplySrcTableToSeqEntry (CRef< CSeq_table >values_table, CSeq_entry_Handle seh)
bool RelaxedMatch (CRef< CSeq_id > id1, CRef< CSeq_id > id2)
static bool OneRowOk (CRef< CSeq_id > id, CRef< CSeqTable_column > id_col, CSeq_entry_Handle seh)


static const ExampleTableData s_ExampleTable []
static const int k_NumExampleTableRows = sizeof (s_ExampleTable) / sizeof (ExampleTableData)
static const string nomial_keywords []
static const TStructVoucherPart s_StrVouchPartName []

Typedef Documentation

◆ ExampleTableData

◆ TStrcVouchMap

Definition at line 1750 of file srcedit_util.cpp.

◆ TStructVoucherPart

Definition at line 1742 of file srcedit_util.cpp.

Function Documentation

◆ ApplySrcTableToSeqEntry()

CRef<CCmdComposite> ApplySrcTableToSeqEntry ( CRef< CSeq_table values_table,
CSeq_entry_Handle  seh 

◆ CompareExampleTableRows()

static int CompareExampleTableRows ( const ExampleTableData e1,
const ExampleTableData e2 


sm_VouchMap  ,

◆ GetPrimerSetNameValues()

string GetPrimerSetNameValues ( const CPCRPrimerSet primer_set)

Definition at line 947 of file srcedit_util.cpp.

References CPCRPrimerSet_Base::Get(), ITERATE, NStr::Join(), and names.

Referenced by GetSeqTableFromSeqEntry().

◆ GetPrimerSetSeqValues()

string GetPrimerSetSeqValues ( const CPCRPrimerSet primer_set)

Definition at line 963 of file srcedit_util.cpp.

References CPCRPrimerSet_Base::Get(), NStr::IsBlank(), and ITERATE.

Referenced by GetSeqTableFromSeqEntry().

◆ GetSeqTableForSrcQualFromSeqEntry()

CRef<CSeq_table> GetSeqTableForSrcQualFromSeqEntry ( CSeq_entry_Handle  seh,
vector< string qual_names 

◆ GetSeqTableFromSeqEntry()

CRef<CSeq_table> GetSeqTableFromSeqEntry ( CSeq_entry_Handle  seh)

◆ GetSrcRequirements()

CSourceRequirements* GetSrcRequirements ( CSourceRequirements::EWizardType  wizard_type,
CSourceRequirements::EWizardSrcType  source_type,
CRef< CSeq_table values_table 

◆ IsExampleTableRowAcceptable()

static bool IsExampleTableRowAcceptable ( const ExampleTableData e1,
string  field_name,
CSourceRequirements::EWizardType  wizard_type,
CSourceRequirements::EWizardSrcType  src_type 

◆ IsFwdPrimerName()

bool IsFwdPrimerName ( string  name)

◆ IsFwdPrimerSeq()

bool IsFwdPrimerSeq ( string  name)

◆ IsRevPrimerName()

bool IsRevPrimerName ( string  name)

◆ IsRevPrimerSeq()

bool IsRevPrimerSeq ( string  name)

◆ JoinValues()

string JoinValues ( const string name,
const vector< string > &  values 

Definition at line 989 of file srcedit_util.cpp.

References NStr::Join().

Referenced by GetSeqTableFromSeqEntry().

◆ OneRowOk()

static bool OneRowOk ( CRef< CSeq_id id,
CRef< CSeqTable_column id_col,
CSeq_entry_Handle  seh 

◆ RelaxedMatch()

bool RelaxedMatch ( CRef< CSeq_id id1,
CRef< CSeq_id id2 

◆ RemoveLastCharacter()

void RemoveLastCharacter ( string str)

Definition at line 981 of file srcedit_util.cpp.

References len, and str().

Referenced by GetSeqTableFromSeqEntry().

◆ s_IsAllNumbers()

static bool s_IsAllNumbers ( string  val)

Definition at line 172 of file srcedit_util.cpp.

References NStr::IsBlank(), isdigit(), and val.

Referenced by COrgModQual::GetFormatErrors(), and CSubSrcQual::GetFormatErrors().

◆ s_MakeUniquenessVal()

static string s_MakeUniquenessVal ( vector< CRef< CSeqTable_column > >  cols,
size_t  row 

Definition at line 362 of file srcedit_util.cpp.

References i, row, and NStr::ToUpper().

Referenced by CSourceRequirements::x_AddUniquenessProblems().

◆ SplitValues()

void SplitValues ( const string name,
const string newValue,
vector< string > &  values 

Definition at line 998 of file srcedit_util.cpp.

References NStr::Split().

◆ USING_SCOPE() [1/2]

USING_SCOPE ( edit  )

◆ USING_SCOPE() [2/2]

USING_SCOPE ( objects  )

Variable Documentation

◆ k_NumExampleTableRows

const int k_NumExampleTableRows = sizeof (s_ExampleTable) / sizeof (ExampleTableData)

Definition at line 751 of file srcedit_util.cpp.

Referenced by CSourceRequirements::SetExamples().

◆ nomial_keywords

const string nomial_keywords[]
Initial value:
= {
"f. sp. ",

Definition at line 1362 of file srcedit_util.cpp.

Referenced by CSrcTaxnameAfterBinomialColumn::x_GetTextAfterNomial().

◆ s_ExampleTable

const ExampleTableData s_ExampleTable[]

Definition at line 653 of file srcedit_util.cpp.

Referenced by CSourceRequirements::SetExamples().

◆ s_StrVouchPartName

const TStructVoucherPart s_StrVouchPartName[]
Modified on Wed May 29 18:37:46 2024 by rev. 669887