wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
86 Create(parent,
id, caption, pos,
size, style);
92SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
98GetSizer()->SetSizeHints(
this);
102SetSize(wxSize(280, 750));
124 ITERATE(vector<const CFeatListItem *>, ft_it, feat_list) {
127 intfeat_type = item.
GetType();
129 m_Types[pair<int,int>(feat_type,feat_subtype)] = desc;
130 if(existing.
find(desc) == existing.
end())
153wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
154itemDialog1->SetSizer(itemBoxSizer2);
156wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
157itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
160itemBoxSizer3->Add(
m_ListCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
162 m_ListCtrl->InsertColumn(0,
" Feature",wxLIST_FORMAT_LEFT,237);
167wxBoxSizer* itemBoxSizer5 =
newwxBoxSizer(wxHORIZONTAL);
168itemBoxSizer2->Add(itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
170wxBoxSizer* itemBoxSizer6 =
newwxBoxSizer(wxVERTICAL);
171itemBoxSizer5->Add(itemBoxSizer6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
173wxStaticBox* itemStaticBoxSizer7Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"Optional String Constraint"));
174wxStaticBoxSizer* itemStaticBoxSizer7 =
newwxStaticBoxSizer(itemStaticBoxSizer7Static, wxVERTICAL);
175itemBoxSizer6->Add(itemStaticBoxSizer7, 0, wxALIGN_LEFT|wxALL, 5);
179itemStaticBoxSizer7->Add(
m_RadioButton, 0, wxALIGN_LEFT|wxALL, 5);
182itemRadioButton9->SetValue(
false);
183itemStaticBoxSizer7->Add(itemRadioButton9, 0, wxALIGN_LEFT|wxALL, 5);
186itemStaticBoxSizer7->Add(
m_TextCtrl, 0, wxALIGN_LEFT|wxALL, 5);
190itemStaticBoxSizer7->Add(
m_CheckBox, 0, wxALIGN_LEFT|wxALL, 5);
192wxStaticBox* itemStaticBoxSizer15Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"Optional Seq-id Constraint"));
193wxStaticBoxSizer* itemStaticBoxSizer15 =
newwxStaticBoxSizer(itemStaticBoxSizer15Static, wxVERTICAL);
194itemBoxSizer6->Add(itemStaticBoxSizer15, 0, wxALIGN_LEFT|wxALL, 5);
201itemRadioButton16->SetValue(
false);
202itemStaticBoxSizer15->Add(itemRadioButton16, 0, wxALIGN_LEFT|wxALL, 5);
205itemStaticBoxSizer15->Add(
m_TextCtrl_id, 0, wxALIGN_LEFT|wxALL, 5);
209itemStaticBoxSizer15->Add(
m_CheckBox_id, 0, wxALIGN_LEFT|wxALL, 5);
211wxStaticBox* itemStaticBoxSizer17Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"Optional Location Constraint"));
212wxStaticBoxSizer* itemStaticBoxSizer17 =
newwxStaticBoxSizer(itemStaticBoxSizer17Static, wxVERTICAL);
213itemBoxSizer6->Add(itemStaticBoxSizer17, 0, wxALIGN_LEFT|wxALL, 5);
215wxArrayString strands,
types;
216strands.Add(
wxT(
"Any Strand"));
217strands.Add(
wxT(
"Plus Strand"));
218strands.Add(
wxT(
"Minus Strand"));
219 types.Add(
wxT(
"Nucleotide and protein sequences"));
220 types.Add(
wxT(
"Nucleotide sequences only"));
221 types.Add(
wxT(
"Protein sequences only"));
225itemStaticBoxSizer17->Add(
m_ChoiceStrand, 0, wxALIGN_LEFT|wxALL, 5);
228itemStaticBoxSizer17->Add(
m_ChoiceType, 0, wxALIGN_LEFT|wxALL, 5);
231itemBoxSizer2->Add(OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
270 boolmodified =
false;
275item =
m_ListCtrl->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
276 if( item == -1 )
break;
297list<string> non_refseq;
301refseq.push_back(*it);
303non_refseq.push_back(*it);
312 if(non_refseq.size()) {
313 if( !accs.empty() ) {
319 if( !accs.empty() ) {
327 if( !lines.empty() ) {
328 ITERATE(list<string>, iter, lines) {
329 if(iter != lines.begin()) {
330ostream <<
" "<< *iter << endl;
332ostream << *iter << endl;
345list< CConstRef<CUser_object> > objs;
352objs.push_back(sub_o);
378ostream <<
"Model Generation Method: ";
381method =
f->GetData().GetStr();
384ostream <<
"<unknown>";
391 if(method ==
"Chainer"|| method ==
"Gnomon") {
401 if( !core.empty() ) {
407 if( !core.empty() ) {
408s =
"Model Based On: ";
410ostream << s << endl;
432stringstream& ostream,
constobjects::CSeq_feat& feat, objects::CScope& scope)
438ostream <<
text<< endl;
441 TSeqRangerange = feat.GetLocation().GetTotalRange();
442ostream <<
"Total Range: ";
459ostream <<
"Total Length: " 463ostream <<
"Processed Length: " 468 if(feat.IsSetProduct()) {
473ostream <<
"Product Length: " 493 CFeat_CIfeat_it(scope, feat.GetLocation(), sel);
494 for(; feat_it ; ++feat_it) {
500string::size_type pos = s.find_first_not_of(
" \n\r\t");
501 if( pos != string::npos ){
505string::size_type lpos = string::npos;
508lpos = s.find_first_of(
"\n\r", pos );
510 if( lpos == string::npos ){
511 text= s.substr( pos );
513 text= s.substr( pos, lpos - pos );
515ostream <<
text<< endl;
517}
while( lpos != string::npos );
529 for(
CFeat_CIfeat (tse); feat; ++feat)
531 boolfilter =
false;
536 else if(subtypeAnyFlag)
538 int type= feat->GetOriginalFeature().GetData().Which();
540 stringdesc =
m_Types[pair<int,int>(
type,subtype)];
544 else if(feat->GetOriginalFeature().CanGetData())
546 int type= feat->GetOriginalFeature().GetData().Which();
547 intsubtype = feat->GetOriginalFeature().GetData().GetSubtype();
548 stringdesc =
m_Types[pair<int,int>(
type,subtype)];
560 CScope&scope = tse.GetScope();
562 stringpattern =
m_TextCtrl->GetLineText(0).ToStdString();
563 bool match(
false);
574 stringpattern =
m_TextCtrl_id->GetLineText(0).ToStdString();
581 for(CBioseq_Handle::TId::const_iterator idh = bsh.
GetId().begin(); idh != bsh.
GetId().end(); ++idh)
588}
catch(
const CException&) {}
catch(
constexception&) {}
609 if(strand ==
wxT(
"Plus Strand") && feat->GetOriginalFeature().IsSetLocation() && feat->GetOriginalFeature().GetLocation().GetStrand() ==
eNa_strand_plus) go =
true;
610 if(strand ==
wxT(
"Minus Strand") && feat->GetOriginalFeature().IsSetLocation() && feat->GetOriginalFeature().GetLocation().GetStrand() ==
eNa_strand_minus) go =
true;
618 if(
type==
wxT(
"Nucleotide sequences only") && feat->GetOriginalFeature().IsSetLocation())
624 if(
type==
wxT(
"Protein sequences only") && feat->GetOriginalFeature().IsSetLocation())
637new_feat->
Assign(feat->GetOriginalFeature());
objects::CSeq_entry_Handle m_TopSeqEntry
bool Create(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
bool GetTopLevelSeqEntryAndProcessor()
void AddCommand(IEditCommand &command)
~CCorrectIntervalOrder()
Destructor.
wxCheckBox * m_CheckBox_id
vector< string > m_Descriptions
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
vector< bool > m_SubtypeAnyFlag
void ApplyToCSeq_entry(objects::CSeq_entry_Handle tse, CRef< CCmdComposite > composite, const string &name, bool subtypeAnyFlag, bool &modified)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
static bool ShowToolTips()
Should we show tooltips?
wxChoice * m_ChoiceStrand
void CreateControls()
Creates the controls and sizers.
map< pair< int, int >, string > m_Types
virtual CRef< CCmdComposite > GetCommand()
wxTextCtrl * m_TextCtrl_id
bool Create(wxWindow *parent, wxWindowID id=11000, const wxString &caption=_("Correct Interval Order"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
wxRadioButton * m_RadioButton
void Init()
Initialises member variables.
wxRadioButton * m_RadioButton_id
CCorrectIntervalOrder()
Constructors.
CFeatListItem - basic configuration data for one "feature" type.
string GetDescription() const
CFlatFileConfig & SetNeverTranslateCDS(bool val=true)
static string GetSeqFeatText(const CMappedFeat &feat, CScope &scope, const CFlatFileConfig &cfg, CRef< feature::CFeatTree > ftree=null)
namespace ncbi::objects::
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
IWorkbench is the central interface in the application framework.
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
static void s_Render_SeqFeat(stringstream &ostream, const objects::CSeq_feat &feat, objects::CScope &scope)
static void s_RenderAccList(stringstream &ostream, const CUser_field::TData::TStrs &item_data, const string &title)
static void s_Render_Feat_Evidence(stringstream &ostream, const CSeq_feat &feat, CScope &)
#define ID_CORRECT_INTERVAL_ORDER_TEXTCTRL
#define ID_CORRECT_INTERVAL_ORDER_CHECKBOX1
#define ID_CORRECT_INTERVAL_ORDER_CHECKBOX
#define ID_CORRECT_INTERVAL_ORDER_RADIOBUTTON3
#define ID_LISTCTRL_CORRECT_INTERVAL_ORDER
#define ID_CORRECT_INTERVAL_ORDER_RADIOBUTTON1
#define ID_CORRECT_INTERVAL_ORDER_TEXTCTRL1
#define ID_CORRECT_INTERVAL_ORDER_CHOICE2
#define ID_CORRECT_INTERVAL_ORDER_RADIOBUTTON2
#define ID_CORRECT_INTERVAL_ORDER_RADIOBUTTON
#define ID_CORRECT_INTERVAL_ORDER_CHOICE1
#define ID_CORRECT_INTERVAL_ORDER_OKCANCEL
static const char * str(char *buf, int n)
static const struct type types[]
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
vector< const objects::CFeatListItem * > GetSortedFeatList(objects::CSeq_entry_Handle seh, size_t max=numeric_limits< size_t >::max())
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)
Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
EAccessionInfo
For IdentifyAccession (below)
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
ENa_strand GetStrand(const CSeq_loc &loc, CScope *scope=0)
Returns eNa_strand_unknown if multiple Bioseqs in loc Returns eNa_strand_other if multiple strands in...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
TSeqPos GetBioseqLength(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
const TId & GetId(void) const
SAnnotSelector & IncludeFeatSubtype(TFeatSubtype subtype)
Include feature subtype in the search.
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
position_type GetLength(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static void Wrap(const string &str, SIZE_TYPE width, IWrapDest &dest, TWrapFlags flags, const string *prefix, const string *prefix1)
@ fWithCommas
Use commas as thousands separator.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
const TData & GetData(void) const
Get the Data member data.
vector< CRef< CUser_field > > TFields
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TObject & GetObject(void) const
Get the variant data.
const TLabel & GetLabel(void) const
Get the Label member data.
const TType & GetType(void) const
Get the Type member data.
vector< CStringUTF8 > TStrs
vector< CRef< CUser_field > > TData
const TExts & GetExts(void) const
Get the Exts member data.
bool IsSetExt(void) const
user defined structure extension Check if a value has been assigned to Ext data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
bool IsSetExts(void) const
set of extensions; will replace 'ext' field Check if a value has been assigned to Exts data member.
const TExt & GetExt(void) const
Get the Ext member data.
@ e_Other
for historical reasons, 'other' = 'refseq'
bool CorrectIntervalOrder(CSeq_loc &loc)
Correct the order of consecutive intervals with the same Seq-id on the same strand.
static void text(MDB_val *v)
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)
wxString ToWxString(const string &s)
string ToStdString(const wxString &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