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

Go to the SVN repository for this file.

1 /* $Id: fix_for_trans_splicing.cpp 42192 2019-01-10 16:52:15Z filippov $
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 
29 
30 #include <ncbi_pch.hpp>
31 
32 ////@begin includes
33 ////@end includes
34 #include <sstream>
35 #include <objmgr/scope.hpp>
37 #include <objmgr/feat_ci.hpp>
38 #include <objmgr/seq_annot_ci.hpp>
39 #include <objmgr/bioseq_ci.hpp>
41 #include <objmgr/util/feature.hpp>
46 #include <gui/objutils/utils.hpp>
56 
57 
58 
59 ////@begin XPM images
60 ////@end XPM images
61 
63 
64 
65 
66 IMPLEMENT_DYNAMIC_CLASS( CFixForTransSplicing, CBulkCmdDlg )
67 
68 
69 BEGIN_EVENT_TABLE( CFixForTransSplicing, CBulkCmdDlg )
70 EVT_CHOICE( ID_PROTEIN_NAME, CFixForTransSplicing::OnProteinNameSelected )
71 EVT_BUTTON( ID_PAGE_LEFT, CFixForTransSplicing::OnPageLeft)
72 EVT_BUTTON( ID_PAGE_RIGHT, CFixForTransSplicing::OnPageRight)
73 EVT_LISTBOX(ID_CDS_LIST, CFixForTransSplicing::OnListItemSelected)
74 EVT_LISTBOX_DCLICK(ID_CDS_LIST, CFixForTransSplicing::OnListItemActivated)
76 
78 {
79  Init();
80 }
81 
83  wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
84  : CBulkCmdDlg(wb), m_SelectionClient(new CSelectionClient("FixForTransSplicing selections")), m_SelectionClientAttached(false)
85 {
86  Init();
87  Create(parent, id, caption, pos, size, style);
88 }
89 
90 
91 bool CFixForTransSplicing::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
92 {
93  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
94  CBulkCmdDlg::Create( parent, id, caption, pos, size, style );
95 
97  if (GetSizer())
98  {
99  GetSizer()->SetSizeHints(this);
100  }
101  Centre();
102 
103  SetSize(wxSize(280, 550));
104  return true;
105 }
106 
107 
109 {
111  {
113  if (sel_srv)
114  {
115  sel_srv->DetachClient(m_SelectionClient);
117  }
118  }
119 }
120 
121 
122 /*!
123  * Member initialisation
124  */
125 
127 {
129  m_Protein = nullptr;
131  m_ListBox = nullptr;
132  m_PageLeft = nullptr;
133  m_PageRight = nullptr;
134  m_BioseqLabel = nullptr;
135  m_page = 0;
137  if (sel_srv)
138  {
140  sel_srv->GetActiveObjects(objects);
141  if (objects.empty())
142  {
144  }
146  CIRef<IProjectView> pTextView(prjSrv->FindView(*(objects.back().object), "Text View"));
147  if (pTextView)
148  {
149  m_FlatFileCtrl.Reset(dynamic_cast<IFlatFileCtrl*>(pTextView.GetPointerOrNull()));
150  }
151  sel_srv->AttachClient(m_SelectionClient);
153  }
154 }
155 
156 
157 
158 
160 {
161  CFixForTransSplicing* itemDialog1 = this;
162 
163  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
164  itemDialog1->SetSizer(itemBoxSizer2);
165 
166  m_Protein = new wxChoice( itemDialog1, ID_PROTEIN_NAME, wxDefaultPosition, wxDefaultSize, m_ProteinNames, wxCB_SORT );
167  itemBoxSizer2->Add(m_Protein, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
168 
169  wxArrayString choices;
170  m_ListBox = new wxListBox(itemDialog1, ID_CDS_LIST, wxDefaultPosition, wxDefaultSize, choices, wxLB_SINGLE);
171  itemBoxSizer2->Add(m_ListBox, 1, wxGROW|wxALL, 5);
172 
173  m_BioseqLabel = new wxStaticText( itemDialog1, wxID_STATIC, _(" "), wxDefaultPosition, wxDefaultSize, 0 );
174  itemBoxSizer2->Add(m_BioseqLabel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
175 
176  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
177  itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
178 
179  m_PageLeft = new wxButton( itemDialog1, ID_PAGE_LEFT, _("<<<"), wxDefaultPosition, wxDefaultSize, 0 );
180  itemBoxSizer3->Add( m_PageLeft, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
181 
182  m_PageRight = new wxButton( itemDialog1, ID_PAGE_RIGHT, _(">>>"), wxDefaultPosition, wxDefaultSize, 0 );
183  itemBoxSizer3->Add( m_PageRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
184 
185  COkCancelPanel *OkCancel = new COkCancelPanel( itemDialog1, wxID_ANY, wxDefaultPosition, wxSize(100, 100), 0 );
186  itemBoxSizer2->Add(OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
187 
188  m_Protein->SetStringSelection(_("ribosomal protein S12"));
189  PopulateListBox();
190 }
191 
193 {
194  wxBusyCursor wait;
195  m_ProteinNames.Clear();
197  m_bioseqs.clear();
199  CScope& scope = m_TopSeqEntry.GetScope();
200  for (CBioseq_CI bi(m_TopSeqEntry, CSeq_inst::eMol_na); bi; ++bi)
201  {
202  CBioseq_Handle bsh = *bi;
203 
204  for (CFeat_CI cds(bsh, CSeqFeatData::eSubtype_cdregion); cds; ++cds)
205  {
206  if (cds->IsSetProduct())
207  {
208  CBioseq_Handle prot_bsh = scope.GetBioseqHandle(cds->GetProduct());
209  if (prot_bsh)
210  {
211  CFeat_CI prot_feat_ci(prot_bsh, CSeqFeatData::e_Prot);
212  if (prot_feat_ci)
213  {
214  FOR_EACH_NAME_ON_PROTREF(name_it, prot_feat_ci->GetSeq_feat()->GetData().GetProt())
215  {
216  if (!(*name_it).empty())
217  {
218  if (m_name_to_cds.find(*name_it) == m_name_to_cds.end())
219  m_ProteinNames.Add(wxString(*name_it));
220  m_name_to_cds[*name_it][bsh].Add(NStr::Replace(edit::GetTextObjectDescription(*cds->GetSeq_feat(), scope), "\t", " "));
221  m_name_to_obj[*name_it][bsh].push_back(cds->GetSeq_feat_Handle());
222  if (m_bioseqs.empty() || m_bioseqs.back() != bsh)
223  m_bioseqs.push_back(bsh);
224  break;
225  }
226  }
227  }
228  }
229  }
230  }
231  }
232 }
233 
234 void CFixForTransSplicing::OnProteinNameSelected( wxCommandEvent& event )
235 {
236  PopulateListBox();
237 }
238 
240 {
241  string name = m_Protein->GetStringSelection().ToStdString();
243  m_BioseqLabel->SetLabel(wxString(edit::GetTextObjectDescription(*bsh.GetBioseqCore(), m_TopSeqEntry.GetScope())));
244  auto items = m_name_to_cds.find(name);
245  if (items == m_name_to_cds.end())
246  {
247  m_ListBox->Clear();
248  return;
249  }
250  auto items2 = items->second.find(bsh);
251  if (items2 == items->second.end())
252  {
253  m_ListBox->Clear();
254  return;
255  }
256  m_ListBox->Set(items2->second);
257  if (m_page == 0)
258  m_PageLeft->Disable();
259  else
260  m_PageLeft->Enable();
261  if (m_page + 1 >= m_bioseqs.size())
262  m_PageRight->Disable();
263  else
264  m_PageRight->Enable();
265 }
266 
267 void CFixForTransSplicing::OnPageLeft( wxCommandEvent& event )
268 {
269  if (m_page > 0)
270  {
271  m_page--;
272  PopulateListBox();
273  }
274 }
275 
276 void CFixForTransSplicing::OnPageRight( wxCommandEvent& event )
277 {
278  if (m_page + 1 < m_bioseqs.size())
279  {
280  m_page++;
281  PopulateListBox();
282  }
283 }
284 
285 
286 /*!
287  * Should we show tooltips?
288  */
289 
291 {
292  return true;
293 }
294 
295 /*!
296  * Get bitmap resources
297  */
298 
299 wxBitmap CFixForTransSplicing::GetBitmapResource( const wxString& name )
300 {
301  // Bitmap retrieval
302  wxUnusedVar(name);
303  return wxNullBitmap;
304 }
305 
306 /*!
307  * Get icon resources
308  */
309 
310 wxIcon CFixForTransSplicing::GetIconResource( const wxString& name )
311 {
312  // Icon retrieval
313  wxUnusedVar(name);
314  return wxNullIcon;
315 }
316 
318 {
319  wxBusyCursor wait;
320  CRef<CCmdComposite> cmd( new CCmdComposite("Fix For Trans-splicing") );
321  CScope &scope = m_TopSeqEntry.GetScope();
322  string msg;
323  bool modified = false;
324  string name = m_Protein->GetStringSelection().ToStdString();
325  if (m_TopSeqEntry && !name.empty())
326  {
327  bool create_general_only = objects::edit::IsGeneralIdProtPresent(m_TopSeqEntry);
328  for (CBioseq_CI bi(m_TopSeqEntry, CSeq_inst::eMol_na); bi; ++bi)
329  {
330  int offset = 1;
331  vector<CSeq_feat_Handle> feats, genes;
332  set<CSeq_feat_Handle> unique_feats, unique_genes;
333  bool problem(false);
334  for (CFeat_CI cds(*bi, CSeqFeatData::eSubtype_cdregion); cds; ++cds)
335  {
336  if (cds->GetOriginalFeature().IsSetExcept_text() && NStr::Find(cds->GetOriginalFeature().GetExcept_text(), "RNA editing") != string::npos)
337  {
338  continue;
339  }
340  if (cds->IsSetProduct())
341  {
342  CBioseq_Handle prot_bsh = scope.GetBioseqHandle(cds->GetProduct());
343  if (prot_bsh)
344  {
345  CFeat_CI prot_feat_ci(prot_bsh, CSeqFeatData::e_Prot);
346  if (prot_feat_ci)
347  {
348  FOR_EACH_NAME_ON_PROTREF(name_it, prot_feat_ci->GetSeq_feat()->GetData().GetProt())
349  {
350  if (*name_it == name)
351  {
352  CSeq_feat_Handle fh = cds->GetSeq_feat_Handle();
354  if (!gene)
355  {
356  msg += "Unable to find gene for " + edit::GetTextObjectDescription(*cds->GetSeq_feat(), scope) + "\n";
357  problem = true;
358  break;
359  }
360  if (unique_feats.find(fh) != unique_feats.end() || unique_genes.find(gene) != unique_genes.end())
361  {
362  msg += "CDS/Gene pairing not unique for: " + edit::GetTextObjectDescription(*gene.GetOriginalSeq_feat(), scope) + "\n";
363  problem = true;
364  break;
365  }
366  feats.push_back(fh);
367  genes.push_back(gene);
368  unique_feats.insert(fh);
369  unique_genes.insert(gene);
370  break;
371  }
372  }
373  }
374  }
375  }
376  }
377  if (problem)
378  continue;
379  if (feats.size() != 3 && feats.size() != 5)
380  {
381  stringstream str;
382  str << edit::GetTextObjectDescription(*bi->GetBioseqCore(), scope) << " has " << feats.size() << " CDS, skipping";
383  msg += str.str() + "\n";
384  continue;
385  }
386 
387  if (feats.size() == 3)
388  {
389  vector<CSeq_feat_Handle> feats1, genes1, feats2, genes2;
390  feats1.push_back(feats[0]);
391  feats1.push_back(feats[1]);
392  CombineFeatures(feats1, cmd, scope, offset, CSeq_loc::fMerge_All, false, create_general_only);
393  feats2.push_back(feats[0]);
394  feats2.push_back(feats[2]);
395  CombineFeatures(feats2, cmd, scope, offset, CSeq_loc::fMerge_All, true, create_general_only);
396  genes1.push_back(genes[0]);
397  genes1.push_back(genes[1]);
398  CombineFeatures(genes1, cmd, scope, offset, CSeq_loc::fMerge_All, false, create_general_only);
399  genes2.push_back(genes[0]);
400  genes2.push_back(genes[2]);
401  CombineFeatures(genes2, cmd, scope, offset, CSeq_loc::fMerge_All, true, create_general_only);
402 
403  }
404  else if (feats.size() == 5)
405  {
406  vector<CSeq_feat_Handle> feats1, genes1, feats2, genes2;
407  feats1.push_back(feats[0]);
408  feats1.push_back(feats[1]);
409  feats1.push_back(feats[2]);
410  CombineFeatures(feats1, cmd, scope, offset, CSeq_loc::fMerge_All, false, create_general_only);
411  feats2.push_back(feats[0]);
412  feats2.push_back(feats[3]);
413  feats2.push_back(feats[4]);
414  CombineFeatures(feats2, cmd, scope, offset, CSeq_loc::fMerge_All, true, create_general_only);
415  genes1.push_back(genes[0]);
416  genes1.push_back(genes[1]);
417  genes1.push_back(genes[2]);
418  CombineFeatures(genes1, cmd, scope, offset, CSeq_loc::fMerge_SingleRange, false, create_general_only);
419  genes2.push_back(genes[0]);
420  genes2.push_back(genes[3]);
421  genes2.push_back(genes[4]);
422  CombineFeatures(genes2, cmd, scope, offset, CSeq_loc::fMerge_SingleRange, true, create_general_only);
423  }
424  modified = true;
425  }
426  }
427 
428  if (!modified)
429  cmd.Reset();
430  if (!msg.empty())
431  {
432  CGenericReportDlg* report = new CGenericReportDlg(GetParent());
433  report->SetTitle(wxT("Unable to fix automatically"));
434  report->SetText(wxString(msg));
435  report->Show(true);
436  }
437  return cmd;
438 }
439 
440 void CFixForTransSplicing::CombineFeatures(const vector<CSeq_feat_Handle> &feats, CRef<CCmdComposite> cmd, CScope &scope, int &offset, CSeq_loc::TOpFlags merge_flag,
441  bool second_pass, bool create_general_only)
442 {
443  CSeq_feat_Handle feat1;
444  CRef<CSeq_feat> new_feat(new CSeq_feat);
445  CRef<CSeq_loc> new_loc(new CSeq_loc);
446  CRef<CSeq_loc> add_loc;
447  CRef<CSeq_id> new_product_id(NULL);
448  bool partial_start(false);
449  bool partial_stop(false);
450  for (size_t i = 0; i < feats.size(); i++)
451  {
452  CSeq_feat_Handle fh = feats[i];
453  if (!fh)
454  continue;
455  if (i == 0)
456  {
457  new_loc->Assign(fh.GetLocation());
458  partial_start = new_loc->IsPartialStart(eExtreme_Positional);
459  partial_stop = new_loc->IsPartialStop(eExtreme_Positional);
460  new_loc->SetPartialStart(false,eExtreme_Positional);
461  new_loc->SetPartialStop(false,eExtreme_Positional);
462  }
463  else
464  {
465  CRef<CSeq_loc> tmp_loc(new CSeq_loc);
466  tmp_loc->Assign(fh.GetLocation());
467  partial_stop = tmp_loc->IsPartialStop(eExtreme_Positional);
468  tmp_loc->SetPartialStart(false,eExtreme_Positional);
469  tmp_loc->SetPartialStop(false,eExtreme_Positional);
470  if (!add_loc)
471  add_loc = tmp_loc;
472  else
473  add_loc->Assign(*(sequence::Seq_loc_Add(*add_loc, *tmp_loc, merge_flag, &scope))); // |CSeq_loc::fSort
474  }
475  if (i == 1)
476  {
477  feat1 = fh;
478  new_feat->Assign(*fh.GetOriginalSeq_feat());
479  if (fh.IsSetProduct())
480  {
481  new_product_id.Reset(new CSeq_id());
482  new_product_id->Assign(*(fh.GetProduct().GetId()));
483  }
484  }
485  else if (i != 0 || second_pass)
486  {
487  cmd->AddCommand(*CRef<CCmdDelSeq_feat>(new CCmdDelSeq_feat(fh)));
488  if (fh.IsSetProduct())
489  {
490  CBioseq_Handle product = scope.GetBioseqHandle(fh.GetProduct());
491  if (product)
492  {
493  cmd->AddCommand(*CRef<CCmdDelBioseqInst>(new CCmdDelBioseqInst(product)));
494  }
495  }
496  }
497  }
498  if (!feat1)
499  return;
500  new_loc->Assign(*(sequence::Seq_loc_Add(*new_loc, *add_loc, CSeq_loc::fMerge_All, &scope)));
501  new_loc->SetPartialStart(partial_start,eExtreme_Positional);
502  new_loc->SetPartialStop(partial_stop,eExtreme_Positional);
503  new_feat->SetLocation(*new_loc);
504  new_feat->SetPartial(partial_start || partial_stop);
505  new_feat->SetExcept(true);
506  new_feat->SetExcept_text("trans-splicing");
507  if (!new_feat->IsSetProduct() && new_product_id)
508  {
509  new_feat->SetProduct().SetWhole().Assign(*new_product_id);
510  }
511  cmd->AddCommand(*CRef< CCmdChangeSeq_feat > (new CCmdChangeSeq_feat(feat1,*new_feat)));
512  if (new_feat->IsSetProduct())
513  {
514  CRef<CCmdComposite> retranslate_cmd = GetRetranslateCDSCommand(scope, *new_feat, offset, create_general_only);
515  cmd->AddCommand(*retranslate_cmd);
516  }
517 }
518 
519 void CFixForTransSplicing::OnListItemSelected(wxCommandEvent& event)
520 {
521  long index = event.GetSelection();
522  string name = m_Protein->GetStringSelection().ToStdString();
523 
524  if (name.empty() || !m_FlatFileCtrl || !m_SelectionClient || !m_SelectionClientAttached)
525  return;
526 
528  if (!bsh)
529  return;
530  CSeq_feat_Handle fh = m_name_to_obj[name][bsh][index];
531  if (!fh)
532  return;
534  if (!obj)
535  return;
536 
537  m_FlatFileCtrl->SetPosition(bsh, obj);
538 
539  TConstScopedObjects objs;
540  CScope &scope = m_TopSeqEntry.GetScope();
541  objs.push_back(SConstScopedObject(obj, &scope));
543 }
544 
545 
546 void CFixForTransSplicing::OnListItemActivated(wxCommandEvent& event)
547 {
548  long index = event.GetSelection();
549  string name = m_Protein->GetStringSelection().ToStdString();
550  if (name.empty())
551  return;
553  if (!bsh)
554  return;
555  CSeq_feat_Handle fh = m_name_to_obj[name][bsh][index];
556  if (!fh)
557  return;
559  if (!obj)
560  return;
561 
562  CSeq_entry_Handle seh = m_bioseqs[m_page].GetSeq_entry_Handle();
563 
564  CIRef<IEditObject> editor = CreateEditorForObject(obj, seh, false);
565  CEditObjViewDlgModal edit_dlg(this, false);
566  wxWindow* editorWindow = editor->CreateWindow(&edit_dlg);
567  editorWindow->TransferDataToWindow();
568  edit_dlg.SetEditorWindow(editorWindow);
569  edit_dlg.SetEditor(editor);
570 
571  if (edit_dlg.ShowModal() == wxID_OK)
572  {
573  CIRef<IEditCommand> cmd(editor->GetEditCommand());
574  if (cmd)
575  {
577  ReloadData();
578  }
579  }
580 }
581 
583 {
585  ReloadData();
586 }
587 
589 {
591  m_page = 0;
592  PopulateListBox();
593 }
594 
@ eExtreme_Positional
numerical value
Definition: Na_strand.hpp:63
CIRef< IEditObject > CreateEditorForObject(CConstRef< CObject > obj, objects::CSeq_entry_Handle seh, bool create)
bool IsGeneralIdProtPresent(objects::CSeq_entry_Handle tse)
CBioseq_CI –.
Definition: bioseq_ci.hpp:69
CBioseq_Handle –.
objects::CSeq_entry_Handle m_TopSeqEntry
bool Create(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
IWorkbench * m_Workbench
bool GetTopLevelSeqEntryAndProcessor()
ICommandProccessor * m_CmdProccessor
void SetEditorWindow(wxWindow *editorWindow)
void SetEditor(CIRef< IEditObject > editor)
CFeat_CI –.
Definition: feat_ci.hpp:64
void CombineFeatures(const vector< CSeq_feat_Handle > &feats, CRef< CCmdComposite > cmd, CScope &scope, int &offset, CSeq_loc::TOpFlags merge_flag, bool second_pass, bool create_general_only)
virtual CRef< CCmdComposite > GetCommand()
CIRef< IFlatFileCtrl > m_FlatFileCtrl
void OnPageLeft(wxCommandEvent &event)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CRef< CSelectionClient > m_SelectionClient
void OnListItemSelected(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Fix For Trans-splicing"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnProteinNameSelected(wxCommandEvent &event)
virtual void ExecuteCmd(CRef< CCmdComposite > cmd)
map< string, map< CBioseq_Handle, vector< CSeq_feat_Handle > > > m_name_to_obj
void OnListItemActivated(wxCommandEvent &event)
void Init()
Initialises member variables.
static bool ShowToolTips()
Should we show tooltips?
void OnPageRight(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void CreateControls()
Creates the controls and sizers.
vector< CBioseq_Handle > m_bioseqs
map< string, map< CBioseq_Handle, wxArrayString > > m_name_to_cds
void SetText(const wxString &text)
CProjectService - a service providing API for operations with Workspaces and Projects.
CScope –.
Definition: scope.hpp:92
void SetSelectedObjects(TConstScopedObjects &objs)
CSeq_entry_Handle –.
CSeq_feat_Handle –.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
const_iterator end() const
Definition: map.hpp:152
void clear()
Definition: map.hpp:169
const_iterator find(const key_type &key) const
Definition: map.hpp:153
Definition: set.hpp:45
iterator_bool insert(const value_type &val)
Definition: set.hpp:149
const_iterator find(const key_type &key) const
Definition: set.hpp:137
const_iterator end() const
Definition: set.hpp:136
#define _(proto)
Definition: ct_nlmzip_i.h:78
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
#define false
Definition: bool.h:36
static void Init(void)
Definition: cursor6.c:76
static const char * str(char *buf, int n)
Definition: stats.c:84
int offset
Definition: replacements.h:160
#define NULL
Definition: ncbistd.hpp:225
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
Definition: service.hpp:91
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
Definition: Seq_id.cpp:318
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
Definition: Seq_loc.cpp:3222
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
Definition: Seq_loc.cpp:337
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
Definition: Seq_loc.cpp:3280
int TOpFlags
Definition: Seq_loc.hpp:336
void SetPartialStop(bool val, ESeqLocExtremes ext)
Definition: Seq_loc.cpp:3313
bool IsPartialStop(ESeqLocExtremes ext) const
Definition: Seq_loc.cpp:3251
@ fMerge_SingleRange
Definition: Seq_loc.hpp:332
@ fMerge_All
Definition: Seq_loc.hpp:331
CMappedFeat GetBestGeneForCds(const CMappedFeat &cds_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0, CFeatTree::EBestGeneType lookup_type=CFeatTree::eBestGene_TreeOnly)
Definition: feature.cpp:3321
CRef< CSeq_loc > Seq_loc_Add(const CSeq_loc &loc1, const CSeq_loc &loc2, CSeq_loc::TOpFlags flags, CScope *scope)
Add two seq-locs.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
virtual const CSeq_loc & GetProduct(void) const
bool IsSetProduct(void) const
virtual const CSeq_loc & GetLocation(void) const
CConstRef< CSeq_feat > GetOriginalSeq_feat(void) const
const CSeq_feat_Handle & GetSeq_feat_Handle(void) const
Get original feature handle.
Definition: mapped_feat.hpp:71
CConstRef< CSeq_feat > GetSeq_feat(void) const
Get current seq-feat.
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#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 SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
Definition: ncbistr.cpp:2882
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
Definition: ncbistr.cpp:3305
void SetLocation(TLocation &value)
Assign a value to Location data member.
Definition: Seq_feat_.cpp:131
void SetPartial(TPartial value)
Assign a value to Partial data member.
Definition: Seq_feat_.hpp:971
void SetProduct(TProduct &value)
Assign a value to Product data member.
Definition: Seq_feat_.cpp:110
void SetExcept(TExcept value)
Assign a value to Except data member.
Definition: Seq_feat_.hpp:1018
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_feat_.hpp:925
void SetExcept_text(const TExcept_text &value)
Assign a value to Except_text data member.
Definition: Seq_feat_.hpp:1414
const TProt & GetProt(void) const
Get the variant data.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
Definition: Seq_feat_.hpp:1084
@ eMol_na
just a nucleic acid
Definition: Seq_inst_.hpp:113
END_EVENT_TABLE()
int i
void GetViewObjects(IWorkbench *workbench, TConstScopedObjects &objects)
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
#define FOR_EACH_NAME_ON_PROTREF(Itr, Var)
FOR_EACH_NAME_ON_PROTREF EDIT_EACH_NAME_ON_PROTREF.
static static static wxID_ANY
string GetTextObjectDescription(const CSeq_feat &sf, CScope &scope)
CRef< CCmdComposite > GetRetranslateCDSCommand(objects::CScope &scope, const objects::CSeq_feat &cds, bool create_general_only)
Modified on Sun Jul 21 04:19:09 2024 by modify_doxy.py rev. 669887