wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
87 Create(parent,
id, caption, pos,
size, style);
93SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
99GetSizer()->SetSizeHints(
this);
103SetSize(wxSize(280, 550));
140sel_srv->GetActiveObjects(
objects);
163wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
164itemDialog1->SetSizer(itemBoxSizer2);
167itemBoxSizer2->Add(
m_Protein, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
169wxArrayString choices;
170 m_ListBox=
newwxListBox(itemDialog1,
ID_CDS_LIST, wxDefaultPosition, wxDefaultSize, choices, wxLB_SINGLE);
171itemBoxSizer2->Add(
m_ListBox, 1, wxGROW|wxALL, 5);
173 m_BioseqLabel=
newwxStaticText( itemDialog1, wxID_STATIC,
_(
" "), wxDefaultPosition, wxDefaultSize, 0 );
174itemBoxSizer2->Add(
m_BioseqLabel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
176wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
177itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
180itemBoxSizer3->Add(
m_PageLeft, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
183itemBoxSizer3->Add(
m_PageRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
186itemBoxSizer2->Add(OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
188 m_Protein->SetStringSelection(
_(
"ribosomal protein S12"));
206 if(cds->IsSetProduct())
216 if(!(*name_it).empty())
221 m_name_to_obj[*name_it][bsh].push_back(cds->GetSeq_feat_Handle());
241 stringname =
m_Protein->GetStringSelection().ToStdString();
250 autoitems2 = items->second.find(bsh);
251 if(items2 == items->second.end())
323 boolmodified =
false;
324 stringname =
m_Protein->GetStringSelection().ToStdString();
331vector<CSeq_feat_Handle> feats, genes;
333 boolproblem(
false);
336 if(cds->GetOriginalFeature().IsSetExcept_text() &&
NStr::Find(cds->GetOriginalFeature().GetExcept_text(),
"RNA editing") != string::npos)
340 if(cds->IsSetProduct())
350 if(*name_it == name)
360 if(unique_feats.
find(fh) != unique_feats.
end() || unique_genes.
find(gene) != unique_genes.
end())
367genes.push_back(gene);
368unique_feats.
insert(fh);
369unique_genes.
insert(gene);
379 if(feats.size() != 3 && feats.size() != 5)
383 msg+=
str.str() +
"\n";
387 if(feats.size() == 3)
389vector<CSeq_feat_Handle> feats1, genes1, feats2, genes2;
390feats1.push_back(feats[0]);
391feats1.push_back(feats[1]);
393feats2.push_back(feats[0]);
394feats2.push_back(feats[2]);
396genes1.push_back(genes[0]);
397genes1.push_back(genes[1]);
399genes2.push_back(genes[0]);
400genes2.push_back(genes[2]);
404 else if(feats.size() == 5)
406vector<CSeq_feat_Handle> feats1, genes1, feats2, genes2;
407feats1.push_back(feats[0]);
408feats1.push_back(feats[1]);
409feats1.push_back(feats[2]);
411feats2.push_back(feats[0]);
412feats2.push_back(feats[3]);
413feats2.push_back(feats[4]);
415genes1.push_back(genes[0]);
416genes1.push_back(genes[1]);
417genes1.push_back(genes[2]);
419genes2.push_back(genes[0]);
420genes2.push_back(genes[3]);
421genes2.push_back(genes[4]);
433report->SetTitle(
wxT(
"Unable to fix automatically"));
435report->Show(
true);
441 boolsecond_pass,
boolcreate_general_only)
448 boolpartial_start(
false);
449 boolpartial_stop(
false);
450 for(
size_t i= 0;
i< feats.size();
i++)
485 else if(
i!= 0 || second_pass)
504new_feat->
SetPartial(partial_start || partial_stop);
509new_feat->
SetProduct().SetWhole().Assign(*new_product_id);
515 cmd->AddCommand(*retranslate_cmd);
521 longindex =
event.GetSelection();
522 stringname =
m_Protein->GetStringSelection().ToStdString();
548 longindex =
event.GetSelection();
549 stringname =
m_Protein->GetStringSelection().ToStdString();
566wxWindow* editorWindow = editor->CreateWindow(&edit_dlg);
567editorWindow->TransferDataToWindow();
571 if(edit_dlg.ShowModal() == wxID_OK)
@ eExtreme_Positional
numerical value
CIRef< IEditObject > CreateEditorForObject(CConstRef< CObject > obj, objects::CSeq_entry_Handle seh, bool create)
bool IsGeneralIdProtPresent(objects::CSeq_entry_Handle tse)
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)
bool GetTopLevelSeqEntryAndProcessor()
ICommandProccessor * m_CmdProccessor
void SetEditorWindow(wxWindow *editorWindow)
void SetEditor(CIRef< IEditObject > editor)
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)
void CollectProteinNames()
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CFixForTransSplicing()
Constructors.
~CFixForTransSplicing()
Destructor.
CRef< CSelectionClient > m_SelectionClient
wxStaticText * m_BioseqLabel
bool m_SelectionClientAttached
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.
wxArrayString m_ProteinNames
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.
void SetSelectedObjects(TConstScopedObjects &objs)
namespace ncbi::objects::
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
IWorkbench is the central interface in the application framework.
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
static const char * str(char *buf, int n)
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
vector< SConstScopedObject > TConstScopedObjects
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.
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
void SetPartialStop(bool val, ESeqLocExtremes ext)
bool IsPartialStop(ESeqLocExtremes ext) const
CMappedFeat GetBestGeneForCds(const CMappedFeat &cds_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0, CFeatTree::EBestGeneType lookup_type=CFeatTree::eBestGene_TreeOnly)
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.
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.
CConstRef< CSeq_feat > GetSeq_feat(void) const
Get current seq-feat.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
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.
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.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetPartial(TPartial value)
Assign a value to Partial data member.
void SetProduct(TProduct &value)
Assign a value to Product data member.
void SetExcept(TExcept value)
Assign a value to Except data member.
const TData & GetData(void) const
Get the Data member data.
void SetExcept_text(const TExcept_text &value)
Assign a value to Except_text data member.
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.
@ eMol_na
just a nucleic acid
void GetViewObjects(IWorkbench *workbench, TConstScopedObjects &objects)
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 SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
string GetTextObjectDescription(const CSeq_feat &sf, CScope &scope)
CRef< CCmdComposite > GetRetranslateCDSCommand(objects::CScope &scope, const objects::CSeq_feat &cds, bool create_general_only)
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