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/mixedstrands_8cpp_source.html below:

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

47 #include <wx/collpane.h> 48 #include <wx/choice.h> 49 #include <wx/button.h> 51 #include <wx/checkbox.h> 52 #include <wx/stattext.h> 86  Create

(parent,

id

, caption, pos,

size

, style);

94 bool CMixedStrands::Create

( wxWindow* parent, wxWindowID

id

,

const

wxString& caption,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

97 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

98

wxDialog::Create( parent,

id

, caption, pos,

size

, style );

103

GetSizer()->SetSizeHints(

this

);

146

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

147

itemDialog1->SetSizer(itemBoxSizer2);

149  m_Description

=

new

wxStaticText(itemDialog1, wxID_STATIC,

_

(

"Checking for mixed strands within the set..."

), wxDefaultPosition, wxDefaultSize, 0);

150

itemBoxSizer2->Add(

m_Description

, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);

151 #if defined(__WXMSW__) 152  m_ColPane

=

new

wxGenericCollapsiblePane(itemDialog1,

ID_COLLAPSIBLEPANE

,

_

(

"Reverse them"

), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE);

154  m_ColPane

=

new

wxCollapsiblePane(itemDialog1,

ID_COLLAPSIBLEPANE

,

_

(

"Reverse them"

), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE);

156

itemBoxSizer2->Add(

m_ColPane

, 0, wxALIGN_LEFT | wxALL, 5);

159

wxBoxSizer* itemBoxSizer5 =

new

wxBoxSizer(wxVERTICAL);

160  m_ColPane

->GetPane()->SetSizer(itemBoxSizer5);

162

wxBoxSizer* itemBoxSizer6 =

new

wxBoxSizer(wxHORIZONTAL);

163

itemBoxSizer5->Add(itemBoxSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);

165

wxStaticText* itemStaticText7 =

new

wxStaticText(

m_ColPane

->GetPane(), wxID_STATIC,

_

(

"Sequence with the correct strand"

), wxDefaultPosition, wxDefaultSize, 0);

166

itemBoxSizer6->Add(itemStaticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

168

wxArrayString m_SequencesStrings;

170

itemBoxSizer6->Add(

m_Sequences

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

176

wxBoxSizer* itemBoxSizer10 =

new

wxBoxSizer(wxHORIZONTAL);

177

itemBoxSizer2->Add(itemBoxSizer10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

179

wxButton* itemButton11 =

new

wxButton( itemDialog1, wxID_OK,

_

(

"Accept"

), wxDefaultPosition, wxDefaultSize, 0 );

180

itemBoxSizer10->Add(itemButton11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

181

itemButton11->Enable(

false

);

183

wxButton* itemButton12 =

new

wxButton( itemDialog1, wxID_CANCEL,

_

(

"Cancel"

), wxDefaultPosition, wxDefaultSize, 0 );

184

itemBoxSizer10->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

230  if

(!seqaligns.empty()) {

232  if

((*it)->IsSet()) {

258

NucOptions->SetTraditionalMegablastDefaults();

259

NucOptions->SetGapExtensionCost(5);

260

NucOptions->SetGapOpeningCost(11);

261

NucOptions->SetMismatchPenalty(-5);

262

NucOptions->SetMatchReward(1);

263

NucOptions->SetWordSize(12);

264

NucOptions->SetWindowSize(150);

265

NucOptions->SetDustFiltering(

true

);

266

NucOptions->SetEvalueThreshold(1e-6);

268

blast::CBlastOptions& opts = Options->SetOptions();

269

opts.SetBestHitOverhang(0.1);

270

opts.SetBestHitScoreEdge(0.1);

271

opts.SetHitlistSize(250);

272

opts.SetMaskLevel(1);

279  if

(align_vector.empty()) {

285  catch

(

const

blast::CBlastException& e) {

294  struct

SAlignJobInput

302  for

(

auto

&& it : align_vector) {

331  LOG_POST

(

Info

<<

"Start alignment construction... "

);

333  bool

mixed_strands =

false

;

340  while

(queryh && !mixed_strands) {

345

mixed_strands = s_DoesAlignHaveMixedStrands(align_vector);

359  LOG_POST

(

Info

<<

"Finished generating pairwise alignments."

);

361  const bool

mixed_strands = jobResult->

GetData

();

362  string msg

(

"This set does not have sequences of mixed strands."

);

364  msg

.assign(

"This set has sequences of mixed strands."

);

377  string

err_msg =

"Failed: "

;

378  if

(!errMsg.empty()) {

382

err_msg +=

"Unknown fatal error"

;

392

SAlignJobInput

input

;

396

(

this

,

input

, s_FindMixedStrandAlignment,

"MixedStrandJob"

,

"Find mixed strand pairwise alignment within set"

));

405  if

(!

label

.empty()) {

414  bool

enable = (

m_Sequences

->GetCurrentSelection() != -1) ?

true

:

false

;

415

FindWindowById(wxID_OK)->Enable(enable);

422  int

selected =

m_Sequences

->GetCurrentSelection();

423  if

(selected == -1 || selected >=

m_BshList

.size()) {

431  unsigned int

num_reversed = 0,

count

= 0;

433

oss <<

"The following sequences were reversed:\n"

;

439  bool

tobe_reversed =

false

;

441

tobe_reversed = s_DoesAlignHaveMixedStrands(align_vector);

444

new_inst->

Assign

(b_iter->GetInst());

447  cmd

->AddCommand(*cmd_inst);

453

oss <<

label

<<

"\n"

;

457  for

(

CFeat_CI

feat_it(*b_iter); feat_it; ++feat_it) {

459

new_feat->

Assign

(*feat_it->GetOriginalSeq_feat());

462  cmd

->AddCommand(*cmd_feat);

468  if

(num_reversed > 0) {

469

oss << num_reversed <<

" out of "

<<

count

<<

" sequences were reversed."

;

482

reportdlg->SetTitle(

"Reverse complement sequences log"

);

484

reportdlg->Show(

true

);

Declares the CBl2Seq (BLAST 2 Sequences) class.

Declares the CBlastNucleotideOptionsHandle class.

vector< CRef< objects::CSeq_align_set > > TSeqAlignVector

Vector of Seq-align-sets.

@ eBlastn

Nucl-Nucl (traditional blastn)

void SetText(const wxString &text)

void OnSequenceSelected(wxCommandEvent &event)

vector< objects::CBioseq_Handle > m_BshList

virtual void OnJobResult(CObject *result, CJobAdapter &adapter)

static TAlignVector s_Blast2NASeq(const objects::CBioseq_Handle &sh, const objects::CBioseq_Handle &qh)

Blasts two nucleotide sequences using the BLAST best hits algorithm.

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

CMixedStrands()

Constructors.

wxStaticText * m_Description

static TAlignVector s_GetAlignVector(const blast::TSeqAlignVector &seqaligns)

bool Create(wxWindow *parent, wxWindowID id=ID_CMIXEDSTRANDS, const wxString &caption=_("Mixed Strands"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)

Creation.

virtual void OnJobFailed(const string &, CJobAdapter &adapter)

objects::CSeq_entry_Handle m_TopSeqEntry

vector< CConstRef< objects::CSeq_align > > TAlignVector

static bool ShowToolTips()

Should we show tooltips?

void Init()

Initialises member variables.

wxCheckBox * m_RevFeatChkbox

~CMixedStrands()

Destructor.

CRef< CCmdComposite > GetCommand()

void CreateControls()

Creates the controls and sizers.

CRef< CJobAdapter > m_JobAdapter

wxCollapsiblePane * m_ColPane

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:

TDim CheckNumRows(void) const

Validatiors.

ENa_strand GetSeqStrand(TDim row) const

Get strand (the first one if segments have different strands).

namespace ncbi::objects::

Interface for testing cancellation request in a long lasting operation.

static SQLCHAR output[256]

void ReverseComplement(const BidirectionalIterator &first, const BidirectionalIterator &last)

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

#define LOG_POST(message)

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

void Error(CExceptionArgs_Base &args)

void Info(CExceptionArgs_Base &args)

void NcbiErrorBox(const string &message, const string &title="Error")

specialized Message Box function for reporting critical errors

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.

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,...

void Reset(void)

Reset reference object.

TObjectType * GetPointerOrNull(void) THROWS_NONE

Get pointer value.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

virtual bool IsCanceled(void) const =0

static const char label[]

list< CRef< CSeq_align > > Tdata

@ eMol_na

just a nucleic acid

void ReverseComplementFeature(CSeq_feat &feat, CScope &scope)

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)

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