wxPanel::Create( parent,
id, pos,
size, style );
104GetSizer()->SetSizeHints(
this);
191wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
192itemPanel1->SetSizer(itemBoxSizer2);
194wxFlexGridSizer* itemFlexGridSizer3 =
newwxFlexGridSizer(0, 4, 0, 0);
195itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_LEFT|wxALL, 5);
197wxStaticText* itemStaticText4 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Sequencing Technology"), wxDefaultPosition, wxSize(60, -1), 0 );
198itemStaticText4->Wrap(20);
199itemFlexGridSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
201 m_StarTech=
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"*"), wxDefaultPosition, wxDefaultSize, 0 );
202 m_StarTech->SetForegroundColour(wxColour(255, 0, 0));
203 m_StarTech->SetFont(wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false,
wxT(
"Tahoma")));
204itemFlexGridSizer3->Add(
m_StarTech, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
209 m_SeqTechEdit=
newwxHyperlinkCtrl( itemPanel1,
ID_HYPERLINKCTRL1,
_(
"Edit"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
210itemFlexGridSizer3->Add(
m_SeqTechEdit, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
212wxStaticText* itemStaticText8 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Source Type"), wxDefaultPosition, wxDefaultSize, 0 );
213itemFlexGridSizer3->Add(itemStaticText8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
215 m_StarSourceType=
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"*"), wxDefaultPosition, wxDefaultSize, 0 );
217 m_StarSourceType->SetFont(wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false,
wxT(
"Tahoma")));
218itemFlexGridSizer3->Add(
m_StarSourceType, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
220wxArrayString m_SourceTypeStrings;
223 m_SourceType->SetToolTip(
_(
"If you provide correct information about the type of organism the sample was isolated, this tool will suggest the required and recommended information needed to help the submission be processed more quickly by GenBank staff.\n"));
224itemFlexGridSizer3->Add(
m_SourceType, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
226itemFlexGridSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
228wxStaticText* itemStaticText12 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Source"), wxDefaultPosition, wxDefaultSize, 0 );
229itemFlexGridSizer3->Add(itemStaticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
231 m_StarSource=
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"*"), wxDefaultPosition, wxDefaultSize, 0 );
232 m_StarSource->SetForegroundColour(wxColour(255, 0, 0));
233 m_StarSource->SetFont(wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false,
wxT(
"Tahoma")));
234itemFlexGridSizer3->Add(
m_StarSource, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
236 m_SourceLabel=
newwxTextCtrl( itemPanel1,
ID_TEXTCTRL2, wxEmptyString, wxDefaultPosition, wxSize(-1, 50), wxTE_MULTILINE|wxTE_READONLY );
237itemFlexGridSizer3->Add(
m_SourceLabel, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
240itemFlexGridSizer3->Add(
m_EditSourceLink, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
242wxStaticText* itemStaticText16 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Features"), wxDefaultPosition, wxDefaultSize, 0 );
243itemFlexGridSizer3->Add(itemStaticText16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
245 m_StarFeatures=
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"*"), wxDefaultPosition, wxDefaultSize, 0 );
247 m_StarFeatures->SetFont(wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false,
wxT(
"Tahoma")));
248itemFlexGridSizer3->Add(
m_StarFeatures, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
250 m_FeaturesLabel=
newwxTextCtrl( itemPanel1,
ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
251itemFlexGridSizer3->Add(
m_FeaturesLabel, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
253wxBoxSizer* itemBoxSizer19 =
newwxBoxSizer(wxVERTICAL);
254itemFlexGridSizer3->Add(itemBoxSizer19, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
257itemBoxSizer19->Add(
m_FeatureAddBtn, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
262 m_RemoveFeaturesBtn=
newwxHyperlinkCtrl( itemPanel1,
ID_REMOVE_FEAT,
_(
"Remove All Features"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
323wxWindow* w = this->GetParent();
339star->SetLabel(
wxT(
"*"));
341star->SetLabel(
wxT(
" "));
355 boolok_to_bulk_edit =
true;
356 stringmessage =
"";
358 boolmissing_required =
false;
364 stringmissing =
"";
365 stringall_summary =
"";
366 boolany_data =
false;
367 boolmissing_required_col =
false;
368 for(
size_t i= 1;
i<
table->GetColumns().
size();
i++) {
369 stringtitle =
table->GetColumns()[
i]->GetHeader().GetTitle();
371 stringfirst_val =
table->GetColumns()[
i]->GetData().GetString()[0];
375all_summary +=
"\n";
377all_summary += title +
":"+ first_val;
381ok_to_bulk_edit =
false;
383mixed =
"Record contains mixed values for ";
390 if(
NStr::Equal(title,
"Sequencing Technology")) {
391missing +=
"Missing required Sequencing Technology information. ";
392missing_required_col =
true;
399 if((required || any_data) && missing_required_col) {
400missing_required =
true;
403message = missing + mixed;
404}
else if(required) {
405message =
"Missing required sequencing technology information";
406missing_required =
true;
409message = all_summary;
413message =
"Missing required sequencing technology information";
414missing_required =
true;
421 if(missing_required) {
424 if(ok_to_bulk_edit) {
472wxHyperlinkCtrl* link_ctrl =
dynamic_cast<wxHyperlinkCtrl*
>(
event.GetEventObject());
486 switch(wizard_type) {
488 m_SourceType->Append (
wxT(
"Norovirus, Sapovirus (Caliciviridae)"));
492 m_SourceType->Append (
wxT(
"Not listed above or mixed set of different viruses"));
536 boolis_unchosen =
false;
554 if(choices.size() > 0 && choices.Last() == wxEmptyString) {
559 if(kit->first == src_type) {
560wxArrayString::iterator it = choices.begin();
566 if(it != choices.end()) {
568is_unchosen =
false;
577 if(is_unchosen && choices.size() > 1) {
579 m_SourceType->SetSelection(
static_cast<int>(choices.size()));
605 switch(wizard_type) {
687src_type = kit->first;
733 for(
intpos =
static_cast<int>(
m_FieldsInUse.size()) - 1; pos > -1; pos--) {
747 for(
intpos = 0; pos < num_keep; pos++) {
750vector<CSubPrepFieldEditor * >::iterator it =
m_ExtraFields.begin();
752 if((*it) ==
NULL) {
764 string label,
stringcolumn_name,
766 boolmust_choose,
boolrequired,
767 stringdefault_val,
stringurl,
774 if(
NStr::Equal((*it)->GetColumnName(), column_name)) {
781 if(new_field ==
NULL) {
783 m_WizardExtras->Add(new_field, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
790new_field->
SetConverter(
label, column_name, converter, must_choose, required, default_val, url, allow_mix);
873wxStaticText* star =
newwxStaticText(
this, wxID_STATIC,
_(
"*"), wxDefaultPosition, wxDefaultSize, 0 );
874star->SetForegroundColour(wxColour(255, 0, 0));
875sizer->Add(star, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
876star->SetFont(wxFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false,
wxT(
"Tahoma")));
895 if(!seh || !seh.IsSet()) {
899 intset_class = objects::CBioseq_set::eClass_not_set;
900 if(seh.GetSet().IsSetClass()) {
901set_class = seh.GetSet().GetClass();
904wxArrayString set_strings;
905wxString tooltip_text = wxEmptyString;
907wxString sel = wxEmptyString;
909 caseobjects::CBioseq_set::eClass_pop_set:
910sel =
"Population Study";
912 caseobjects::CBioseq_set::eClass_phy_set:
913sel =
"Phylogenetic Study";
915 caseobjects::CBioseq_set::eClass_mut_set:
916sel =
"Mutation Study";
918 caseobjects::CBioseq_set::eClass_eco_set:
919sel =
"Environmental set";
921 caseobjects::CBioseq_set::eClass_genbank:
929 switch(wizard_type) {
931tooltip_text.append(
wxT(
"Batch: Do not process as a set.\n"));
932tooltip_text.append(
wxT(
"Population Study: a set of sequences that were derived by sequencing the same gene from different isolates of the same organism.\n"));
933tooltip_text.append(
wxT(
"Phylogenetic Study: a set of sequences that were derived by sequencing the same gene from different organisms.\n"));
934tooltip_text.append(
wxT(
"Mutation Study: a set of sequences that were derived by sequencing multiple mutations of a single gene.\n"));
935tooltip_text.append(
wxT(
"Environmental set: a set of sequences that were derived by sequencing the same gene from a population of unclassified or unknown organisms."));
937set_strings.push_back(
wxT(
"Batch"));
938set_strings.push_back(
wxT(
"Population Study"));
939set_strings.push_back(
wxT(
"Phylogenetic Study"));
940set_strings.push_back(
wxT(
"Mutation Study"));
941set_strings.push_back(
wxT(
"Environmental set"));
944tooltip_text.append(
wxT(
"Batch: Do not process as a set.\n"));
945tooltip_text.append(
wxT(
"Environmental set: a set of sequences that were derived by sequencing the same gene from a population of unclassified or unknown organisms."));
946set_strings.push_back(
wxT(
"Batch"));
947set_strings.push_back(
wxT(
"Environmental set"));
953tooltip_text.append(
wxT(
"Batch: Do not process as a set.\n"));
954tooltip_text.append(
wxT(
"Population Study: a set of sequences that were derived by sequencing the same gene from different isolates of the same organism.\n"));
955tooltip_text.append(
wxT(
"Phylogenetic Study: a set of sequences that were derived by sequencing the same gene from different organisms.\n"));
956tooltip_text.append(
wxT(
"Mutation Study: a set of sequences that were derived by sequencing multiple mutations of a single gene.\n"));
957tooltip_text.append(
wxT(
"Environmental set: a set of sequences that were derived by sequencing the same gene from a population of unclassified or unknown organisms."));
959set_strings.push_back(
wxT(
"Batch"));
960set_strings.push_back(
wxT(
"Population Study"));
961set_strings.push_back(
wxT(
"Phylogenetic Study"));
962set_strings.push_back(
wxT(
"Mutation Study"));
963set_strings.push_back(
wxT(
"Environmental set"));
966 if(set_class == objects::CBioseq_set::eClass_genbank) {
969set_strings.push_back(
wxT(
"Batch"));
973 if(set_strings.empty()) {
977wxStaticText* itemStaticText =
newwxStaticText(
this, wxID_STATIC,
wxT(
"Set Type"),
978wxDefaultPosition, wxSize(60, -1), wxALIGN_CENTRE );
979 m_ExtraGrid->Add(itemStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
983wxChoice *choice =
newwxChoice(
this,
ID_SET_CHOICE, wxDefaultPosition, wxSize(400, -1), set_strings, 0 );
984 m_ExtraGrid->Add(choice, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
985wxString please_choose =
wxT(
"Please choose a set type");
986 if(sel.empty() || !choice->SetStringSelection(sel)) {
987choice->AppendString(please_choose);
988choice->SetStringSelection(please_choose);
996choice->SetToolTip(tooltip_text);
999 m_ExtraGrid->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
@ eWizardSrcType_cultured_fungus
@ eWizardSrcType_virus_norovirus
@ eWizardSrcType_virus_foot_and_mouth
@ eWizardSrcType_bacteria_or_archaea
@ eWizardSrcType_uncultured_fungus
@ eWizardSrcType_virus_influenza
@ eWizardSrcType_vouchered_fungus
@ eWizardSrcType_virus_rotavirus
@ eWizardType_uncultured_samples
@ eWizardType_microsatellite
@ eWizardType_rrna_its_igs
void SetConverter(string label, string column_name, CTableFieldCommandConverter *converter, bool must_choose=false, bool required=false, string default_val="", string url="", bool allow_mix=true)
void ImportFeatureTableFile()
void SetSubmissionNotReady(string error)
bool OkToBulkEditSeqTech()
bool IsSequencingTechnologyRequired(CSourceRequirements::EWizardType wizard_type)
string GetWizardSrcTypeField()
void LaunchFeatureAdder()
void LaunchSourceEditor()
CRef< objects::CSeq_table > GetSeqTechTable()
void LaunchSeqTechEditor()
void ClearSeqTechValues()
void SetSourceType(string src_type)
CSourceRequirements::EWizardType GetWizardType()
CVirusMoleculeQuestionsPanel * m_VirusMolQuestions
static bool ShowToolTips()
Should we show tooltips?
wxHyperlinkCtrl * m_SeqTechEdit
void OnClickSeqTechSummary(wxMouseEvent &event)
wxEVT_LEFT_DOWN event handler for ID_TEXTCTRL
wxHyperlinkCtrl * m_FeatureImportBtn
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnAddFeaturesClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL3
void AddField(objects::CSeq_entry_Handle seh, ICommandProccessor *processor, IWorkbench *workbench, string label, string column_name, CTableFieldCommandConverter *converter, bool must_choose=false, bool required=false, string default_val="", string url="", bool allow_mix=true)
void OnEditSourceClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL2
void ShowSourceLabelStar(bool val)
wxStaticText * m_StarTech
wxHyperlinkCtrl * m_EditSourceLink
CSubmissionPrepMainPanel()
Constructors.
~CSubmissionPrepMainPanel()
Destructor.
wxBoxSizer * m_WizardExtras
CSourceRequirements::EWizardSrcType GetWizardSrcTypeFromCtrls(CSourceRequirements::EWizardType wizard_type)
void Init()
Initialises member variables.
void ShowAddFeatureBtn(bool val)
wxStaticText * m_StarFeatures
void OnSourceTypeSelected(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_SOURCETYPE
wxStaticText * m_StarSource
wxTextCtrl * m_SequencingTechLabel
void SetSourceType(CSourceRequirements::EWizardSrcType src_type)
wxHyperlinkCtrl * m_RemoveFeaturesBtn
void OnRemoveFeatHyperlinkClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_REMOVE_FEAT
void SetFeaturesLabel(string label)
void SetSourceTypeOptions(CSourceRequirements::EWizardType wizard_type)
pair< CSourceRequirements::EWizardSrcType, string > TWizardSrcTypeName
CSourceRequirements::EWizardSrcType GetWizardSrcTypeFromName(string name)
CSubPrep_panel * x_GetParent()
wxTextCtrl * m_FeaturesLabel
vector< CSubPrepFieldEditor * > m_ExtraFields
void OnClickFeatureSummary(wxMouseEvent &event)
wxEVT_LEFT_DOWN event handler for ID_TEXTCTRL1
void OnImportFeatureTableFile(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL4
vector< bool > m_FieldsInUse
void OnEditSequencingTechnologyClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL1
TWizardSrcTypeNameList m_SrcTypeNames
void CreateSetChoice(CSourceRequirements::EWizardType wizard_type, objects::CSeq_entry_Handle seh)
vector< TWizardSrcTypeName > TWizardSrcTypeNameList
void UpdateSeqTechCtrls(CSourceRequirements::EWizardType wizard_type)
bool Create(wxWindow *parent, wxWindowID id=10001, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
wxBoxSizer * m_VirusMolSizer
wxFlexGridSizer * m_ExtraGrid
void SetSourceLabel(string label)
void CreateVirusMoleculeOptions(objects::CSeq_entry_Handle seh, ICommandProccessor *processor)
void OnClickSrcSummary(wxMouseEvent &event)
wxEVT_LEFT_DOWN event handler for ID_TEXTCTRL2
wxStaticText * x_AddStar(wxFlexGridSizer *sizer)
wxStaticText * m_StarSourceType
wxBoxSizer * m_ChimeraSizer
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxHyperlinkCtrl * m_FeatureAddBtn
wxTextCtrl * m_SourceLabel
void CreateControls()
Creates the controls and sizers.
void ShowFeaturesStar(bool val)
CChimeraPanel * m_ChimeraPanel
void ShowChimera(objects::CSeq_entry_Handle seh, ICommandProccessor *processor, IWorkbench *workbench, bool show)
Undo/Redo interface for editing operations.
IWorkbench is the central interface in the application framework.
const char * kMoleculeType
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
static const char label[]
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
CRef< objects::CSeq_table > BuildMolInfoValuesTableFromSeqEntry(objects::CSeq_entry_Handle seh, CSourceRequirements::EWizardType wizard_type)
const struct ncbi::grid::netcache::search::fields::SIZE size
CRef< CSeqTable_column > FindSeqTableColumnByName(CRef< objects::CSeq_table > values_table, string column_name)
bool AreAnyColumnValuesMissing(CRef< objects::CSeqTable_column > col)
bool AreAllColumnValuesTheSame(CRef< objects::CSeqTable_column > col, string default_val="")
bool DoesColumnHaveValue(CRef< objects::CSeqTable_column > col, string val)
static int num_srctype_names
static CSubmissionPrepMainPanel::TWizardSrcTypeName s_srctype_names[]
static void s_ShowStar(wxStaticText *star, bool show)
#define ID_HYPERLINKCTRL1
#define ID_HYPERLINKCTRL3
#define ID_HYPERLINKCTRL2
#define ID_HYPERLINKCTRL4
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4