NCBI C++ ToolKit
bulk_gene_edit.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: bulk_gene_edit.cpp 47479 2023-05-02 13:24:02Z ucko $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Igor Filippov
27  */
28 #include <ncbi_pch.hpp>
30 #include <objmgr/feat_ci.hpp>
31 #include <objmgr/util/sequence.hpp>
40 #include <wx/msgdlg.h>
41 
44 
45 
46 IMPLEMENT_DYNAMIC_CLASS( CBulkGene, wxDialog )
47 
48 BEGIN_EVENT_TABLE( CBulkGene, wxDialog )
49 
50  EVT_BUTTON( wxID_OK, CBulkGene::OnClickOk )
51 
52  EVT_BUTTON( wxID_CANCEL, CBulkGene::OnClickCancel )
53 
54 
56 
58 {
59  Init();
60 }
61 
62 CBulkGene::CBulkGene( wxWindow* parent, objects::CSeq_entry_Handle seh, IWorkbench* workbench, CConstRef<objects::CSeq_submit> seqSubmit,
63  wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
64 {
65  this->m_Workbench = workbench;
66  this->m_SeqSubmit = seqSubmit;
67 
69  for ( ; fi ; ++fi )
70  {
71  m_FeatHandles.push_back(fi->GetSeq_feat_Handle());
72  }
73  Init();
74  Create(parent, id, caption, pos, size, style);
75 }
76 
77 CBulkGene::CBulkGene( wxWindow* parent, const vector<CSeq_feat_Handle> &feat_handles, IWorkbench* workbench,
78  wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
79  : m_FeatHandles(feat_handles)
80 {
81  this->m_Workbench = workbench;
82  Init();
83  Create(parent, id, caption, pos, size, style);
84 }
85 
86 
87 bool CBulkGene::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
88 {
89  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
90  SetLayoutAdaptationMode(wxDIALOG_ADAPTATION_MODE_ENABLED);
91  wxDialog::Create( parent, id, caption, pos, size, style );
92 
94  if (GetSizer())
95  {
96  GetSizer()->SetSizeHints(this);
97  }
98  Centre();
99  return true;
100 }
101 
102 
104 {
105 }
106 
107 
108 /*!
109  * Member initialisation
110  */
111 
113 {
114  m_Grid=NULL;
115 }
116 
117 
119 {
120  CBulkGene* itemDialog1 = this;
121 
122  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
123  itemDialog1->SetSizer(itemBoxSizer2);
124 
125  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
126  itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
127 
128  wxArrayString itemChoiceStrings, itemChoiceStringsWritable;
129 
130  if (m_FeatHandles.empty())
131  {
132  wxMessageBox(wxT("No Gene records found"), wxT("Error"), wxOK | wxICON_ERROR);
133  NCBI_THROW( CException, eUnknown, "No Gene records found" );
134  }
135 
137  if (values_table->GetNum_rows() < 1)
138  {
139  wxMessageBox(wxT("No Gene records found"), wxT("Error"), wxOK | wxICON_ERROR);
140  NCBI_THROW( CException, eUnknown, "No Gene records found" );
141  }
142  CRef<CSeq_table> choices = GetChoices(values_table);
143  int glyph_col = GetCollapsible();
144  m_GridPanel = new CSeqTableGridPanel(this, values_table, choices, glyph_col);
145  itemBoxSizer3->Add(m_GridPanel, 0, wxALIGN_TOP|wxALL, 5);
147  CSeqTableGrid *gridAdapter = new CSeqTableGrid(values_table);
148  m_Grid->SetTable(gridAdapter, true);
149  m_Grid->AutoSizeColumns();
150  int l_height = m_Grid->GetColLabelSize();
151  m_Grid->SetColLabelSize( 2 * l_height );
153 
154  int pos = 0;
155  ITERATE (CSeq_table::TColumns, it, values_table->GetColumns())
156  {
157  if (pos > 0)
158  {
159  if ((*it)->IsSetHeader() && (*it)->GetHeader().IsSetTitle() )
160  {
161  string title = (*it)->GetHeader().GetTitle();
162  if (!title.empty())
163  {
164  itemChoiceStrings.Add(wxString(title));
165  if (!IsReadOnlyColumn(title))
166  itemChoiceStringsWritable.Add(wxString(title));
167  }
168  if (IsReadOnlyColumn(title))
169  m_GridPanel->MakeColumnReadOnly(pos - 1, true);
170  }
171  }
172  pos++;
173  }
174 
175  if (glyph_col >= 0 && glyph_col+1 < m_Grid->GetNumberCols())
176  {
177  m_GridPanel->InitColumnCollapse(glyph_col+1);
178  }
179 
180 
181 
182  CStringConstraintSelect *itemStringConstraintPanel = new CStringConstraintSelect( itemDialog1, m_GridPanel, itemChoiceStrings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
183  itemBoxSizer2->Add(itemStringConstraintPanel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxFIXED_MINSIZE, 0);
184 
185  m_AecrPanel = new CApplyEditconvertPanel( itemDialog1, m_GridPanel, itemChoiceStringsWritable, 0, true, wxID_ANY, wxDefaultPosition, wxSize(1046, 219));
186  itemBoxSizer2->Add(m_AecrPanel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxFIXED_MINSIZE, 1);
187 
188  wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxHORIZONTAL);
189  itemBoxSizer2->Add(itemBoxSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
190 
191  wxButton* itemButton14 = new wxButton( itemDialog1, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
192  itemBoxSizer13->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
193 
194  wxButton* itemButton15 = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
195  itemBoxSizer13->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
196 }
197 
198 
200 {
201  CRef<objects::CSeqTable_column> id_col(new objects::CSeqTable_column());
202  id_col->SetHeader().SetField_id(objects::CSeqTable_column_info::eField_id_location_id);
203  id_col->SetHeader().SetTitle(kSequenceIdColLabel);
204 
205  CRef<objects::CSeqTable_column> expand_col(new objects::CSeqTable_column());
206  expand_col->SetHeader().SetTitle("");
207  expand_col->SetHeader().SetField_name("expand");
208  expand_col->SetData().SetString();
209 
210  CRef<objects::CSeqTable_column> locus_col(new objects::CSeqTable_column());
211  locus_col->SetHeader().SetTitle("locus");
212  locus_col->SetHeader().SetField_name("locus");
213  locus_col->SetData().SetString();
214 
215  CRef<objects::CSeqTable_column> locus_tag_col(new objects::CSeqTable_column());
216  locus_tag_col->SetHeader().SetTitle("locus_tag");
217  locus_tag_col->SetHeader().SetField_name("locus_tag");
218  locus_tag_col->SetData().SetString();
219 
220  CRef<objects::CSeqTable_column> desc_col(new objects::CSeqTable_column());
221  desc_col->SetHeader().SetTitle("description");
222  desc_col->SetHeader().SetField_name("description");
223  desc_col->SetData().SetString();
224 
225  CRef<objects::CSeqTable_column> loc_col(new objects::CSeqTable_column());
226  loc_col->SetHeader().SetTitle("location");
227  loc_col->SetHeader().SetField_name("location");
228  loc_col->SetData().SetString();
229 
230  CRef<objects::CSeqTable_column> comment_col(new objects::CSeqTable_column());
231  comment_col->SetHeader().SetTitle("comment");
232  comment_col->SetHeader().SetField_name("comment");
233  comment_col->SetData().SetString();
234 
235  CRef<objects::CSeqTable_column> allele_col(new objects::CSeqTable_column());
236  allele_col->SetHeader().SetTitle("allele");
237  allele_col->SetHeader().SetField_name("allele");
238  allele_col->SetData().SetString();
239 
240  CRef<objects::CSeqTable_column> synonym_col(new objects::CSeqTable_column());
241  synonym_col->SetHeader().SetTitle("synonym");
242  synonym_col->SetHeader().SetField_name("synonym");
243  synonym_col->SetData().SetString();
244 
245  // bogus column to include last, otherwise deletion of the previous column will not work
246  CRef<objects::CSeqTable_column> bogus_col(new objects::CSeqTable_column());
247  bogus_col->SetHeader().SetTitle("");
248  bogus_col->SetHeader().SetField_name("");
249  bogus_col->SetData().SetString();
250 
251  CRef<objects::CSeq_table> table(new objects::CSeq_table());
252  table->SetColumns().push_back(id_col);
253  table->SetColumns().push_back(expand_col);
254  table->SetColumns().push_back(locus_col);
255  table->SetColumns().push_back(locus_tag_col);
256  table->SetColumns().push_back(desc_col);
257  table->SetColumns().push_back(loc_col);
258 
261  partial_start_col->SetHeader().SetField_name(kPartialStart);
262 
265  partial_stop_col->SetHeader().SetField_name(kPartialStop);
266 
267  table->SetColumns().push_back(comment_col);
268  table->SetColumns().push_back(allele_col);
269  table->SetColumns().push_back(synonym_col);
270  table->SetColumns().push_back(bogus_col);
271 
272  size_t row = 0;
273 
274  for ( vector<CSeq_feat_Handle>::iterator fi = m_FeatHandles.begin(); fi != m_FeatHandles.end() ; ++fi )
275  {
276  string locus,locus_tag,desc,loc,comment, allele, synonym;
277 
278  const CSeq_feat &feat = *fi->GetOriginalSeq_feat();
279  const CGene_ref &gene = feat.GetData().GetGene();
280  if (gene.IsSetLocus())
281  locus = gene.GetLocus();
282  if (gene.IsSetLocus_tag())
283  locus_tag = gene.GetLocus_tag();
284  if (gene.IsSetDesc())
285  desc = gene.GetDesc();
286  if (feat.IsSetLocation())
287  feat.GetLocation().GetLabel(&loc);
288  if (feat.IsSetComment())
289  comment = feat.GetComment();
290  if (gene.IsSetAllele())
291  allele = gene.GetAllele();
292  if (gene.IsSetSyn())
293  synonym = NStr::Join(gene.GetSyn(), "|");
294  CRef<objects::CSeq_id> id(new objects::CSeq_id());
295  id->SetLocal().SetId(static_cast<CObject_id::TId>(row));
296  id_col->SetData().SetId().push_back(id);
297  expand_col->SetData().SetString().push_back("");
298  locus_col->SetData().SetString().push_back(locus);
299  locus_tag_col->SetData().SetString().push_back(locus_tag);
300  desc_col->SetData().SetString().push_back(desc);
301  loc_col->SetData().SetString().push_back(loc);
302  AddValueToColumn(partial_start_col, partial_start_feat_col->GetFromFeat(feat), row);
303  AddValueToColumn(partial_stop_col, partial_stop_feat_col->GetFromFeat(feat), row);
304  comment_col->SetData().SetString().push_back(comment);
305  allele_col->SetData().SetString().push_back(allele);
306  synonym_col->SetData().SetString().push_back(synonym);
307  bogus_col->SetData().SetString().push_back("");
308  row++;
309  }
310 
311  table->SetNum_rows(static_cast<CSeq_table::TNum_rows>(row));
312  return table;
313 }
314 
315 
317 {
318  CRef<CCmdComposite> cmd(new CCmdComposite("Bulk Gene Edit"));
321  m_Modified = false;
322  size_t row = 0;
323 
324  for ( vector<CSeq_feat_Handle>::iterator fi = m_FeatHandles.begin(); fi != m_FeatHandles.end() ; ++fi )
325  {
326  const CSeq_feat &feat = *fi->GetOriginalSeq_feat();
327  CRef<CSeq_feat> new_feat(new CSeq_feat());
328  new_feat->Assign(feat);
329  string locus,locus_tag,desc,loc,comment, allele, synonym;
330  bool modified = false;
331  const CGene_ref &gene = feat.GetData().GetGene();
332  if (gene.IsSetLocus())
333  locus = gene.GetLocus();
334  if (gene.IsSetLocus_tag())
335  locus_tag = gene.GetLocus_tag();
336  if (gene.IsSetDesc())
337  desc = gene.GetDesc();
338  if (feat.IsSetLocation())
339  feat.GetLocation().GetLabel(&loc);
340  if (feat.IsSetComment())
341  comment = feat.GetComment();
342  if (gene.IsSetAllele())
343  allele = gene.GetAllele();
344  if (gene.IsSetSyn())
345  synonym = NStr::Join(gene.GetSyn(), "|");
346 
347  string new_locus;
348  try
349  {
350  if (row < values_table->GetColumn("locus").GetData().GetString().size())
351  new_locus = values_table->GetColumn("locus").GetData().GetString()[row];
352  } catch(CSeqTableException&) {}
353 
354  if (new_locus != locus)
355  {
356  if (new_locus.empty())
357  new_feat->SetData().SetGene().ResetLocus();
358  else
359  new_feat->SetData().SetGene().SetLocus(new_locus);
360  modified = true;
361  }
362 
363  string new_locus_tag;
364  try
365  {
366  if (row < values_table->GetColumn("locus_tag").GetData().GetString().size())
367  new_locus_tag = values_table->GetColumn("locus_tag").GetData().GetString()[row];
368  } catch(CSeqTableException&) {}
369 
370  if (new_locus_tag != locus_tag)
371  {
372  if (new_locus_tag.empty())
373  new_feat->SetData().SetGene().ResetLocus_tag();
374  else
375  new_feat->SetData().SetGene().SetLocus_tag(new_locus_tag);
376  modified = true;
377  }
378 
379 
380  string new_desc;
381  try
382  {
383  if (row < values_table->GetColumn("description").GetData().GetString().size())
384  new_desc = values_table->GetColumn("description").GetData().GetString()[row];
385  } catch(CSeqTableException&) {}
386 
387  if (new_desc != desc)
388  {
389  if (new_desc.empty())
390  new_feat->SetData().SetGene().ResetDesc();
391  else
392  new_feat->SetData().SetGene().SetDesc() = new_desc;
393  modified = true;
394  }
395 
396  string new_comment;
397  try
398  {
399  if (row < values_table->GetColumn("comment").GetData().GetString().size())
400  new_comment = values_table->GetColumn("comment").GetData().GetString()[row];
401  } catch(CSeqTableException&) {}
402 
403  if (new_comment != comment)
404  {
405  if (new_comment.empty())
406  new_feat->ResetComment();
407  else
408  new_feat->SetComment() = new_comment;
409  modified = true;
410  }
411 
412  string new_allele;
413  try
414  {
415  if (row < values_table->GetColumn("allele").GetData().GetString().size())
416  new_allele = values_table->GetColumn("allele").GetData().GetString()[row];
417  } catch(CSeqTableException&) {}
418  if (new_allele != allele)
419  {
420  new_feat->SetData().SetGene().ResetAllele();
421  if (!new_allele.empty())
422  new_feat->SetData().SetGene().SetAllele(new_allele);
423  modified = true;
424  }
425 
426  string new_synonym;
427  try
428  {
429  if (row < values_table->GetColumn("synonym").GetData().GetString().size())
430  new_synonym = values_table->GetColumn("synonym").GetData().GetString()[row];
431  } catch(CSeqTableException&) {}
432  if (new_synonym != synonym)
433  {
434  new_feat->SetData().SetGene().ResetSyn();
435  vector<string> new_values;
436  NStr::Split(new_synonym, "|", new_values);
437  for (const auto& val : new_values)
438  if (!val.empty())
439  new_feat->SetData().SetGene().SetSyn().push_back(val);
440 
441  modified = true;
442  }
443 
444  string partial_start_val = partial_start_feat_col->GetFromFeat(feat);
445  string new_partial_start_val;
446  try
447  {
448  if (row < values_table->GetColumn(kPartialStart).GetData().GetString().size())
449  new_partial_start_val = values_table->GetColumn(kPartialStart).GetData().GetString()[row];
450  } catch(CSeqTableException&) {}
451 
452  if (new_partial_start_val != partial_start_val)
453  {
454  if (new_partial_start_val.empty())
455  partial_start_feat_col->ClearInFeature(*new_feat);
456  else
457  partial_start_feat_col->AddToFeature(*new_feat, new_partial_start_val, edit::eExistingText_replace_old);
458  modified = true;
459  }
460 
461  string partial_stop_val = partial_stop_feat_col->GetFromFeat(feat);
462  string new_partial_stop_val;
463  try
464  {
465  if (row < values_table->GetColumn(kPartialStop).GetData().GetString().size())
466  new_partial_stop_val = values_table->GetColumn(kPartialStop).GetData().GetString()[row];
467  } catch(CSeqTableException&) {}
468 
469  if (new_partial_stop_val != partial_stop_val)
470  {
471  if (new_partial_stop_val.empty())
472  partial_stop_feat_col->ClearInFeature(*new_feat);
473  else
474  partial_stop_feat_col->AddToFeature(*new_feat, new_partial_stop_val, edit::eExistingText_replace_old);
475  modified = true;
476  }
477 
478  if (modified)
479  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(*fi,*new_feat)));
480  m_Modified |= modified;
481  row++;
482  }
483 
484  return cmd;
485 }
486 
487 
489 {
490  CRef<CSeq_table> values_table = m_GridPanel->GetValuesTable();
492  return cmd;
493 }
494 
496 {
497  return "Invalid operation in Bulk Gene Edit";
498 }
499 
500 
501 /*!
502  * Should we show tooltips?
503  */
504 
506 {
507  return true;
508 }
509 
510 /*!
511  * Get bitmap resources
512  */
513 
514 wxBitmap CBulkGene::GetBitmapResource( const wxString& name )
515 {
516  // Bitmap retrieval
517 ////@begin CBulkGene bitmap retrieval
518  wxUnusedVar(name);
519  return wxNullBitmap;
520 ////@end CBulkGene bitmap retrieval
521 }
522 
523 /*!
524  * Get icon resources
525  */
526 
527 wxIcon CBulkGene::GetIconResource( const wxString& name )
528 {
529  // Icon retrieval
530 ////@begin CBulkGene icon retrieval
531  wxUnusedVar(name);
532  return wxNullIcon;
533 ////@end CBulkGene icon retrieval
534 }
535 
536 /*!
537  * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
538  */
539 
540 void CBulkGene::OnClickOk( wxCommandEvent& event )
541 {
542 ////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON in CBulkGene.
543  // Before editing this code, remove the block markers.
544  event.Skip();
545 ////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON in CBulkGene.
546 }
547 
548 /*!
549  * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
550  */
551 
552 void CBulkGene::OnClickCancel( wxCommandEvent& event )
553 {
554  bool modified = m_GridPanel->GetModified() | m_AecrPanel->GetModified();
555  if (modified)
556  {
557  wxMessageDialog dlg(this,_("Discard modifications?"), _("Attention"),wxOK|wxCANCEL|wxCENTRE);
558  if (dlg.ShowModal() == wxID_OK)
559  {
560  event.Skip();
561  }
562  }
563  else
564  event.Skip();
565 }
566 
568 {
569  objects.clear();
570  const CObject* obj = NULL;
571 
572  if (row < m_FeatHandles.size() )
573  {
574  if ( m_FeatHandles[row].GetOriginalSeq_feat()->IsSetLocation() )
575  {
576  bsh = m_FeatHandles[row].GetScope().GetBioseqHandle(m_FeatHandles[row].GetOriginalSeq_feat()->GetLocation()); // CBioseq_Handle GetBioseqHandle(const CSeq_loc& loc);
577  if (bsh)
578  {
579  if (m_SeqSubmit)
580  objects.push_back(SConstScopedObject(m_SeqSubmit,&bsh.GetScope()));
581  else
583  obj = bsh.GetBioseqCore().GetPointer();
584  }
585  }
586  }
587  return obj;
588 }
589 
590 
USING_SCOPE(ncbi::objects)
CBioseq_Handle –.
void CreateControls()
Creates the controls and sizers.
void OnClickOk(wxCommandEvent &event)
CSeqTableGridPanel * m_GridPanel
wxBitmap GetBitmapResource(const wxString &name)
CBulkGene()
Constructors.
int GetCollapsible()
virtual const CObject * RowToScopedObjects(int row, TConstScopedObjects &objects, CBioseq_Handle &bsh)
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Gene Editing"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
wxGrid * m_Grid
CRef< objects::CSeq_table > GetChoices(CRef< objects::CSeq_table > values_table)
void Init()
Initialises member variables.
CApplyEditconvertPanel * m_AecrPanel
bool IsReadOnlyColumn(string column_name)
CRef< CCmdComposite > GetCommandFromValuesTable(CRef< objects::CSeq_table >)
CRef< CCmdComposite > GetCommand()
string GetErrorMessage()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CRef< objects::CSeq_table > GetValuesTableFromSeqEntry()
vector< CSeq_feat_Handle > m_FeatHandles
~CBulkGene()
Destructor.
void OnClickCancel(wxCommandEvent &event)
CFeat_CI –.
Definition: feat_ci.hpp:64
static CRef< CFeatureSeqTableColumnBase > Create(const string &sTitle, objects::CSeqFeatData::ESubtype subtype=objects::CSeqFeatData::eSubtype_any)
virtual void ClearInFeature(objects::CSeq_feat &in_out_feat)
virtual string GetFromFeat(const objects::CSeq_feat &in_out_feat)
virtual bool AddToFeature(objects::CSeq_feat &in_out_feat, const string &newValue, objects::edit::EExistingText existing_text)
CObject –.
Definition: ncbiobj.hpp:180
CConstRef< objects::CSeq_submit > m_SeqSubmit
Seq-loc and seq-align mapper exceptions.
void MakeColumnReadOnly(int pos, bool val=true)
wxGrid * GetGrid(void)
void InitColumnCollapse(int col)
CRef< objects::CSeq_table > GetValuesTable()
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
const CSeqTable_column & GetColumn(CTempString column_name) const
Definition: Seq_table.cpp:65
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
#define _(proto)
Definition: ct_nlmzip_i.h:78
#define wxFIXED_MINSIZE
const string kPartialStart
const string kPartialStop
const char * kSequenceIdColLabel
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
static void Init(void)
Definition: cursor6.c:76
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void GetLabel(string *label) const
Appends a label suitable for display (e.g., error messages) label must point to an existing string ob...
Definition: Seq_loc.cpp:3467
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
CScope & GetScope(void) const
Get scope this handle belongs to.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:1684
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
Definition: ncbistr.cpp:3461
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
Definition: ncbistr.hpp:2697
bool IsSetSyn(void) const
synonyms for locus Check if a value has been assigned to Syn data member.
Definition: Gene_ref_.hpp:756
const TSyn & GetSyn(void) const
Get the Syn member data.
Definition: Gene_ref_.hpp:768
const TDesc & GetDesc(void) const
Get the Desc member data.
Definition: Gene_ref_.hpp:599
bool IsSetLocus_tag(void) const
systematic gene name (e.g., MI0001, ORF0069) Check if a value has been assigned to Locus_tag data mem...
Definition: Gene_ref_.hpp:781
bool IsSetLocus(void) const
Official gene symbol Check if a value has been assigned to Locus data member.
Definition: Gene_ref_.hpp:493
bool IsSetDesc(void) const
descriptive name Check if a value has been assigned to Desc data member.
Definition: Gene_ref_.hpp:587
bool IsSetAllele(void) const
Official allele designation Check if a value has been assigned to Allele data member.
Definition: Gene_ref_.hpp:540
const TLocus_tag & GetLocus_tag(void) const
Get the Locus_tag member data.
Definition: Gene_ref_.hpp:793
const TLocus & GetLocus(void) const
Get the Locus member data.
Definition: Gene_ref_.hpp:505
const TAllele & GetAllele(void) const
Get the Allele member data.
Definition: Gene_ref_.hpp:552
void SetHeader(THeader &value)
Assign a value to Header data member.
vector< CRef< CSeqTable_column > > TColumns
Definition: Seq_table_.hpp:92
const TString & GetString(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
bool IsSetComment(void) const
Check if a value has been assigned to Comment data member.
Definition: Seq_feat_.hpp:1037
void SetComment(const TComment &value)
Assign a value to Comment data member.
Definition: Seq_feat_.hpp:1058
const TLocation & GetLocation(void) const
Get the Location member data.
Definition: Seq_feat_.hpp:1117
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_feat_.hpp:925
void SetData(TData &value)
Assign a value to Data data member.
Definition: Seq_feat_.cpp:94
void ResetComment(void)
Reset Comment data member.
Definition: Seq_feat_.cpp:99
const TComment & GetComment(void) const
Get the Comment member data.
Definition: Seq_feat_.hpp:1049
const TGene & GetGene(void) const
Get the variant data.
bool IsSetLocation(void) const
feature made from Check if a value has been assigned to Location data member.
Definition: Seq_feat_.hpp:1105
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
END_EVENT_TABLE()
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
#define fi
static static static wxID_ANY
CRef< CSeqTable_column > AddStringColumnToTable(CRef< CSeq_table > table, string label)
void AddValueToColumn(CRef< CSeqTable_column > column, string value, size_t row, edit::EExistingText existing_text=edit::eExistingText_replace_old)
#define row(bind, expected)
Definition: string_bind.c:73
@ eExistingText_replace_old
Modified on Tue Apr 23 07:40:07 2024 by modify_doxy.py rev. 669887