wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
369: m_loc(loc), m_scope(&scope), m_start(start), m_readonly_timer(this,
READONLY_TIMER_ID)
373 Create(parent,
id, caption, pos,
size, style);
385 bool CEditSequence::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
389wxFrame::Create( parent,
id, caption, pos,
size, style );
394GetSizer()->SetSizeHints(
this);
397Centre(wxBOTH|wxCENTRE_ON_SCREEN);
452 if(width >= 0 && height >= 0)
453SetSize(wxSize(width,height));
458 if(pos_x >= 0 && pos_y >= 0)
461 for(
auto i= 0;
i< wxDisplay::GetCount();
i++)
463wxDisplay display(
i);
464max_x += display.GetGeometry().GetWidth();
466 if(pos_x + width > max_x) pos_x = wxGetDisplaySize().GetWidth()-width-5;
467 if(pos_y + height > wxGetDisplaySize().GetHeight()) pos_y = wxGetDisplaySize().GetHeight()-height-5;
469SetPosition(wxPoint(pos_x,pos_y));
497wxMenuBar *menubar =
newwxMenuBar();
498wxMenu *menu =
newwxMenu();
499menubar->Append(menu,
wxT(
"&Show"));
501wxMenu *translate_menu =
newwxMenu();
533menu->AppendSubMenu(translate_menu,
_(
"Reading frames"));
535wxMenuItem *revcomp_item =
newwxMenuItem(menu,
ID_SHOW_REVCOMP_EDSEQ_MENU,
_(
"Complement\tAlt+c"),
_(
"Show complement"), wxITEM_CHECK);
536menu->Append(revcomp_item);
538wxMenuItem *features_item =
newwxMenuItem(menu,
ID_SHOW_FEATURES_EDSEQ_MENU,
_(
"Features\tAlt+f"),
_(
"Show features"), wxITEM_CHECK);
539menu->Append(features_item);
541wxMenuItem * onthefly_item =
newwxMenuItem(menu,
ID_SHOW_ONTHEFLY_EDSEQ_MENU,
_(
"On-the-fly\tAlt+t"),
_(
"Show on-the-fly translation"), wxITEM_CHECK);
542menu->Append(onthefly_item);
544wxMenuItem * mismatch_item =
newwxMenuItem(menu,
ID_SHOW_MISMATCH_EDSEQ_MENU,
_(
"Mismatch\tAlt+m"),
_(
"Show mismatch"), wxITEM_CHECK);
545menu->Append(mismatch_item);
548wxMenu *menu2 =
newwxMenu();
549menubar->Append(menu2,
wxT(
"&Edit"));
551wxMenuItem *cut_item =
newwxMenuItem(menu2,
ID_EDIT_CUT_EDSEQ_MENU,
_(
"Cut\tCtrl+X"),
_(
"Cut to clipboard"), wxITEM_NORMAL);
552menu2->Append(cut_item);
554wxMenuItem *copy_item =
newwxMenuItem(menu2,
ID_EDIT_COPY_EDSEQ_MENU,
_(
"Copy\tCtrl+C"),
_(
"Copy to clipboard"), wxITEM_NORMAL);
555menu2->Append(copy_item);
557wxMenuItem *paste_item =
newwxMenuItem(menu2,
ID_EDIT_PASTE_EDSEQ_MENU,
_(
"Paste\tCtrl+V"),
_(
"Paste from clipboard"), wxITEM_NORMAL);
558menu2->Append(paste_item);
560wxMenuItem *find_item =
newwxMenuItem(menu2,
ID_EDIT_FIND_EDSEQ_MENU,
_(
"Find\tCtrl+F"),
_(
"Find pattern"), wxITEM_NORMAL);
561menu2->Append(find_item);
565menubar->Append(menu3,
wxT(
"Annotate"));
567menubar->Append(menu3,
wxT(
"Features"));
571wxPanel *Dialog1 =
newwxPanel(
this,
wxID_ANY);
573wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
574Dialog1->SetSizer(itemBoxSizer2);
576wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
577itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_LEFT|wxALL, 5);
579wxButton* itemButton6 =
newwxButton( Dialog1,
ID_GOTO_EDSEQ_BUTTON,
wxT(
"Go to:"), wxDefaultPosition, wxDefaultSize, 0 );
580itemBoxSizer3->Add(itemButton6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
583itemBoxSizer3->Add(
m_GoTo_TextCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
585wxStaticText* itemStaticText8 =
newwxStaticText( Dialog1, wxID_STATIC,
wxT(
"Position:"), wxDefaultPosition, wxDefaultSize, 0 );
586itemBoxSizer3->Add(itemStaticText8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
588 m_Pos=
newwxStaticText( Dialog1, wxID_STATIC,
wxT(
""), wxDefaultPosition, wxSize(Dialog1->ConvertDialogToPixels(wxSize(40, -1)).x, -1), wxNO_BORDER );
589itemBoxSizer3->Add(
m_Pos, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
592wxButton* itemButton7 =
newwxButton( Dialog1,
ID_RANGE_EDSEQ_BUTTON,
wxT(
"Select:"), wxDefaultPosition, wxDefaultSize, 0 );
593itemBoxSizer3->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
595 m_RangeFrom=
newwxTextCtrl( Dialog1,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
596itemBoxSizer3->Add(
m_RangeFrom, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
597 m_RangeFrom->SetValidator( wxTextValidator( wxFILTER_NUMERIC ) );
599wxStaticText* rangeDash =
newwxStaticText( Dialog1, wxID_STATIC,
wxT(
"-"), wxDefaultPosition, wxDefaultSize, 0 );
600itemBoxSizer3->Add(rangeDash, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
602 m_RangeTo=
newwxTextCtrl( Dialog1,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
603itemBoxSizer3->Add(
m_RangeTo, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
604 m_RangeTo->SetValidator( wxTextValidator( wxFILTER_NUMERIC ) );
611vector<bool> read_only;
620seq_len.push_back(
len);
622read_only.push_back(
false);
624read_only.push_back(
true);
633seq_len.push_back(
static_cast<int>(seq.size()));
634read_only.push_back(
true);
637 stringallowed_char_set =
"ATUCGRYSWKMBDHVN";
639allowed_char_set =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ*";
641wxBoxSizer *BoxSizer =
newwxBoxSizer(wxHORIZONTAL);
642itemBoxSizer2->Add(BoxSizer, 1, wxGROW|wxALL, 5);
643 m_Panel=
new CPaintSequence(Dialog1, seq, seq_len,
m_FeatRanges,
m_FeatTypes,
m_FeatStrand,
m_FeatFrames,
m_GeneticCode,
m_Feat5Partial, allowed_char_set,
m_RealProt, read_only,
m_ProtFeatRanges,
m_start);
644BoxSizer->Add(
m_Panel, 1, wxGROW|wxALL, 5);
645features_item->Check();
649mismatch_item->Check();
654 m_commit_warning=
newwxStaticText( Dialog1, wxID_STATIC,
wxT(
"You need to commit the changes to the sequence before annotating or retranslating"), wxDefaultPosition, wxDefaultSize, 0 );
656itemBoxSizer2->Add(
m_commit_warning, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
659 m_readonly_warning=
newwxStaticText( Dialog1, wxID_STATIC,
wxT(
"You need to convert to raw sequence before editing within the gap"), wxDefaultPosition, wxDefaultSize, 0 );
661itemBoxSizer2->Add(
m_readonly_warning, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
664wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
665itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
668itemBoxSizer12->Add(
m_CommitButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
674wxButton* itemButton13 =
newwxButton( Dialog1,
ID_CLOSE_EDSEQ_BUTTON,
_(
"Close"), wxDefaultPosition, wxDefaultSize, 0 );
675itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
677wxButton* itemButton14 =
newwxButton( Dialog1,
ID_CANCEL_EDSEQ_BUTTON,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
678itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
680wxHyperlinkCtrl* itemHyperlinkCtrl =
newwxHyperlinkCtrl( Dialog1, wxID_HELP,
_(
"Help"),
wxT(
"https://www.ncbi.nlm.nih.gov/tools/gbench/manual9/#edit-sequence"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
681itemHyperlinkCtrl->SetForegroundColour(wxColour(192, 192, 192));
682itemBoxSizer12->Add(itemHyperlinkCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
692 const CSeq_id&
id= *(it->GetSeqId());
693 if(
id.IsGenbank() &&
id.GetGenbank().IsSetAccession())
694accession =
id.GetGenbank().GetAccession();
695 if(
id.IsLocal() &&
id.GetLocal().IsStr())
696 local=
id.GetLocal().GetStr();
698 if(!accession.empty())
700 if(!
local.empty())
794 boolmodified =
false;
797 boolremoved =
false;
805 stringseq_out = seq.substr(start,seq_len[
i]);
806 if(seq_in != seq_out)
808 if(!seq_out.empty())
817seqmap_i = seqmap_i.
Remove();
827start += seq_len[
i];
830vector<int>::iterator seq_len_i = seq_len.begin();
831vector<bool>::iterator read_only_i = read_only.begin();
832 while(seq_len_i != seq_len.end() && read_only_i != read_only.end())
836seq_len_i = seq_len.erase(seq_len_i);
837read_only_i = read_only.erase(read_only_i);
859 intanswer = wxMessageBox (
ToWxString(
"Uncommitted changes, proceed with closing?"),
ToWxString(
"Warning"), wxYES_NO | wxICON_QUESTION);
891 if(pos1 > 0 && pos2 > 0)
908 if(
val.ToLong(&pos))
913 else if(!
val.IsEmpty())
926 if(val1.ToLong(&pos1) && val2.ToLong(&pos2) && pos1 > 0 && pos2 > 0 && pos2 > pos1 && pos1 <= seq_len && pos2 <= seq_len)
928 m_Panel->
SetRange(
static_cast<int>(pos1),
static_cast<int>(pos2));
941 if(event.IsChecked())
959 if(event.IsChecked())
977 if(event.IsChecked())
995 if(event.IsChecked())
1022 if(event.IsChecked())
1040 if(event.IsChecked())
1058 if(event.IsChecked())
1076 if(event.IsChecked())
1103 if(event.IsChecked())
1150 if(event.IsChecked())
1178 if(event.IsChecked())
1193 if(event.IsChecked())
1220 const CSeq_id* seq_id = loc.GetId();
1226vector<pair<TSeqPos,TSeqPos> > vec;
1227 constCSeq_loc& feat_loc = feat_it->
GetLocation();
1236vec.push_back(pair<TSeqPos, TSeqPos>(feat_start, feat_stop));
1258 if(strand == objects::CBioseq_Handle::eStrand_Minus && !prot_seq.empty())
1260reverse(prot_seq.begin(), prot_seq.end());
1262 if(
label.empty())
1266 m_FeatTypes.push_back(pair<string,CSeqFeatData::ESubtype>(
label,subtype));
1303 for(
CFeat_CIfeat_ci(prot_bsh); feat_ci; ++feat_ci)
1311vector<pair<TSeqPos,TSeqPos> > vec;
1320vec.push_back(pair<TSeqPos, TSeqPos>(feat_start, feat_stop));
1333 CFeat_CIfeat_it(scope, *loc, sel);
1342 constCSeq_loc& feat_loc = feat_it->
GetLocation();
1344new_loc->
Assign(feat_loc);
1371 if(feat_start != new_start)
1375 if(feat_stop != new_stop)
1377loc_it.
SetTo(new_stop);
1427 for(
CFeat_CIfeat_ci(prot_bsh); feat_ci; ++feat_ci)
1460 if(feat_start != new_start)
1464 if(feat_stop != new_stop)
1466loc_it.
SetTo(new_stop);
1491new_feat->
Assign(feat_ci->GetOriginalFeature());
1517 if(event.IsChecked())
1531 if(event.IsChecked())
1595 if(sel.first >=0 && sel.second >= 0 && sel.second >= sel.first)
1598interval->
SetInt().SetFrom(sel.first);
1599interval->
SetInt().SetTo(sel.second);
1603interval->
SetInt().SetId(*
id);
1610wxWindow* editorWindow = editor->CreateWindow(&edit_dlg);
1613 if(edit_dlg.ShowModal() == wxID_OK)
1634 if(sel.first >=0 && sel.second >= 0 && sel.second >= sel.first)
1637interval->
SetInt().SetFrom(sel.first);
1638interval->
SetInt().SetTo(sel.second);
1642interval->
SetInt().SetId(*
id);
1647 stringregulatory_class;
1648 switch(evt.GetId())
1657 if(!regulatory_class.empty())
1660q->
SetQual(
"regulatory_class");
1661q->
SetVal(regulatory_class);
1662feat->
SetQual().push_back(q);
1668wxWindow* editorWindow = editor->CreateWindow(&edit_dlg);
1671 if(edit_dlg.ShowModal() == wxID_OK)
1692 boolcreate_general_only =
false;
1695 if(!vec_tse.empty())
1697 for(
CFeat_CIfeat_it(scope, *loc, sel); feat_it; ++feat_it)
1751: m_Panel(panel), m_is_nucleotide(is_nucleotide)
1754 Create(parent,
id, caption, pos,
size, style);
1765SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
1766wxDialog::Create( parent,
id, caption, pos,
size, style );
1771GetSizer()->SetSizeHints(
this);
1822wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
1823itemDialog1->SetSizer(itemBoxSizer2);
1825wxStaticText* itemStaticText3 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Find pattern"), wxDefaultPosition, wxDefaultSize, 0 );
1826itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1828wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
1829itemBoxSizer2->Add(itemBoxSizer4, 0, wxGROW|wxALL, 5);
1832itemBoxSizer4->Add(
m_Pattern, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1834 m_ItemOfText=
newwxStaticText( itemDialog1, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
1835itemBoxSizer2->Add(
m_ItemOfText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1837wxStaticBox* itemStaticBoxSizer7Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"Search in"));
1838wxStaticBoxSizer* itemStaticBoxSizer7 =
newwxStaticBoxSizer(itemStaticBoxSizer7Static, wxVERTICAL);
1839itemBoxSizer2->Add(itemStaticBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1841wxBoxSizer* itemBoxSizer8 =
newwxBoxSizer(wxHORIZONTAL);
1842itemStaticBoxSizer7->Add(itemBoxSizer8, 0, wxALIGN_LEFT|wxALL, 5);
1844 m_Nuc=
newwxRadioButton( itemStaticBoxSizer7->GetStaticBox(),
ID_NUC_FIND_EDIT_SEQ,
_(
"Nucleotide sequence"), wxDefaultPosition, wxDefaultSize, 0 );
1845 m_Nuc->SetValue(
true);
1846itemBoxSizer8->Add(
m_Nuc, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1850itemBoxSizer8->Add(
m_RevComp, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1852wxBoxSizer* itemBoxSizer11 =
newwxBoxSizer(wxHORIZONTAL);
1853itemStaticBoxSizer7->Add(itemBoxSizer11, 0, wxALIGN_LEFT|wxALL, 5);
1857itemBoxSizer11->Add(
m_TransFrame, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1859wxArrayString m_FrameChoiceStrings;
1860m_FrameChoiceStrings.Add(
_(
"Any"));
1861m_FrameChoiceStrings.Add(
_(
"+1"));
1862m_FrameChoiceStrings.Add(
_(
"+2"));
1863m_FrameChoiceStrings.Add(
_(
"+3"));
1864m_FrameChoiceStrings.Add(
_(
"-1"));
1865m_FrameChoiceStrings.Add(
_(
"-2"));
1866m_FrameChoiceStrings.Add(
_(
"-3"));
1870itemBoxSizer11->Add(
m_FrameChoice, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1872wxBoxSizer* itemBoxSizer14 =
newwxBoxSizer(wxHORIZONTAL);
1873itemBoxSizer2->Add(itemBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1876itemBoxSizer14->Add(
m_Prev, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1880itemBoxSizer14->Add(
m_Next, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1883wxButton* itemButton17 =
newwxButton( itemDialog1,
ID_DISMISS_FIND_EDIT_SEQ,
_(
"Dismiss"), wxDefaultPosition, wxDefaultSize, 0 );
1884itemBoxSizer14->Add(itemButton17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1889itemStaticBoxSizer7Static->Hide();
1912 returnwxNullBitmap;
1951 if(sel != wxNOT_FOUND)
1955 if(!
m_Nuc->GetValue() && choice ==
"Any")
2014 for(
size_t i=0;
i<
str.length();
i++)
2031 if(
m_Nuc->GetValue())
2064 while(pos !=
NPOS&& pos <str->
size())
2069 autopos_actual = pos;
2070 if(!
m_Nuc->GetValue())
2072 if(choice ==
"-1"|| choice ==
"-2"|| choice ==
"-3")
2073pos_actual =
str->size() - pos_actual - 1 - (
value.size() - 1);
2077 if(choice ==
"+2")
2079 if(choice ==
"+3")
2081 if(choice ==
"-1")
2083 if(choice ==
"-2")
2085 if(choice ==
"-3")
2102 if(!
m_Nuc->GetValue())
2109 for(
size_tj = 0; j < length; j++)
2110highlights.
insert(
static_cast<int>((*it)+j));
User-defined methods of the data storage class.
@ eExtreme_Positional
numerical value
User-defined methods of the data storage class.
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
@ eCmdCreateRegulatory_ribosome_binding_site
@ eCmdCreateMobileElement
@ eCmdCreateMiscStructure
@ eCmdCreateBiosourceFeat
@ eCmdCreatePrimTranscript
@ eCmdCreateRegulatory_promoter
@ eCmdCreateRegulatory_riboswitch
@ eCmdCreateCodingRegion_ext
@ eCmdCreateCommentDescriptor
@ eCmdCreatePubFeatureLabeled
@ eCmdCreateRegulatory_enhancer
@ eCmdCreateTransitPeptide
@ eCmdCreateSecondaryStructure
@ eCmdCreateRegulatory_terminator
@ eCmdCreateMiscDifference
bool IsGeneralIdProtPresent(objects::CSeq_entry_Handle tse)
static CRef< objects::CSeq_feat > MakeDefaultFeature(objects::CSeqFeatData::ESubtype subtype)
static objects::CSeqFeatData::ESubtype GetFeatTypeFromCmdID(int cmd_id)
void GetLabel(string *label, ELabelType type, bool worst=false) const
void AddCommand(IEditCommand &command)
void SetEditorWindow(wxWindow *editorWindow)
void SetEditor(CIRef< IEditObject > editor)
wxMenuItem * m_translate_item2
void IsSelectionAndClean(wxUpdateUIEvent &event)
void OnTranslate(wxCommandEvent &event)
void OnRevTranslate2(wxCommandEvent &event)
wxMenuItem * m_translate_item_none
void OnTranslateAll(wxCommandEvent &event)
static bool ShowToolTips()
Should we show tooltips?
void OnTranslate1(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnMismatch(wxCommandEvent &event)
void ReportRange(int pos1, int pos2)
wxStaticText * m_readonly_warning
wxMenuItem * m_translate_item_everything
wxMenuItem * m_translate_item1
void IsNucleotide(wxUpdateUIEvent &event)
void CreateControls()
Creates the controls and sizers.
wxTextCtrl * m_GoTo_TextCtrl
void OnRevTranslateAll(wxCommandEvent &event)
void OnPaste(wxCommandEvent &event)
void OnTranslate2(wxCommandEvent &event)
void OnTranslateEverything(wxCommandEvent &event)
void IsClipboard(wxUpdateUIEvent &event)
wxMenuItem * m_translate_item_all
vector< vector< pair< TSeqPos, TSeqPos > > > m_FeatRanges
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
vector< pair< string, CSeqFeatData::ESubtype > > m_FeatTypes
void OnReadOnlyTimer(wxTimerEvent &event)
virtual ~CEditSequence()
Destructor.
wxMenuItem * m_revtranslate_item2
virtual void SaveSettings() const
CEditSequence()
Constructors.
void OnTranslateNone(wxCommandEvent &event)
virtual void SetRegistryPath(const string ®_path)
void OnFeatures(wxCommandEvent &event)
vector< CBioseq_Handle::EVectorStrand > m_FeatStrand
void AdjustProtFeatureLocations(CRef< CCmdComposite > composite, const CSeq_feat &old_cds, const CSeq_feat &cds, int i, const CSeq_id *seq_id, TSeqPos seq_start)
void CreateRegulatory(wxCommandEvent &event)
void Init()
Initialises member variables.
wxMenuItem * m_translate_item
vector< bool > m_Feat5Partial
void GetProteinFeatures(CBioseq_Handle prot_bsh, int i, const CSeq_id *seq_id, const CSeq_feat &old_cds, TSeqPos seq_start)
void GetFeatures(const CSeq_loc &loc, CScope &scope)
wxMenuItem * m_revtranslate_item
void OnGoTo(wxCommandEvent &event)
CSeq_entry_Handle m_edited_seh
void CreateFeature(wxCommandEvent &event)
vector< int > m_FeatFrames
wxButton * m_CommitButton
void OnRevTranslate1(wxCommandEvent &event)
wxButton * m_RetranslateButton
void OnRevTranslate(wxCommandEvent &event)
void OnRetranslate(wxCommandEvent &event)
virtual void LoadSettings()
vector< CRef< CGenetic_code > > m_GeneticCode
bool x_ExecuteCommand(IEditCommand *command)
IUndoManager * m_UndoManager
void OnCopy(wxCommandEvent &event)
void OnComplement(wxCommandEvent &event)
vector< string > m_RealProt
void ShowReadOnlyWarning()
unordered_map< int, vector< vector< pair< TSeqPos, TSeqPos > > > > m_ProtFeatRanges
void OnFind(wxCommandEvent &event)
void AdjustFeatureLocations(CRef< CCmdComposite > composite)
void OnCut(wxCommandEvent &event)
void EnableCommit(bool enable)
wxMenuItem * m_revtranslate_item_all
wxStaticText * m_commit_warning
void OnRange(wxCommandEvent &event)
void OnOnTheFly(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Edit Sequence"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(704, 504), long style=wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void IsSelection(wxUpdateUIEvent &event)
void OnClose(wxCommandEvent &event)
void OnAccept(wxCommandEvent &event)
void OnCancel(wxCommandEvent &event)
wxMenuItem * m_revtranslate_item1
void OnChange(wxCommandEvent &event)
void CreateControls()
Creates the controls and sizers.
static bool ShowToolTips()
Should we show tooltips?
set< int >::iterator m_CurrentPos
void OnPrev(wxCommandEvent &event)
void FindMatchPositions(const string &choice)
void OnDismiss(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CFindEditSequence()
Constructors.
wxRadioButton * m_TransFrame
void OnClose(wxCloseEvent &event)
~CFindEditSequence()
Destructor.
void Init()
Initialises member variables.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnNext(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=29000, const wxString &caption=_("find"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
wxStaticText * m_ItemOfText
@Gb_qual.hpp User-defined methods of the data storage class.
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
set< int > & SetHighlights()
void EnableRevTranslation1(bool enable)
void EnableOnTheFly(bool enable)
void OnCut(wxCommandEvent &event)
vector< int > & GetSeqLen()
string * GetFindString(bool is_nuc, bool is_revcomp, const string &choice)
pair< int, int > GetSelection()
TSeqPos GetProtFeatureStart(int i, int k, int j)
void EnableMismatch(bool enable)
vector< bool > & GetReadOnly()
void EnableComplement(bool enable)
void UpdateFeatures(const vector< vector< pair< TSeqPos, TSeqPos > > > &feat_ranges, const vector< pair< string, objects::CSeqFeatData::ESubtype > > &feat_types, const vector< objects::CBioseq_Handle::EVectorStrand > &feat_strand, const vector< int > &feat_frames, const vector< CRef< objects::CGenetic_code > > &genetic_code, const vector< bool > &feat_partial5, const vector< string > &real_prot, const unordered_map< int, vector< vector< pair< TSeqPos, TSeqPos > > > > &prot_feat_ranges)
void OnPaste(wxCommandEvent &event)
void EnableTranslation1(bool enable)
void SetRange(int pos1, int pos2)
void OnCopy(wxCommandEvent &event)
void EnableRevTranslation(bool enable)
void EnableTranslation2(bool enable)
void EnableTranslation(bool enable)
void Search(const string &val)
void EnableRevTranslation2(bool enable)
void SetClean(bool clean)
TSeqPos GetFeatureStop(int i, int j)
TSeqPos GetProtFeatureStop(int i, int k, int j)
void EnableFeatures(bool enable)
TSeqPos GetFeatureStart(int i, int j)
void GetLabel(string *label) const
class CRegistryReadView provides a nested hierarchical view at a particular key.
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
void Set(const string &key, int val)
access a named key at this level, with no recursion
static EFeatureLocationAllowed AllowedFeatureLocation(ESubtype subtype)
@ eFeatureLocationAllowed_NucOnly
@ eFeatureLocationAllowed_ProtOnly
ESubtype GetSubtype(void) const
Non-const iterator over CSeqMap (allows to edit the sequence).
namespace ncbi::objects::
Seq-loc iterator class â iterates all intervals from a seq-loc in the correct order.
static CUICommandRegistry & GetInstance()
the main instance associated with the application
wxMenu * CreateMenu(const SwxMenuItemRec *items)
create a menu from a static definition (see WX_*_MENU macros)
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
Interface (functor) for object editing.
virtual bool RequestExclusiveEdit(wxWindow *window, const string &descr)=0
virtual bool ReleaseExclusiveEdit(wxWindow *window)=0
virtual void Undo(wxWindow *window=0)=0
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator end() const
static const char * kFramePosX
static const char * kFrameHeight
const char * kExclusiveEditDescr
static const char * kFramePosY
static const char * kFrameWidth
#define ID_ACCEPT_EDSEQ_BUTTON
#define ID_TRANSFRAME_FIND_EDIT_SEQ
#define READONLY_TIMER_ID
#define ID_SHOW_ONTHEFLY_EDSEQ_MENU
#define ID_EDIT_CUT_EDSEQ_MENU
#define ID_EDIT_PASTE_EDSEQ_MENU
#define ID_SHOW_TRANSLATE_NONE_EDSEQ_MENU
#define ID_DISMISS_FIND_EDIT_SEQ
#define ID_SHOW_TRANSLATE_EVERYTHING_EDSEQ_MENU
#define ID_TEXTCTRL_FIND_EDIT_SEQ
#define ID_CLOSE_EDSEQ_BUTTON
#define ID_SHOW_TRANSLATE2_EDSEQ_MENU
#define ID_SHOW_REVTRANSLATE_EDSEQ_MENU
#define ID_SHOW_REVTRANSLATE2_EDSEQ_MENU
#define ID_SHOW_REVCOMP_EDSEQ_MENU
#define ID_SHOW_REVTRANSLATE1_EDSEQ_MENU
#define ID_GOTO_EDSEQ_BUTTON
#define ID_NUC_FIND_EDIT_SEQ
#define ID_SHOW_FEATURES_EDSEQ_MENU
#define ID_SHOW_MISMATCH_EDSEQ_MENU
#define ID_RANGE_EDSEQ_BUTTON
#define ID_RETRANSLATE_EDSEQ_BUTTON
#define ID_PREV_FIND_EDIT_SEQ
#define ID_SHOW_REVTRANSLATE_ALL_EDSEQ_MENU
#define ID_EDIT_COPY_EDSEQ_MENU
#define ID_NEXT_FIND_EDIT_SEQ
#define ID_REVCOMP_FIND_EDIT_SEQ
#define ID_EDIT_FIND_EDSEQ_MENU
#define ID_SHOW_TRANSLATE1_EDSEQ_MENU
#define ID_CANCEL_EDSEQ_BUTTON
#define ID_SHOW_TRANSLATE_EDSEQ_MENU
#define ID_FRAMECHOICE_FIND_EDIT_SEQ
#define ID_SHOW_TRANSLATE_ALL_EDSEQ_MENU
static const char * str(char *buf, int n)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
string GetLabel(const CSeq_id &id)
CRef< CSeq_loc > MakeSeq_loc(EMakeType make_type=eMake_CompactType) const
return constructed CSeq_loc with all changes
void SetFrom(TSeqPos from)
Set the range from position.
void SetTo(TSeqPos to)
Set the range to position.
void Delete(void)
Delete current element, and make iterator to point to the next element.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
bool HasChanges(void) const
return true of any part was changed since initialization
bool IsEmpty(void) const
True if the current location is empty.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
size_t GetSize(void) const
Get number of ranges.
TRange GetRange(void) const
Get the range.
const CSeq_id & GetSeq_id(void) const
Get seq_id of the current location.
@ fFGL_Content
Include its content if there is any.
bool IsSameBioseq(const CSeq_id &id1, const CSeq_id &id2, CScope *scope, CScope::EGetBioseqFlag get_flag=CScope::eGetBioseq_All)
Determines if two CSeq_ids represent the same CBioseq.
static CCdregion::EFrame FindBestFrame(const CSeq_feat &cds, CScope &scope)
Find "best" frame for a coding region.
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void GetAllTSEs(TTSE_Handles &tses, enum ETSEKind kind=eManualTSEs)
CSeq_loc_Mapper_Base & SetMergeAbutting(void)
Merge only abutting intervals, keep overlapping.
vector< CSeq_entry_Handle > TTSE_Handles
@ eProductToLocation
Map from the feature's product to location.
@ eLocationToProduct
Map from the feature's location to product.
bool IsNucleotide(void) const
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
const CSeqFeatData & GetData(void) const
TSeqPos GetBioseqLength(void) const
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
bool IsSetProduct(void) const
virtual const CSeq_loc & GetLocation(void) const
bool IsProtein(void) const
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.
CScope & GetScope(void) const
Get scope this handle belongs to.
CScope & GetScope(void) const
Get scope this handle belongs to.
CSeqFeatData::ESubtype GetFeatSubtype(void) const
CRef< CSeq_loc > GetRangeSeq_loc(TSeqPos start, TSeqPos stop, ENa_strand strand=eNa_strand_unknown) const
Return CSeq_loc referencing the given range and strand on the bioseq If start == 0,...
bool IsPlainFeat(void) const
Check if this is plain feature.
const TId & GetId(void) const
CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const
Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.
@ eStrand_Plus
Plus strand.
@ eStrand_Minus
Minus strand.
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
CSeqMap_I & Remove(void)
Remove current segment.
void GetSequence(string &buffer, CSeqUtil::ECoding buffer_coding) const
Get current sequence as a string with the selected encoding.
const CSeq_loc & GetLocation(void) const
SSeqMapSelector & SetFlags(TFlags flags)
Select segment type(s)
void SetSequence(const string &buffer, CSeqUtil::ECoding buffer_coding, CSeq_data::E_Choice seq_data_coding)
Set sequence data.
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
const CSeq_feat_Handle & GetSeq_feat_Handle(void) const
Get original feature handle.
const CSeq_loc & GetProduct(void) const
CSeqMap::ESegmentType GetType(void) const
TSeqPos GetLength(void) const
return length of current segment
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
@ eSeqData
real sequence data
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static const char label[]
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
void SetQual(const TQual &value)
Assign a value to Qual data member.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
bool IsSetCode(void) const
genetic code used Check if a value has been assigned to Code data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
TFrame GetFrame(void) const
Get the Frame member data.
const TData & GetData(void) const
Get the Data member data.
const TCode & GetCode(void) const
Get the Code member data.
void SetData(TData &value)
Assign a value to Data data member.
const TCdregion & GetCdregion(void) const
Get the variant data.
const TProduct & GetProduct(void) const
Get the Product member data.
void SetVal(const TVal &value)
Assign a value to Val data member.
const TProt & GetProt(void) const
Get the variant data.
TQual & SetQual(void)
Assign a value to Qual data member.
bool IsSetFrame(void) const
Check if a value has been assigned to Frame data member.
@ eFrame_three
reading frame
bool IsNull(void) const
Check if variant Null is selected.
const TSeq & GetSeq(void) const
Get the variant data.
const TInst & GetInst(void) const
Get the Inst member data.
@ e_Iupacna
IUPAC 1 letter nuc acid code.
@ e_Iupacaa
IUPAC 1 letter amino acid code.
CMinPanelContainer::OnRestoreWindow EVT_UPDATE_UI_RANGE(eCmdCloseDockPanel, eCmdWindowRestore, CMinPanelContainer::OnUpdateWindowCommand) CMinPanelContainer
void ReportUsage(const wxString &dialog_name)
Report opening & accepting events in the editing package.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
Selector used in CSeqMap methods returning iterators.
#define WX_MENU_ITEM_EXT(cmd)
#define WX_DEFINE_MENU(name)
New macros for defining menus for use with CUICommandRegistry.
#define WX_SUBMENU_EXT(label)
#define WX_SUBMENU_INT(label)
#define WX_MENU_ITEM_INT(cmd)
static void SetTitle(CRef< CSeq_entry > entry, string title)
CRef< CCmdComposite > GetRetranslateCDSCommand(objects::CScope &scope, const objects::CSeq_feat &cds, bool create_general_only)
wxString ToWxString(const string &s)
wxRect GetScreenRect(const wxWindow &win)
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