title =
"Country Fixup Do Not Fix Capitalization After Colon";
63title =
"Country Fixup Fix Capitalization After Colon";
74 if(dlg.ShowModal() == wxID_OK)
104new_feat->
Assign(feat_it->GetOriginalFeature());
117 if((*it)->IsSource()) {
123new_desc->
Assign(orig_desc);
142 boolmodified =
false;
145 if((*subsource)->IsSetSubtype() &&
146(*subsource)->IsSetName() &&
149 stringcountry = (*subsource)->GetName();
151 if(!new_country.empty() && new_country != country)
153(*subsource)->SetName(new_country);
186wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
187: m_invalid_countries(invalid_countries)
190 Create(parent,
id, caption, pos,
size, style);
196SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
197wxDialog::Create( parent,
id, caption, pos,
size, style );
202GetSizer()->SetSizeHints(
this);
228wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
229itemDialog1->SetSizer(itemBoxSizer2);
231wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
232itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
234wxArrayString itemChoiceStrings, itemChoiceStringsWritable;
240itemBoxSizer3->Add(
m_GridPanel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
243 m_Grid->SetTable(gridAdapter,
true);
244 m_Grid->AutoSizeColumns();
245 intl_height =
m_Grid->GetColLabelSize();
246 m_Grid->SetColLabelSize( 2 * l_height );
253 if((*it)->IsSetHeader() && (*it)->GetHeader().IsSetTitle() )
255 stringtitle = (*it)->GetHeader().GetTitle();
258itemChoiceStrings.Add(wxString(title));
260itemChoiceStringsWritable.Add(wxString(title));
269 if(glyph_col >= 0 && glyph_col+1 <
m_Grid->GetNumberCols())
275wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
276itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
281wxBoxSizer* itemBoxSizer5 =
newwxBoxSizer(wxHORIZONTAL);
282itemBoxSizer2->Add(itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
287wxBoxSizer* itemBoxSizer13 =
newwxBoxSizer(wxHORIZONTAL);
288itemBoxSizer2->Add(itemBoxSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
290wxButton* itemButton14 =
newwxButton( itemDialog1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
291itemBoxSizer13->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
293wxButton* itemButton15 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
294itemBoxSizer13->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
305expand_col->
SetHeader().SetTitle(
"");
306expand_col->
SetHeader().SetField_name(
"expand");
307expand_col->
SetData().SetString();
310country_col->
SetHeader().SetTitle(
"Country");
311country_col->
SetHeader().SetField_name(
"country");
312country_col->
SetData().SetString();
315accession_col->
SetHeader().SetTitle(
"Accession");
316accession_col->
SetHeader().SetField_name(
"accession");
317accession_col->
SetData().SetString();
322bogus_col->
SetHeader().SetField_name(
"");
323bogus_col->
SetData().SetString();
326 table->SetColumns().push_back(id_col);
327 table->SetColumns().push_back(expand_col);
328 table->SetColumns().push_back(country_col);
329 table->SetColumns().push_back(accession_col);
330 table->SetColumns().push_back(bogus_col);
335 stringcountry = it->first;
336 stringaccession = it->second;
341id_col->
SetData().SetId().push_back(
id);
342expand_col->
SetData().SetString().push_back(
"");
343country_col->
SetData().SetString().push_back(country);
344accession_col->
SetData().SetString().push_back(accession);
345bogus_col->
SetData().SetString().push_back(
"");
361 stringcountry = it->first;
362 stringaccession = it->second;
367 if(row < values_table->GetColumn(
"country").GetData().GetString().
size())
371 if(new_country != country && !new_country.empty())
373 result[country] = new_country;
385 returnfixed_countries;
390 return "Invalid operation in Bulk Country Edit";
443wxMessageDialog dlg(
this,
_(
"Discard modifications?"),
_(
"Attention"),wxOK|wxCANCEL|wxCENTRE);
444 if(dlg.ShowModal() == wxID_OK)
~CBulkCountryEdit()
Destructor.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Country Modifiers That Could Not Be Autocorrected"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
CBulkCountryEdit()
Constructors.
void Init()
Initialises member variables.
static bool ShowToolTips()
Should we show tooltips?
void OnClickCancel(wxCommandEvent &event)
void CreateControls()
Creates the controls and sizers.
map< string, string > GetValuesFromValuesTable(CRef< objects::CSeq_table >)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool IsReadOnlyColumn(string column_name)
CSeqTableGridPanel * m_GridPanel
CApplyEditconvertPanel * m_AecrPanel
CStringConstraintSelect * m_StringConstraintPanel
vector< pair< string, string > > m_invalid_countries
CRef< objects::CSeq_table > GetChoices(CRef< objects::CSeq_table > values_table)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CRef< objects::CSeq_table > GetValuesTable()
map< string, string > GetValues()
void AddCommand(IEditCommand &command)
static bool IsValid(const string &country)
static string CountryFixupItem(const string &input, bool capitalize_after_colon)
bool m_capitalize_after_colon
void x_ApplyToDescriptors(const objects::CSeq_entry &se, CCmdComposite *composite)
map< string, string > m_fixed_countries
void x_ApplyToSeqAndFeat(CCmdComposite *composite)
vector< pair< string, string > > m_invalid_countries
bool x_ApplyToBioSource(objects::CBioSource &biosource)
objects::CSeq_entry_Handle m_Seh
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, bool capitalize_after_colon)
Seq-loc and seq-align mapper exceptions.
void MakeColumnReadOnly(int pos, bool val=true)
void InitColumnCollapse(int col)
CRef< objects::CSeq_table > GetValuesTable()
namespace ncbi::objects::
const CSeqTable_column & GetColumn(CTempString column_name) const
const_iterator end() const
const_iterator find(const key_type &key) const
static string s_GetAccession(CBioseq_Handle bsh)
const char * kSequenceIdColLabel
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
CConstRef< CSeq_id > GetSeqId(void) const
@ eContent
Untagged human-readable accession or the like.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
CSeq_entry_Handle GetSeq_entryHandle(CDataLoader *loader, const TBlobId &blob_id, EMissing action=eMissing_Default)
Get Seq-entry handle by its blob-id, with possible loading.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const TColumns & GetColumns(void) const
Get the Columns member data.
void SetHeader(THeader &value)
Assign a value to Header data member.
vector< CRef< CSeqTable_column > > TColumns
void SetData(TData &value)
Assign a value to Data data member.
const TString & GetString(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
@ eField_id_location_id
location Seq-id
void SetData(TData &value)
Assign a value to Data data member.
const TSeq & GetSeq(void) const
Get the variant data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSet(void) const
Check if variant Set is selected.
TSource & SetSource(void)
Select the variant.
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
#define EDIT_EACH_SUBSOURCE_ON_BIOSOURCE(Itr, Var)
#define FOR_EACH_SEQENTRY_ON_SEQSET(Itr, Var)
FOR_EACH_SEQENTRY_ON_SEQSET EDIT_EACH_SEQENTRY_ON_SEQSET.
#define FOR_EACH_SEQDESC_ON_SEQENTRY(Itr, Var)
FOR_EACH_SEQDESC_ON_SEQENTRY EDIT_EACH_SEQDESC_ON_SEQENTRY.
#define row(bind, expected)
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