(parent,
id, caption, pos,
size, style);
130SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
131wxDialog::Create( parent,
id, caption, pos,
size, style );
136GetSizer()->SetSizeHints(
this);
177wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
178itemDialog1->SetSizer(itemBoxSizer2);
180wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
181itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
183wxStaticText* itemStaticText4 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"End"), wxDefaultPosition, wxDefaultSize, 0 );
184itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
188itemBoxSizer3->Add(
m_5Prime, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
190wxRadioButton* itemRadioButton6 =
newwxRadioButton(itemDialog1,
ID_EDITSEQENDS_RADIOBUTTON1,
_(
"3'"), wxDefaultPosition, wxDefaultSize, 0);
191itemRadioButton6->SetValue(
false);
192itemBoxSizer3->Add(itemRadioButton6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
194wxBoxSizer* itemBoxSizer7 =
newwxBoxSizer(wxHORIZONTAL);
195itemBoxSizer2->Add(itemBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
198 m_Add->SetValue(
true);
199itemBoxSizer7->Add(
m_Add, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
201wxRadioButton* itemRadioButton9 =
newwxRadioButton(itemDialog1,
ID_EDITSEQENDS_RADIOBUTTON3,
_(
"Trim from end"), wxDefaultPosition, wxDefaultSize, 0);
202itemRadioButton9->SetValue(
false);
203itemBoxSizer7->Add(itemRadioButton9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
205wxStaticText* itemStaticText10 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Sequence"), wxDefaultPosition, wxDefaultSize, 0 );
206itemBoxSizer2->Add(itemStaticText10, 0, wxALIGN_LEFT|wxALL, 5);
209itemBoxSizer2->Add(
m_Seq, 0, wxGROW|wxALL, 5);
211wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
212itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
214wxStaticText* itemStaticText13 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Optional gene constraint"), wxDefaultPosition, wxDefaultSize, 0 );
215itemBoxSizer12->Add(itemStaticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
218itemBoxSizer12->Add(
m_GeneConstraint, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
222itemBoxSizer2->Add(
m_ExtendFeatures, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
224wxBoxSizer* itemBoxSizer16 =
newwxBoxSizer(wxHORIZONTAL);
225itemBoxSizer2->Add(itemBoxSizer16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
229itemBoxSizer16->Add(
m_TrimSeq, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
233itemBoxSizer16->Add(
m_TrimCount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
235wxBoxSizer* itemBoxSizer19 =
newwxBoxSizer(wxHORIZONTAL);
236itemBoxSizer2->Add(itemBoxSizer19, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
238wxStaticText* itemStaticText20 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Trim count"), wxDefaultPosition, wxDefaultSize, 0 );
239itemBoxSizer19->Add(itemStaticText20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
242itemBoxSizer19->Add(
m_Count, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
243 m_Count->SetValidator( wxTextValidator( wxFILTER_NUMERIC ) );
245wxStaticBox* itemStaticBoxSizer22Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"Choose Sequences To Edit"));
246wxStaticBoxSizer* itemStaticBoxSizer22 =
newwxStaticBoxSizer(itemStaticBoxSizer22Static, wxVERTICAL);
247itemBoxSizer2->Add(itemStaticBoxSizer22, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
249wxArrayString itemCheckListBox23Strings;
253wxBoxSizer* itemBoxSizer24 =
newwxBoxSizer(wxHORIZONTAL);
254itemStaticBoxSizer22->Add(itemBoxSizer24, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
256wxButton* itemButton25 =
newwxButton(itemStaticBoxSizer22->GetStaticBox(),
ID_EDITSEQENDS_BUTTON,
_(
"Select All"), wxDefaultPosition, wxDefaultSize, 0);
257itemBoxSizer24->Add(itemButton25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
259wxButton* itemButton26 =
newwxButton(itemStaticBoxSizer22->GetStaticBox(),
ID_EDITSEQENDS_BUTTON1,
_(
"Unselect All"), wxDefaultPosition, wxDefaultSize, 0);
260itemBoxSizer24->Add(itemButton26, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
264itemBoxSizer2->Add(
m_AddCitSub, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
266wxBoxSizer* itemBoxSizer28 =
newwxBoxSizer(wxHORIZONTAL);
267itemBoxSizer2->Add(itemBoxSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
269wxButton* itemButton29 =
newwxButton( itemDialog1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
270itemBoxSizer28->Add(itemButton29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
272wxButton* itemButton30 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
273itemBoxSizer28->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
321 if(
id.IsGenbank() &&
id.GetGenbank().IsSetAccession())
322labels[0] =
id.GetGenbank().GetAccession();
323 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
id.GetGeneral().GetDb() ==
"BankIt"&&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
324labels[1] =
id.GetGeneral().GetTag().GetStr();
325 else if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
id.GetGeneral().GetDb() ==
"NCBIFILE"&&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
326labels[1] =
id.GetGeneral().GetTag().GetStr();
327 else if(
id.IsLocal() &&
id.GetLocal().IsStr())
328labels[1] =
id.GetLocal().GetStr();
333vector<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())
341strs.push_back(labels[
i]);
379 if(
m_Add->GetValue())
385 stringextension =
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())
422inst_length = new_inst->GetLength();
427 for(
CFeat_CIfeat_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_CIfeat_it(bsh); feat_it; ++feat_it)
457new_feat->
Assign(feat_it->GetOriginalFeature());
458 Extend3(*new_feat, inst_length);
462 cmd->AddCommand(*cmd_change_feat);
483 cmd->AddCommand(*cmdAddDesc);
486 boolgraph_deleted =
false;
489 for(; graph_ci; ++graph_ci)
492 cmd->AddCommand(*del_graph);
493graph_deleted =
true;
499 if(annot_ci->IsGraph())
502 cmd->AddCommand(*del_annot);
507 if(!
msg.IsEmpty())
510report->SetTitle(
wxT(
"Quality Scores Affected"));
512report->Show(
true);
532 string str=
m_Seq->GetValue().ToStdString();
535before +=
str.length();
539after -=
str.length();
545before += wxAtoi(
m_Count->GetValue());
547after -= wxAtoi(
m_Count->GetValue());
555 cmd->AddCommand(*cmd_bioseq);
599 switch((orig_frame + diff % 3) % 3)
611feat.
SetData().SetCdregion().SetFrame(new_frame);
622 if(stop < inst_length - 1)
628diff = inst_length - 1 - stop;
650 switch((orig_frame + diff % 3) % 3)
662feat.
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