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

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

57 #include "wx/wxprec.h" 119  Create

(parent,

id

, caption, pos,

size

, style);

130 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

131

wxDialog::Create( parent,

id

, caption, pos,

size

, style );

136

GetSizer()->SetSizeHints(

this

);

177

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

178

itemDialog1->SetSizer(itemBoxSizer2);

180

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

181

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

183

wxStaticText* itemStaticText4 =

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"End"

), wxDefaultPosition, wxDefaultSize, 0 );

184

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

188

itemBoxSizer3->Add(

m_5Prime

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

190

wxRadioButton* itemRadioButton6 =

new

wxRadioButton(itemDialog1,

ID_EDITSEQENDS_RADIOBUTTON1

,

_

(

"3'"

), wxDefaultPosition, wxDefaultSize, 0);

191

itemRadioButton6->SetValue(

false

);

192

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

194

wxBoxSizer* itemBoxSizer7 =

new

wxBoxSizer(wxHORIZONTAL);

195

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

198  m_Add

->SetValue(

true

);

199

itemBoxSizer7->Add(

m_Add

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

201

wxRadioButton* itemRadioButton9 =

new

wxRadioButton(itemDialog1,

ID_EDITSEQENDS_RADIOBUTTON3

,

_

(

"Trim from end"

), wxDefaultPosition, wxDefaultSize, 0);

202

itemRadioButton9->SetValue(

false

);

203

itemBoxSizer7->Add(itemRadioButton9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

205

wxStaticText* itemStaticText10 =

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"Sequence"

), wxDefaultPosition, wxDefaultSize, 0 );

206

itemBoxSizer2->Add(itemStaticText10, 0, wxALIGN_LEFT|wxALL, 5);

209

itemBoxSizer2->Add(

m_Seq

, 0, wxGROW|wxALL, 5);

211

wxBoxSizer* itemBoxSizer12 =

new

wxBoxSizer(wxHORIZONTAL);

212

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

214

wxStaticText* itemStaticText13 =

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"Optional gene constraint"

), wxDefaultPosition, wxDefaultSize, 0 );

215

itemBoxSizer12->Add(itemStaticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

218

itemBoxSizer12->Add(

m_GeneConstraint

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

222

itemBoxSizer2->Add(

m_ExtendFeatures

, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

224

wxBoxSizer* itemBoxSizer16 =

new

wxBoxSizer(wxHORIZONTAL);

225

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

229

itemBoxSizer16->Add(

m_TrimSeq

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

233

itemBoxSizer16->Add(

m_TrimCount

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

235

wxBoxSizer* itemBoxSizer19 =

new

wxBoxSizer(wxHORIZONTAL);

236

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

238

wxStaticText* itemStaticText20 =

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"Trim count"

), wxDefaultPosition, wxDefaultSize, 0 );

239

itemBoxSizer19->Add(itemStaticText20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

242

itemBoxSizer19->Add(

m_Count

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

243  m_Count

->SetValidator( wxTextValidator( wxFILTER_NUMERIC ) );

245

wxStaticBox* itemStaticBoxSizer22Static =

new

wxStaticBox(itemDialog1,

wxID_ANY

,

_

(

"Choose Sequences To Edit"

));

246

wxStaticBoxSizer* itemStaticBoxSizer22 =

new

wxStaticBoxSizer(itemStaticBoxSizer22Static, wxVERTICAL);

247

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

249

wxArrayString itemCheckListBox23Strings;

253

wxBoxSizer* itemBoxSizer24 =

new

wxBoxSizer(wxHORIZONTAL);

254

itemStaticBoxSizer22->Add(itemBoxSizer24, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

256

wxButton* itemButton25 =

new

wxButton(itemStaticBoxSizer22->GetStaticBox(),

ID_EDITSEQENDS_BUTTON

,

_

(

"Select All"

), wxDefaultPosition, wxDefaultSize, 0);

257

itemBoxSizer24->Add(itemButton25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

259

wxButton* itemButton26 =

new

wxButton(itemStaticBoxSizer22->GetStaticBox(),

ID_EDITSEQENDS_BUTTON1

,

_

(

"Unselect All"

), wxDefaultPosition, wxDefaultSize, 0);

260

itemBoxSizer24->Add(itemButton26, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

264

itemBoxSizer2->Add(

m_AddCitSub

, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

266

wxBoxSizer* itemBoxSizer28 =

new

wxBoxSizer(wxHORIZONTAL);

267

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

269

wxButton* itemButton29 =

new

wxButton( itemDialog1, wxID_OK,

_

(

"Accept"

), wxDefaultPosition, wxDefaultSize, 0 );

270

itemBoxSizer28->Add(itemButton29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

272

wxButton* itemButton30 =

new

wxButton( itemDialog1, wxID_CANCEL,

_

(

"Cancel"

), wxDefaultPosition, wxDefaultSize, 0 );

273

itemBoxSizer28->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

321  if

(

id

.IsGenbank() &&

id

.GetGenbank().IsSetAccession())

322

labels[0] =

id

.GetGenbank().GetAccession();

323  if

(

id

.IsGeneral() &&

id

.GetGeneral().IsSetDb() &&

id

.GetGeneral().GetDb() ==

"BankIt"

&&

id

.GetGeneral().IsSetTag() &&

id

.GetGeneral().GetTag().IsStr())

324

labels[1] =

id

.GetGeneral().GetTag().GetStr();

325  else if

(

id

.IsGeneral() &&

id

.GetGeneral().IsSetDb() &&

id

.GetGeneral().GetDb() ==

"NCBIFILE"

&&

id

.GetGeneral().IsSetTag() &&

id

.GetGeneral().GetTag().IsStr())

326

labels[1] =

id

.GetGeneral().GetTag().GetStr();

327  else if

(

id

.IsLocal() &&

id

.GetLocal().IsStr())

328

labels[1] =

id

.GetLocal().GetStr();

333

vector<string> labels(2);

336  for

(CBioseq_Handle::TId::const_iterator it = bsh.

GetId

().begin(); it != bsh.

GetId

().end(); ++it)

339  for

(

int i

=0;

i

<labels.size();

i

++)

340  if

(!labels[

i

].

empty

())

341

strs.push_back(labels[

i

]);

379  if

(

m_Add

->GetValue())

385  string

extension =

m_Seq

->GetValue().ToStdString();

386  if

(extension.empty())

397  if

(!gene_locus.empty())

402  const CSeq_feat

& gene = feat_it->GetOriginalFeature();

420  cmd

->AddCommand(*change_inst);

421  if

(new_inst->IsSetLength())

422

inst_length = new_inst->GetLength();

427  for

(

CFeat_CI

feat_it(bsh); feat_it; ++feat_it)

434  Extend5

(*new_feat, inst_length);

439  cmd

->AddCommand(*cmd_change_feat);

447  cmd

->AddCommand(*cmd_del);

454  for

(

CFeat_CI

feat_it(bsh); feat_it; ++feat_it)

457

new_feat->

Assign

(feat_it->GetOriginalFeature());

458  Extend3

(*new_feat, inst_length);

462  cmd

->AddCommand(*cmd_change_feat);

483  cmd

->AddCommand(*cmdAddDesc);

486  bool

graph_deleted =

false

;

489  for

(; graph_ci; ++graph_ci)

492  cmd

->AddCommand(*del_graph);

493

graph_deleted =

true

;

499  if

(annot_ci->IsGraph())

502  cmd

->AddCommand(*del_annot);

507  if

(!

msg

.IsEmpty())

510

report->SetTitle(

wxT

(

"Quality Scores Affected"

));

512

report->Show(

true

);

532  string str

=

m_Seq

->GetValue().ToStdString();

535

before +=

str

.length();

539

after -=

str

.length();

545

before += wxAtoi(

m_Count

->GetValue());

547

after -= wxAtoi(

m_Count

->GetValue());

555  cmd

->AddCommand(*cmd_bioseq);

599  switch

((orig_frame + diff % 3) % 3)

611

feat.

SetData

().SetCdregion().SetFrame(new_frame);

622  if

(stop < inst_length - 1)

628

diff = inst_length - 1 - stop;

650  switch

((orig_frame + diff % 3) % 3)

662

feat.

SetData

().SetCdregion().SetFrame(new_frame);

671  if

(

m_Add

->GetValue())

User-defined methods of the data storage class.

@ eExtreme_Positional

numerical value

static CRef< objects::CSeqdesc > s_GetCitSubForUpdatedSequence(const objects::CBioseq_Handle &bsh, string &message, CConstRef< objects::CSeqdesc > &changedSeqdesc, objects::CSeq_entry_Handle &seh)

Generates/Creates a Cit-sub publication that will be added to the sequence.

static const char * sm_ExistingCitSub

static void TrimBeforeAfter(CBioseq_Handle edited_bsh, int before, int after)

static void TrimQualityScores(CBioseq_Handle bsh, int before, int after, CRef< CCmdComposite > command)

static void AdjustFeatureLocations(CBioseq_Handle bsh, int before, int after, CRef< CCmdComposite > cmd)

wxCheckListBox * m_CheckListBox

~CEditSequenceEnds()

Destructor.

wxTextCtrl * m_GeneConstraint

void Extend5(CSeq_feat &feat, TSeqPos inst_length)

void CreateControls()

Creates the controls and sizers.

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

void OnUnselectAll(wxCommandEvent &event)

string GetLabel(CBioseq_Handle bsh)

void Extend3(CSeq_feat &feat, TSeqPos inst_length)

CSeq_entry_Handle m_TopSeqEntry

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

wxCheckBox * m_ExtendFeatures

void Init()

Initialises member variables.

wxRadioButton * m_TrimSeq

void OnSelectAll(wxCommandEvent &event)

void AddOrTrimEnable(wxCommandEvent &event)

wxRadioButton * m_TrimCount

CRef< CCmdComposite > GetCommand()

void CollectLabels(CBioseq_Handle bsh, list< string > &strs)

void CombineLabels(const CSeq_id &id, vector< string > &labels)

vector< CBioseq_Handle > m_bioseq

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

Creation.

CEditSequenceEnds()

Constructors.

static bool ShowToolTips()

Should we show tooltips?

void SetText(const wxString &text)

namespace ncbi::objects::

static CRef< objects::CSeq_feat > s_OffsetFeature(const objects::CSeq_feat &feat, const TSeqPos offset, const objects::CSeq_id *newId=NULL)

Offsets the location of the feature.

static CRef< objects::CSeq_inst > s_ExtendOneEndOfSequence(const objects::CBioseq_Handle &bsh, const string &extension, SUpdateSeqParams::ESequenceUpdateType update_type)

Extends the 5' or 3' end of a NA sequence (no alignment is necessary).

@ eSeqUpdateExtend3

extend the 5' end of old sequence with the update

@ eSeqUpdateExtend5

patch old sequence with update in the aligned region

#define ID_EDITSEQENDS_BUTTON1

#define ID_EDITSEQENDS_RADIOBUTTON3

#define ID_EDITSEQENDS_BUTTON

#define ID_EDITSEQENDS_RADIOBUTTON5

#define ID_EDITSEQENDS_CHECKLISTBOX

#define ID_EDITSEQENDS_TEXTCTRL1

#define ID_EDITSEQENDS_TEXTCTRL

#define ID_EDITSEQENDS_TEXTCTRL2

#define ID_EDITSEQENDS_CHECKBOX1

#define ID_EDITSEQENDS_RADIOBUTTON1

#define ID_EDITSEQENDS_RADIOBUTTON2

#define ID_EDITSEQENDS_RADIOBUTTON

#define ID_EDITSEQENDS_RADIOBUTTON4

#define ID_EDITSEQENDS_CHECKBOX

static const char * str(char *buf, int n)

unsigned int TSeqPos

Type for sequence locations and lengths.

virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)

Set object to copy of another one.

ENa_strand GetStrand(void) const

Get the location's strand.

TSeqPos GetStart(ESeqLocExtremes ext) const

Return start and stop positions of the seq-loc.

TSeqPos GetStop(ESeqLocExtremes ext) const

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

TClass GetClass(void) const

CBioseq_set_Handle GetParentBioseq_set(void) const

Return a handle for the parent Bioseq-set, or null handle.

bool CanGetClass(void) const

TSeqPos GetBioseqLength(void) const

CSeq_entry_Handle GetSeq_entry_Handle(void) const

Get parent Seq-entry handle.

CSeq_entry_Handle GetParentEntry(void) const

Return a handle for the parent seq-entry of the bioseq.

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.

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.

@ eCoding_Iupac

Set coding to printable coding (Iupacna or Iupacaa)

CSeq_graph_Handle GetSeq_graph_Handle(void) const

Get original graph handle.

void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const

Fill the buffer string with the sequence data for the interval [start, stop).

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)

Check if a string ends with a specified suffix value.

static string Join(const TContainer &arr, const CTempString &delim)

Join strings using the specified delimiter.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive equality of a substring with another string.

@ eNocase

Case insensitive compare.

static const char label[]

bool IsSetLocus(void) const

Official gene symbol Check if a value has been assigned to Locus data member.

const TLocus & GetLocus(void) const

Get the Locus member data.

bool IsSetData(void) const

the specific data Check if a value has been assigned to Data data member.

void SetLocation(TLocation &value)

Assign a value to Location data member.

bool IsCdregion(void) const

Check if variant Cdregion is selected.

const TLocation & GetLocation(void) const

Get the Location member data.

bool IsGene(void) const

Check if variant Gene is selected.

TFrame GetFrame(void) const

Get the Frame member data.

const TData & GetData(void) const

Get the Data member data.

void SetData(TData &value)

Assign a value to Data data member.

const TCdregion & GetCdregion(void) const

Get the variant data.

const TGene & GetGene(void) const

Get the variant data.

bool IsSetFrame(void) const

Check if a value has been assigned to Frame data member.

@ eFrame_not_set

not set, code uses one

@ eFrame_three

reading frame

ENa_strand

strand of nucleic acid

const TSeq & GetSeq(void) const

Get the variant data.

@ eClass_nuc_prot

nuc acid and coded proteins

const TInst & GetInst(void) const

Get the Inst member data.

CRef< CSeq_loc > SeqLocExtend(const CSeq_loc &loc, size_t pos, CScope *scope)

constexpr bool empty(list< Ts... >) noexcept

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

void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)

static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)

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


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