objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_na);
70 for( ; b_iter ; ++b_iter ) {
71m_Seqs.push_back(*b_iter);
75Create(parent,
id, caption, pos,
size, style);
82wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
83itemPanel1->SetSizer(itemBoxSizer2);
85wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
86itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
88 m_ListCtrl1=
newwxListCtrl( itemPanel1,
wxID_ANY, wxDefaultPosition, wxSize(400, 320), wxLC_REPORT|wxLC_NO_HEADER );
89itemBoxSizer3->Add(
m_ListCtrl1, 1, wxGROW|wxALL, 5);
92 m_ListCtrl2=
newwxListCtrl( itemPanel1,
wxID_ANY, wxDefaultPosition, wxSize(400, 320), wxLC_REPORT|wxLC_NO_HEADER );
93itemBoxSizer3->Add(
m_ListCtrl2, 1, wxGROW|wxALL, 5);
95wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
96itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
98wxButton* itemButton1 =
newwxButton( itemPanel1,
ID_REMOVE_SEQ_LEFT,
_(
"<<<"), wxDefaultPosition, wxDefaultSize, 0 );
99itemBoxSizer4->Add(itemButton1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
101wxButton* itemButton2 =
newwxButton( itemPanel1,
ID_REMOVE_SEQ_RIGHT,
_(
">>>"), wxDefaultPosition, wxDefaultSize, 0 );
102itemBoxSizer4->Add(itemButton2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
104wxBoxSizer* itemBoxSizer17 =
newwxBoxSizer(wxHORIZONTAL);
105itemBoxSizer2->Add(itemBoxSizer17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
107wxStaticText* itemStaticText4 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Seq-id"), wxDefaultPosition, wxDefaultSize, 0 );
108itemBoxSizer17->Add(itemStaticText4, 0, wxALIGN_TOP|wxALL, 5);
114wxFlexGridSizer* itemFlexGridSizer5 =
newwxFlexGridSizer(0, 2, 0, 0);
115itemBoxSizer2->Add(itemFlexGridSizer5, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0);
117wxStaticText* itemStaticText5 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Select sequences longer than"), wxDefaultPosition, wxDefaultSize, 0 );
118itemFlexGridSizer5->Add(itemStaticText5, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
120 m_Min=
newwxTextCtrl(itemPanel1,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);
121itemFlexGridSizer5->Add(
m_Min, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP|wxBOTTOM, 5);
123wxStaticText* itemStaticText6 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Select sequences less than"), wxDefaultPosition, wxDefaultSize, 0 );
124itemFlexGridSizer5->Add(itemStaticText6, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL |wxALL, 5);
126 m_Max=
newwxTextCtrl( itemPanel1,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0 );
127itemFlexGridSizer5->Add(
m_Max, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 5);
129wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
130itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
132wxButton* itemButton13 =
newwxButton(itemPanel1,
ID_REMOVE_SEQ_SELECT,
_(
"Select"), wxDefaultPosition, wxDefaultSize, 0);
133itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
135wxButton* itemButton14 =
newwxButton(itemPanel1,
ID_REMOVE_SEQ_SELECT_ALL,
_(
"Select All"), wxDefaultPosition, wxDefaultSize, 0);
136itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
138wxButton* itemButton15 =
newwxButton(itemPanel1,
ID_REMOVE_SEQ_UNSELECT_ALL,
_(
"Unselect All"), wxDefaultPosition, wxDefaultSize, 0);
139itemBoxSizer12->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
141wxBoxSizer* itemBoxSizer16 =
newwxBoxSizer(wxHORIZONTAL);
142itemBoxSizer2->Add(itemBoxSizer16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
144wxButton* itemButton16 =
newwxButton( itemPanel1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
145itemBoxSizer16->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
147wxButton* itemButton17 =
newwxButton( itemPanel1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
148itemBoxSizer16->Add(itemButton17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
150wxHyperlinkCtrl* itemHyperlinkCtrl =
newwxHyperlinkCtrl( itemPanel1, wxID_HELP,
_(
"Help"),
wxT(
"https://www.ncbi.nlm.nih.gov/tools/gbench/manual9/#remove-sequences"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
151itemHyperlinkCtrl->SetForegroundColour(wxColour(192, 192, 192));
152itemBoxSizer16->Add(itemHyperlinkCtrl, 0, wxALIGN_CENTER_VERTICAL, 5);
159 if(
id.IsGenbank() &&
id.GetGenbank().IsSetAccession())
160labels[0] =
id.GetGenbank().GetAccession();
161 if(
id.IsGeneral() &&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
162labels[1] =
id.GetGeneral().GetTag().GetStr();
163 if(
id.IsGeneral() &&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsId())
165 if(
id.IsLocal() &&
id.GetLocal().IsStr())
166labels[3] =
id.GetLocal().GetStr();
170labels.push_back(
label);
175vector<string> labels(5);
179 for(CBioseq_Handle::TId::const_iterator it = seh.
GetSeq().
GetId().begin(); it != seh.
GetSeq().
GetId().end(); ++it)
190 for(
int i=0;
i<labels.size();
i++)
191 if(!labels[
i].
empty())
192strs.push_back(labels[
i]);
207 if(
id.IsGenbank() &&
id.GetGenbank().IsSetAccession())
209 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
id.GetGeneral().GetDb() ==
"BankIt"&&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
211labels.
insert(
id.GetGeneral().GetTag().GetStr());
212labels.
insert(
"BankIt"+
id.GetGeneral().GetTag().GetStr());
213 string first, second;
218 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
id.GetGeneral().GetDb() ==
"NCBIFILE"&&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
220labels.
insert(
id.GetGeneral().GetTag().GetStr());
221labels.
insert(
"NCBIFILE"+
id.GetGeneral().GetTag().GetStr());
223 if(
id.IsGeneral() &&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
224labels.
insert(
id.GetGeneral().GetTag().GetStr());
225 if(
id.IsGeneral() &&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsId())
227 if(
id.IsLocal() &&
id.GetLocal().IsStr())
228labels.
insert(
id.GetLocal().GetStr());
239 for(CBioseq_Handle::TId::const_iterator it = seh.
GetSeq().
GetId().begin(); it != seh.
GetSeq().
GetId().end(); ++it)
255vector<string> vec(strs.
begin(), strs.
end());
256 returnconstraint->DoesListMatch(vec);
275 for(
unsigned int i=0;
i<set_size; ++
i)
294item =
m_ListCtrl1->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
295 if( item == -1 )
break;
296 int i=
static_cast<int>(
m_ListCtrl1->GetItemData(item));
307item =
m_ListCtrl2->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
308 if( item == -1 )
break;
309 int i=
static_cast<int>(
m_ListCtrl2->GetItemData(item));
320 for(
unsigned int i=0;
i<set_size; ++
i)
335 longmin_length = -1;
336 longmax_length = LONG_MAX;
337 boolmin_num =
m_Min->GetValue().ToLong(&min_length);
338 boolmax_num =
m_Max->GetValue().ToLong(&max_length);
341 if( !min_num && !max_num && !constraint)
365 else if(min_num || max_num)
367 if(length > min_length && length < max_length)
384wxDialog::Create( parent,
id, caption, pos,
size, style );
388GetSizer()->SetSizeHints(
this);
417report->SetTitle(
wxT(
"Bioseqs Removed"));
419report->Show(
true);
428 for(
int i= 0;
i<
m_Seqs.size();
i++) {
445objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_aa);
446 for( ; b_iter ; ++b_iter ) {
459objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_aa);
460 for( ; b_iter ; ++b_iter )
477 if(!fi->IsSetProduct())
482proteins.
insert(prot_bsh);
485objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_aa);
486 for( ; b_iter ; ++b_iter )
489 if(proteins.
find(bsh) == proteins.
end())
const CBioseq & GetNucFromNucProtSet(void) const
TSeqPos GetLength(void) const
bool IsSetLength(void) const
void SetText(const wxString &text)
static CRef< CCmdComposite > JustRemoveProteins(objects::CSeq_entry_Handle seh)
static CRef< CCmdComposite > OrphanedProteins(objects::CSeq_entry_Handle seh)
static CRef< CCmdComposite > AndRenormalizeNucProtSets(objects::CSeq_entry_Handle seh)
vector< CBioseq_Handle > m_Seqs
CRef< CCmdComposite > GetCommand()
void OnSelectAll(wxCommandEvent &event)
CSeq_entry_Handle GetSeqEntry(unsigned int i)
void ChooseSequence(CBioseq_Handle bsh)
void OnButtonMoveRight(wxCommandEvent &event)
bool MatchConstraint(CRef< objects::edit::CStringConstraint > constraint, CSeq_entry_Handle seh)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Remove Sequences"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
void CollectLabelsAll(CSeq_entry_Handle seh, set< string > &strs)
void OnUnselectAll(wxCommandEvent &event)
void OnSelect(wxCommandEvent &event)
void CombineLabels(const CSeq_id &id, vector< string > &labels)
string GetLabel(CSeq_entry_Handle seh)
void OnButtonMoveLeft(wxCommandEvent &event)
vector< int > m_Available
void CollectLabels(CSeq_entry_Handle seh, list< string > &strs)
CStringConstraintPanel * m_StringConstraintPanel
void CombineLabelsAll(const CSeq_id &id, set< string > &labels)
void SetStringSelection(const wxString &str)
CRef< edit::CStringConstraint > GetStringConstraint()
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator find(const key_type &key) const
const_iterator end() const
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
unsigned int TSeqPos
Type for sequence locations and lengths.
int TSignedSeqPos
Type for signed sequence position.
const string & GetMsg(void) const
Get message string.
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
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
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
TClass GetClass(void) const
TSeqPos GetBioseqLength(void) const
CConstRef< CBioseq_set > GetCompleteBioseq_set(void) const
Return the complete bioseq-set object.
bool IsProtein(void) const
bool IsSetClass(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
const TId & GetId(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static const char label[]
@ eClass_nuc_prot
nuc acid and coded proteins
const TId & GetId(void) const
Get the Id member data.
bool IsSetId(void) const
equivalent identifiers Check if a value has been assigned to Id data member.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
const CConstRef< CSeq_id > GetAccession(const CSeq_id_Handle &id_handle)
#define ID_REMOVE_SEQ_SELECT_ALL
#define ID_REMOVE_SEQ_RIGHT
#define ID_REMOVE_SEQ_UNSELECT_ALL
#define ID_REMOVE_SEQ_LEFT
#define ID_REMOVE_SEQ_SELECT
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
CRef< CCmdComposite > GetDeleteSequenceCommand(objects::CBioseq_Handle bsh)
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