NCBI C++ ToolKit
Typedefs | Functions | Variables
subprep_util.hpp File Reference
#include <corelib/ncbistd.hpp>
#include <objmgr/seq_entry_handle.hpp>
#include <objects/seqfeat/OrgMod.hpp>
#include <objects/seqfeat/SubSource.hpp>
#include <objects/seqtable/Seq_table.hpp>
#include <objects/seqtable/SeqTable_column.hpp>
#include <objects/seqtable/SeqTable_multi_data.hpp>
#include <objects/seqtable/SeqTable_column_info.hpp>
#include <gui/widgets/wx/wx_utils.hpp>
#include <gui/widgets/grid_widget/grid_widget.hpp>
#include <gui/packages/pkg_sequence_edit/srcedit_util.hpp>
#include <gui/packages/pkg_sequence_edit/seqtable_util.hpp>
#include <gui/packages/pkg_sequence_edit/featedit_util.hpp>
#include <gui/objutils/table_data.hpp>
#include <gui/packages/pkg_sequence_edit/seq_table_grid.hpp>
#include <gui/objutils/cmd_composite.hpp>
+ Include dependency graph for subprep_util.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Typedefs

typedef pair< CSourceRequirements::EWizardType, stringTWizardName
 
typedef vector< TWizardNameTWizardNameList
 

Functions

TWizardNameList GetWizardNameList ()
 
CSourceRequirements::EWizardType GetWizardTypeFromName (string wizard_name)
 
void FixTableAfterImport (CRef< objects::CSeq_table > input_table)
 
string FindBadRows (CRef< objects::CSeq_table > src, CRef< objects::CSeq_table > dst, objects::CSeq_entry_Handle seh)
 
CRef< objects::CSeqTable_column > FindSeqIDColumn (const objects::CSeq_table &table)
 
int FindRowForSeqId (CRef< objects::CSeqTable_column > id_col, CRef< objects::CSeq_id > id)
 
int CountColumnRowConflicts (CRef< objects::CSeqTable_column > dst_id, CRef< objects::CSeqTable_column > dst_col, CRef< objects::CSeqTable_column > src_id, CRef< objects::CSeqTable_column > src_col)
 
int CountTableColumnConflicts (CRef< objects::CSeq_table > dst, const objects::CSeq_table &src)
 
void DeleteTableRow (CRef< objects::CSeq_table > table, int row)
 
int CombineTables (CRef< objects::CSeq_table > dst, const objects::CSeq_table &src)
 
bool SaveTableFile (wxWindow *parent, wxString &save_file_dir, wxString &save_file_name, CRef< objects::CSeq_table > values_table)
 
bool AreAllColumnValuesTheSame (CRef< objects::CSeqTable_column > col, string default_val="")
 
bool AreAnyColumnValuesMissing (CRef< objects::CSeqTable_column > col)
 
bool AreAnyColumnValuesPresent (CRef< objects::CSeqTable_column > col, string default_val="")
 
bool DoesColumnHaveValue (CRef< objects::CSeqTable_column > col, string val)
 
bool AddSeqEntryToSeqEntry (const objects::CSeq_entry *entry, objects::CSeq_entry_Handle seh, CRef< CCmdComposite > cmd, bool &has_nuc, bool &has_prot, bool create_general_only)
 
string CheckFeatureAnnotation (objects::CSeq_entry_Handle entry, bool &is_ok)
 
int AddFeatureToSeqTable (const objects::CSeq_feat &f, CRef< objects::CSeq_table > table)
 
CRef< objects::CSeq_table > GetFeaturesFromSeqEntry (objects::CSeq_entry_Handle entry, const objects::CSeq_feat &feat, const TFeatureSeqTableColumnList &reqs)
 
void MergeStringVectors (vector< string > &problems, vector< string > add)
 
void RemoveProblemsColumn (CRef< objects::CSeq_table > values_table)
 
void AddProblemsColumnToFeatureSeqTable (CRef< objects::CSeq_table > table, const TFeatureSeqTableColumnList &reqs, const TFeatureSeqTableColumnList &opts)
 
CRef< CCmdCompositeAddFeatureSeqTableToSeqEntry (CRef< objects::CSeq_table > table, objects::CSeq_entry_Handle entry, objects::CSeqFeatData::ESubtype subtype, const TFeatureSeqTableColumnList &reqs, const TFeatureSeqTableColumnList &opts)
 
bool HasLocalIntFeatureId (const objects::CSeq_feat &feat)
 
CRef< CCmdCompositeRemoveMatchingFeaturesWithoutLocalIntFeatureIdsFromSeqEntry (objects::CSeq_entry_Handle entry, const objects::CSeq_feat &feat, const TFeatureSeqTableColumnList &reqs)
 
CRef< CFeatureSeqTableColumnBaseGetColumnRuleForFeatureSeqTable (CRef< objects::CSeqTable_column > col, const TFeatureSeqTableColumnList &reqs, const TFeatureSeqTableColumnList &opts)
 
vector< stringGetTrueFalseList ()
 
bool IsSynonymForTrue (const string &val)
 
bool IsSynonymForFalse (const string &val)
 
bool IsTrueFalseList (const vector< string > &choices)
 
wxString GetAsnSqnExtensions ()
 
bool IsWizardObject (const objects::CUser_object &user)
 
CRef< objects::CUser_object > MakeWizardObject ()
 
string GetFieldFromWizardObject (const objects::CUser_object &user, string field_name)
 
void SetWizardFieldInSeqEntryNoUndo (objects::CSeq_entry_Handle entry, string field_name, string value)
 
CRef< objects::CUser_object > MakeBankItSubmissionObject ()
 
bool IsBankItSubmissionObject (const objects::CUser_object &user)
 
string GetDescAlternateEmailAddress (const objects::CSeqdesc &desc)
 
string GetAlternateEmailAddress (objects::CSeq_entry_Handle entry)
 
void SetUserAlternateEmailAddress (objects::CUser_object &u, string alt_email)
 
void SetAlternateEmailAddress (objects::CSeq_entry_Handle entry, string alt_email)
 
bool IsValidEmail (string email)
 
CRef< objects::CSeq_table > GetIdsFromSeqEntry (const objects::CSeq_entry &entry)
 
void AddIdsFromSeqEntryToTable (const objects::CSeq_entry &entry, CRef< objects::CSeq_table > table)
 
CRef< objects::CSeqTable_column > GetSeqIdProblems (CRef< objects::CSeq_table > new_ids, CRef< objects::CSeq_table > old_ids, size_t max_len)
 
string SummarizeIdProblems (CRef< objects::CSeqTable_column > problems)
 
CRef< objects::CSeqTable_column > GetReplacementSeqIds (CRef< objects::CSeq_table > new_ids, CRef< objects::CSeq_table > old_ids, size_t max_len)
 
void ApplyReplacementIds (objects::CSeq_entry &entry, CRef< objects::CSeq_table > table)
 
vector< stringFindNonUniqueStrings (const vector< string > &values)
 
vector< stringSortUniqueStrings (const vector< string > &values)
 
bool AlreadyHasFeature (objects::CBioseq_Handle bh, string key, string comment)
 
bool AlreadyHasFeature (objects::CBioseq_Handle bh, objects::CSeqFeatData::ESubtype subtype)
 

Variables

const string kSubmissionPreparationToolVersion = "1.0"
 
const string kWizardLabel = "NCBIWizard"
 

Typedef Documentation

◆ TWizardName

Definition at line 58 of file subprep_util.hpp.

◆ TWizardNameList

typedef vector<TWizardName> TWizardNameList

Definition at line 59 of file subprep_util.hpp.

Function Documentation

◆ AddFeatureSeqTableToSeqEntry()

CRef<CCmdComposite> AddFeatureSeqTableToSeqEntry ( CRef< objects::CSeq_table >  table,
objects::CSeq_entry_Handle  entry,
objects::CSeqFeatData::ESubtype  subtype,
const TFeatureSeqTableColumnList reqs,
const TFeatureSeqTableColumnList opts 
)

◆ AddFeatureToSeqTable()

int AddFeatureToSeqTable ( const objects::CSeq_feat &  f,
CRef< objects::CSeq_table >  table 
)

◆ AddIdsFromSeqEntryToTable()

void AddIdsFromSeqEntryToTable ( const objects::CSeq_entry &  entry,
CRef< objects::CSeq_table >  table 
)

◆ AddProblemsColumnToFeatureSeqTable()

void AddProblemsColumnToFeatureSeqTable ( CRef< objects::CSeq_table >  table,
const TFeatureSeqTableColumnList reqs,
const TFeatureSeqTableColumnList opts 
)

◆ AddSeqEntryToSeqEntry()

bool AddSeqEntryToSeqEntry ( const objects::CSeq_entry *  entry,
objects::CSeq_entry_Handle  seh,
CRef< CCmdComposite cmd,
bool has_nuc,
bool has_prot,
bool  create_general_only 
)

◆ AlreadyHasFeature() [1/2]

bool AlreadyHasFeature ( objects::CBioseq_Handle  bh,
objects::CSeqFeatData::ESubtype  subtype 
)

Definition at line 2051 of file subprep_util.cpp.

References f().

◆ AlreadyHasFeature() [2/2]

bool AlreadyHasFeature ( objects::CBioseq_Handle  bh,
string  key,
string  comment 
)

◆ ApplyReplacementIds()

void ApplyReplacementIds ( objects::CSeq_entry &  entry,
CRef< objects::CSeq_table >  table 
)

◆ AreAllColumnValuesTheSame()

bool AreAllColumnValuesTheSame ( CRef< objects::CSeqTable_column >  col,
string  default_val = "" 
)

◆ AreAnyColumnValuesMissing()

bool AreAnyColumnValuesMissing ( CRef< objects::CSeqTable_column >  col)

◆ AreAnyColumnValuesPresent()

bool AreAnyColumnValuesPresent ( CRef< objects::CSeqTable_column >  col,
string  default_val = "" 
)

◆ CheckFeatureAnnotation()

string CheckFeatureAnnotation ( objects::CSeq_entry_Handle  entry,
bool is_ok 
)

Definition at line 968 of file subprep_util.cpp.

References all, and NStr::NumericToString().

Referenced by CSubPrep_panel::x_UpdateFeatureStatus().

◆ CombineTables()

int CombineTables ( CRef< objects::CSeq_table >  dst,
const objects::CSeq_table &  src 
)

◆ CountColumnRowConflicts()

int CountColumnRowConflicts ( CRef< objects::CSeqTable_column >  dst_id,
CRef< objects::CSeqTable_column >  dst_col,
CRef< objects::CSeqTable_column >  src_id,
CRef< objects::CSeqTable_column >  src_col 
)

Definition at line 393 of file subprep_util.cpp.

References NStr::Equal(), FindRowForSeqId(), i, NStr::IsBlank(), and row.

Referenced by CountTableColumnConflicts().

◆ CountTableColumnConflicts()

int CountTableColumnConflicts ( CRef< objects::CSeq_table >  dst,
const objects::CSeq_table &  src 
)

◆ DeleteTableRow()

void DeleteTableRow ( CRef< objects::CSeq_table >  table,
int  row 
)

Definition at line 432 of file subprep_util.cpp.

References NON_CONST_ITERATE, row, and table.

Referenced by FixTableAfterImport().

◆ DoesColumnHaveValue()

bool DoesColumnHaveValue ( CRef< objects::CSeqTable_column >  col,
string  val 
)

Definition at line 656 of file subprep_util.cpp.

References NStr::Equal(), row, and val.

Referenced by CSubmissionPrepMainPanel::CreateVirusMoleculeOptions().

◆ FindBadRows()

string FindBadRows ( CRef< objects::CSeq_table >  src,
CRef< objects::CSeq_table >  dst,
objects::CSeq_entry_Handle  seh 
)

◆ FindNonUniqueStrings()

vector<string> FindNonUniqueStrings ( const vector< string > &  values)

◆ FindRowForSeqId()

int FindRowForSeqId ( CRef< objects::CSeqTable_column >  id_col,
CRef< objects::CSeq_id >  id 
)

Definition at line 377 of file subprep_util.cpp.

References row.

Referenced by CombineColumns(), and CountColumnRowConflicts().

◆ FindSeqIDColumn()

CRef<objects::CSeqTable_column> FindSeqIDColumn ( const objects::CSeq_table &  table)

Definition at line 365 of file subprep_util.cpp.

References ITERATE, NULL, and table.

Referenced by CombineTables(), CountTableColumnConflicts(), FindBadRows(), and FixTableAfterImport().

◆ FixTableAfterImport()

void FixTableAfterImport ( CRef< objects::CSeq_table >  input_table)

◆ GetAlternateEmailAddress()

string GetAlternateEmailAddress ( objects::CSeq_entry_Handle  entry)

◆ GetAsnSqnExtensions()

wxString GetAsnSqnExtensions ( )

Definition at line 1419 of file subprep_util.cpp.

References wxT.

Referenced by CSubmitBlockDlg::OnExportBtnClick(), and CSubPrep_panel::OnSaveBtnClick().

◆ GetColumnRuleForFeatureSeqTable()

CRef<CFeatureSeqTableColumnBase> GetColumnRuleForFeatureSeqTable ( CRef< objects::CSeqTable_column >  col,
const TFeatureSeqTableColumnList reqs,
const TFeatureSeqTableColumnList opts 
)

◆ GetDescAlternateEmailAddress()

string GetDescAlternateEmailAddress ( const objects::CSeqdesc &  desc)

◆ GetFeaturesFromSeqEntry()

CRef<objects::CSeq_table> GetFeaturesFromSeqEntry ( objects::CSeq_entry_Handle  entry,
const objects::CSeq_feat &  feat,
const TFeatureSeqTableColumnList reqs 
)

◆ GetFieldFromWizardObject()

string GetFieldFromWizardObject ( const objects::CUser_object &  user,
string  field_name 
)

◆ GetIdsFromSeqEntry()

CRef<objects::CSeq_table> GetIdsFromSeqEntry ( const objects::CSeq_entry &  entry)

◆ GetReplacementSeqIds()

CRef<objects::CSeqTable_column> GetReplacementSeqIds ( CRef< objects::CSeq_table >  new_ids,
CRef< objects::CSeq_table >  old_ids,
size_t  max_len 
)

◆ GetSeqIdProblems()

CRef<objects::CSeqTable_column> GetSeqIdProblems ( CRef< objects::CSeq_table >  new_ids,
CRef< objects::CSeq_table >  old_ids,
size_t  max_len 
)

◆ GetTrueFalseList()

vector<string> GetTrueFalseList ( )

Definition at line 1041 of file subprep_util.cpp.

Referenced by CFeatureTableCommandConverter::GetChoices().

◆ GetWizardNameList()

TWizardNameList GetWizardNameList ( )

Definition at line 121 of file subprep_util.cpp.

References i, k_NumWizardNames, and s_WizardNames.

Referenced by CSubPrepIntroPanel::CreateControls(), and CSubPrep_panel::Init().

◆ GetWizardTypeFromName()

CSourceRequirements::EWizardType GetWizardTypeFromName ( string  wizard_name)

◆ HasLocalIntFeatureId()

bool HasLocalIntFeatureId ( const objects::CSeq_feat &  feat)

◆ IsBankItSubmissionObject()

bool IsBankItSubmissionObject ( const objects::CUser_object &  user)

◆ IsSynonymForFalse()

bool IsSynonymForFalse ( const string val)

◆ IsSynonymForTrue()

bool IsSynonymForTrue ( const string val)

◆ IsTrueFalseList()

bool IsTrueFalseList ( const vector< string > &  choices)

Definition at line 1074 of file subprep_util.cpp.

References IsSynonymForFalse(), and IsSynonymForTrue().

◆ IsValidEmail()

bool IsValidEmail ( string  email)

◆ IsWizardObject()

bool IsWizardObject ( const objects::CUser_object &  user)

◆ MakeBankItSubmissionObject()

CRef<objects::CUser_object> MakeBankItSubmissionObject ( )

◆ MakeWizardObject()

CRef<objects::CUser_object> MakeWizardObject ( )

◆ MergeStringVectors()

void MergeStringVectors ( vector< string > &  problems,
vector< string add 
)

Definition at line 1297 of file subprep_util.cpp.

References NStr::IsBlank().

Referenced by AddProblemsToColumn().

◆ RemoveMatchingFeaturesWithoutLocalIntFeatureIdsFromSeqEntry()

CRef<CCmdComposite> RemoveMatchingFeaturesWithoutLocalIntFeatureIdsFromSeqEntry ( objects::CSeq_entry_Handle  entry,
const objects::CSeq_feat &  feat,
const TFeatureSeqTableColumnList reqs 
)

◆ RemoveProblemsColumn()

void RemoveProblemsColumn ( CRef< objects::CSeq_table >  values_table)

◆ SaveTableFile()

bool SaveTableFile ( wxWindow *  parent,
wxString &  save_file_dir,
wxString &  save_file_name,
CRef< objects::CSeq_table >  values_table 
)

◆ SetAlternateEmailAddress()

void SetAlternateEmailAddress ( objects::CSeq_entry_Handle  entry,
string  alt_email 
)

◆ SetUserAlternateEmailAddress()

void SetUserAlternateEmailAddress ( objects::CUser_object &  u,
string  alt_email 
)

◆ SetWizardFieldInSeqEntryNoUndo()

void SetWizardFieldInSeqEntryNoUndo ( objects::CSeq_entry_Handle  entry,
string  field_name,
string  value 
)

◆ SortUniqueStrings()

vector<string> SortUniqueStrings ( const vector< string > &  values)

Definition at line 1074 of file featedit_util.cpp.

References NStr::Equal().

Referenced by CSubPrep_panel::x_UpdateFeatureStatus().

◆ SummarizeIdProblems()

string SummarizeIdProblems ( CRef< objects::CSeqTable_column >  problems)

Variable Documentation

◆ kSubmissionPreparationToolVersion

const string kSubmissionPreparationToolVersion = "1.0"

Definition at line 55 of file subprep_util.hpp.

Referenced by CSubmitBlockDlg::x_CreateBlock().

◆ kWizardLabel

const string kWizardLabel = "NCBIWizard"

Definition at line 101 of file subprep_util.hpp.

Referenced by IsWizardObject(), and MakeWizardObject().

Modified on Sun Apr 28 04:49:06 2024 by modify_doxy.py rev. 669887