A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/update__seq__dlg_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/packages/pkg_sequence_edit/update_seq_dlg.cpp Source File

44 #include <wx/button.h> 45 #include <wx/msgdlg.h> 80

wxWindowID

id

,

const

wxString& caption,

81  const

wxPoint& pos,

const

wxSize&

size

,

long

style )

82

: m_UpdSeqInput(&updseq_in)

86  "Sequence can not be updated: check sequences"

);

90  string msg

(

"Sequence is identical to update sequence"

);

91

wxMessageBox(

ToWxString

(

msg

),

wxT

(

"Info"

), wxOK | wxICON_INFORMATION);

95  Create

(parent,

id

, caption, pos,

size

, style);

104 bool CUpdateSeq_Dlg::Create

( wxWindow* parent, wxWindowID

id

,

const

wxString& caption,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

107 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS | wxWS_EX_VALIDATE_RECURSIVELY);

108

CDialog::Create( parent,

id

, caption, pos,

size

, style );

112

GetSizer()->SetSizeHints(

this

);

151

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

152

itemDialog1->SetSizer(itemBoxSizer2);

158

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

159

itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW | wxALL, 2);

161

wxHyperlinkCtrl* itemHyperlinkCtrl =

new

wxHyperlinkCtrl(itemDialog1, wxID_HELP,

_

(

"Help"

),

162  wxT

(

"https://www.ncbi.nlm.nih.gov/tools/gbench/manual9/#update-sequence"

), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);

163

itemHyperlinkCtrl->SetForegroundColour(wxColour(192, 192, 192));

164

itemBoxSizer3->Add(itemHyperlinkCtrl, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 5);

166

itemBoxSizer3->AddStretchSpacer();

168

wxButton* itemButton1 =

new

wxButton( itemDialog1, wxID_OK,

_

(

"Update Sequence"

), wxDefaultPosition, wxDefaultSize, 0 );

169

itemBoxSizer3->Add(itemButton1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

170

itemButton1->Disable();

172

wxButton* itemButton2 =

new

wxButton( itemDialog1, wxID_CANCEL,

_

(

"Cancel"

), wxDefaultPosition, wxDefaultSize, 0 );

173

itemBoxSizer3->Add(itemButton2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

203  bool

accept_atleast_one = (

subject

.GetBioseqLength() <

query

.GetBioseqLength());

210  if

(align_vector.size() > 1) {

211  LOG_POST

(

Info

<<

"More than one alignment was found"

);

214  if

(align_vector.empty())

215  LOG_POST

(

Info

<<

"Could not form alignment between old and update sequence"

);

218  size_t

best_align = 0;

219  for

(

size_t i

= 0;

i

< align_vector.size(); ++

i

) {

220  for

(

size_t

j =

i

+ 1; j < align_vector.size(); ++j) {

224  _ASSERT

(best_align < align_vector.size());

225  result

= align_vector[best_align];

234  "Generate alignment for sequence update"

);

240  string

errMsg =

"Failed: "

;

245

FindWindow(wxID_OK)->Enable();

251  catch

(

const

exception& e) {

252

errMsg += e.

what

();

257  if

(!errMsg.empty()) {

270  string msg

=

"The protein sequence associated with this nucleotide sequence has protein features." 271  "The protein sequence and features will be updated when the nucleotide sequence is updated."

;

virtual void EndModal(int retCode)

virtual void SetRegistryPath(const string &path)

class CRegistryReadView provides a nested hierarchical view at a particular key.

CRegistryReadView GetReadView(const string &section) const

CRegistryWriteView GetWriteView(const string &section)

Sequence update exception class.

SUpdateSeqParams GetData()

void LoadSettings(const CRegistryReadView &view)

bool GetUpdateProteins() const

void SaveSettings(CRegistryWriteView view) const

void UpdatePanel(bool running, const CUpdateSeq_Input *updseq_in=nullptr)

Function updates the panel with new (old, update) sequence pair.

void SetUpdateProteins(bool value)

void SetData(const SUpdateSeqParams &params)

~CUpdateSeq_Dlg()

Destructor.

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

void x_CalculateAlignment()

CRef< CUpdateSeq_Input > m_UpdSeqInput

virtual void x_SaveSettings(CRegistryWriteView view) const

virtual void x_LoadSettings(const CRegistryReadView &view)

override these functions in derived classes

void OnIdle(wxIdleEvent &event)

CUpdateSeq_Dlg()

Constructors.

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

void SetData(const SUpdateSeqParams &params)

void Init()

Initialises member variables.

job_future< CConstRef< objects::CSeq_align > > m_Future

void CreateControls()

Creates the controls and sizers.

void OnUpdateSequence(wxCommandEvent &event)

static bool ShowToolTips()

Should we show tooltips?

SUpdateSeqParams GetData() const

CUpdateSeqPanel * m_UpdSeqPanel

bool Create(wxWindow *parent, wxWindowID id=ID_CUPDATESEQ_DLG, const wxString &caption=_("Update Sequence"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)

Creation.

Sets up the old and the update sequences, and generates the alignment between them.

bool IsReadyForUpdate(void) const

void SetAlignment(const objects::CSeq_align *align)

bool OldSeqHasProteinFeats() const

bool HaveIdenticalResidues(void) const

const objects::CBioseq_Handle & GetUpdateBioseq(void) const

const objects::CBioseq_Handle & GetOldBioseq(void) const

Interface for testing cancellation request in a long lasting operation.

Stores parameters regarding the type of sequence update, on how to handle existing features and on ho...

static bool CompareAlignments(const objects::CSeq_align &align_first, const objects::CSeq_align &align_sec)

Returns true if the first alignment is 'better' than the second one Compares the Blast scores and in ...

static vector< CConstRef< objects::CSeq_align > > RunBlast2Seq(const objects::CBioseq_Handle &subject, const objects::CBioseq_Handle &query, bool accept_atleast_one, ICanceled *canceled=nullptr)

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

const string & GetMsg(void) const

Get message string.

virtual const char * what(void) const noexcept

Standard report (includes full backlog).

void Info(CExceptionArgs_Base &args)

EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

virtual bool IsCanceled(void) const =0

job_function_traits< _Fty >::future job_async(const _Fty &_Fnarg, const string &descr)

void ReportUsage(const wxString &dialog_name)

Report opening & accepting events in the editing package.

const struct ncbi::grid::netcache::search::fields::SIZE size

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

static CConstRef< CSeq_align > s_CreateAlign(CBioseq_Handle subject, CBioseq_Handle query, ICanceled &canceled)

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