wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
85 Create(parent,
id, caption, pos,
size, style);
96SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
97wxDialog::Create( parent,
id, caption, pos,
size, style );
102GetSizer()->SetSizeHints(
this);
104Centre(wxBOTH|wxCENTRE_ON_SCREEN);
107SetSize(wxSize(280, 750));
141wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
142itemDialog1->SetSizer(itemBoxSizer2);
144wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
145itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 5);
147 m_ListCtrl=
newwxListCtrl( itemDialog1,
wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
148itemBoxSizer3->Add(
m_ListCtrl, 1, wxGROW|wxALL, 5);
150 m_ListCtrl->InsertColumn(0,wxEmptyString,wxLIST_FORMAT_LEFT);
154objects::CBioseq_CI b_iter(
m_TopSeqEntry, objects::CSeq_inst::eMol_na);
155 for( ; b_iter ; ++b_iter )
169 m_ListCtrl->SetColumnWidth(0, wxLIST_AUTOSIZE);
171 m_CheckSequence=
newwxCheckBox( itemDialog1,
wxID_ANY,
_(
"Reverse complement sequence"), wxDefaultPosition, wxDefaultSize, 0 );
175 m_CheckFeat=
newwxCheckBox( itemDialog1,
wxID_ANY,
_(
"Reverse features"), wxDefaultPosition, wxDefaultSize, 0 );
177itemBoxSizer2->Add(
m_CheckFeat, 0, wxALIGN_LEFT|wxALL, 5);
182wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
183itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
185wxButton* itemButton1 =
newwxButton( itemDialog1,
ID_SELECT,
_(
"Select"), wxDefaultPosition, wxDefaultSize, 0 );
186itemBoxSizer12->Add(itemButton1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
188wxButton* itemButton2 =
newwxButton( itemDialog1,
ID_SELECTALL,
_(
"Select All"), wxDefaultPosition, wxDefaultSize, 0 );
189itemBoxSizer12->Add(itemButton2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
191wxButton* itemButton3 =
newwxButton( itemDialog1,
ID_UNSELECTALL,
_(
"Unselect All"), wxDefaultPosition, wxDefaultSize, 0 );
192itemBoxSizer12->Add(itemButton3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
194wxBoxSizer* itemBoxSizer15 =
newwxBoxSizer(wxHORIZONTAL);
195itemBoxSizer2->Add(itemBoxSizer15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
197wxButton* itemButton13 =
newwxButton( itemDialog1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
198itemBoxSizer15->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
200wxButton* itemButton14 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
201itemBoxSizer15->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
242 boolmodified =
false;
243 boolfound_alignments =
false;
247item =
m_ListCtrl->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
248 if( item == -1 )
break;
249 int i=
static_cast<int>(
m_ListCtrl->GetItemData(item));
255 if(!modified)
returncmd_null;
257 if(found_alignments)
258wxMessageBox(
_(
"Alingments will be broken after this operation"),
wxT(
"Warning"), wxOK | wxICON_ERROR,
NULL);
266 boolfound_alignments =
false;
269objects::CBioseq_CI b_iter(
m_TopSeqEntry, objects::CSeq_inst::eMol_na);
270 for( ; b_iter ; ++b_iter )
273found_alignments |=
RevCompBioSeq(bsh,
cmd, tse, update_seq, update_feat, update_graph);
277 if(found_alignments)
278wxMessageBox(
_(
"Alingments will be broken after this operation"),
wxT(
"Warning"), wxOK | wxICON_ERROR,
NULL);
285 boolfound_alignments =
false;
290new_inst->Assign(bsh.
GetInst());
293 cmd->AddCommand(*cmd_inst);
299 for(; feat_ci; ++feat_ci)
311 for(; graph_ci; ++graph_ci)
318 switch(
data.Which() )
326 cmd->AddCommand(*chgGraph);
331 for(; align_ci; ++align_ci)
335 for(
int row= 0;
row< num_rows;
row++)
340found_alignments =
true;
344 if(found_alignments)
350 returnfound_alignments;
356 if(!constraint)
return;
361item =
m_ListCtrl->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
362 if( item == -1 )
break;
363 int i=
static_cast<int>(
m_ListCtrl->GetItemData(item));
371 if((!id_str.empty() && constraint->DoesTextMatch(id_str)) ||
372(!accession.empty() && constraint->DoesTextMatch(accession)))
374 m_ListCtrl->SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
385item =
m_ListCtrl->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_DONTCARE);
386 if( item == -1 )
break;
387 m_ListCtrl->SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
396item =
m_ListCtrl->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
397 if( item == -1 )
break;
398 m_ListCtrl->SetItemState(item, 0, wxLIST_STATE_SELECTED);
CRevCompSequencesDlg()
Constructors.
vector< CBioseq_Handle > m_Entries
void apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title, bool update_seq, bool update_feat, bool update_graph)
static bool ShowToolTips()
Should we show tooltips?
void OnSelect(wxCommandEvent &event)
void OnSelectAll(wxCommandEvent &event)
void Init()
Initialises member variables.
CRef< CCmdComposite > GetCommand()
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnUnselectAll(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=11300, const wxString &caption=_("Reverse Complement"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
bool RevCompBioSeq(CBioseq_Handle bsh, CRef< CCmdComposite > cmd, CSeq_entry_Handle tse, bool update_seq, bool update_feat, bool update_graph)
CStringConstraintPanel * m_StringConstraintPanel
wxCheckBox * m_CheckSequence
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
objects::CSeq_entry_Handle m_TopSeqEntry
~CRevCompSequencesDlg()
Destructor.
void CreateControls()
Creates the controls and sizers.
TDim CheckNumRows(void) const
Validatiors.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
namespace ncbi::objects::
CRef< edit::CStringConstraint > GetStringConstraint()
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
void ReverseComplement(const BidirectionalIterator &first, const BidirectionalIterator &last)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
CConstRef< CSeq_id > GetSeqId(void) const
@ eContent
Untagged human-readable accession or the like.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
CScope & GetScope(void) const
Get scope this handle belongs to.
bool IsSynonym(const CSeq_id &id) const
Check if this id can be used to obtain this bioseq handle.
const TInst & GetInst(void) const
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
const CSeq_graph & GetOriginalGraph(void) const
Get original graph with unmapped location/product.
CSeq_graph_Handle GetSeq_graph_Handle(void) const
Get original graph handle.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void SetGraph(TGraph &value)
Assign a value to Graph data member.
void SetLoc(TLoc &value)
Assign a value to Loc data member.
void ReverseComplementFeature(CSeq_feat &feat, CScope &scope)
void ReverseComplementLocation(CSeq_loc &loc, CScope &scope)
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
USING_SCOPE(ncbi::objects)
#define row(bind, expected)
wxString ToWxString(const string &s)
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