: m_CmdProcessor(cmdProcessor), m_TopSeqEntry(seh), m_Workbench(wb)
94Create(parent,
id, caption, pos,
size, style);
105objects::CBioseq_CI b_iter(
m_TopSeqEntry, objects::CSeq_inst::eMol_na);
106 for( ; b_iter ; ++b_iter )
115wxPanel* itemPanel1 =
newwxPanel(
this,
wxID_ANY);
117wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
118itemPanel1->SetSizer(itemBoxSizer2);
120wxGridSizer *header =
newwxFlexGridSizer(0, 14, 0, 0);
121itemBoxSizer2->Add(header, 0, wxGROW|wxALL, 5);
123wxStaticText* itemStaticHeader0 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
" "), wxDefaultPosition, wxSize(30,-1), 0 );
124header->Add(itemStaticHeader0, 0, wxALIGN_CENTER|wxALL, 5);
125wxStaticText* itemStaticHeader1 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Barcode ID"), wxDefaultPosition, wxSize(150,-1), 0 );
126header->Add(itemStaticHeader1, 0, wxALIGN_CENTER|wxALL, 5);
127wxStaticText* itemStaticHeader2 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Genbank Accession"), wxDefaultPosition, wxSize(100,-1), 0 );
128itemStaticHeader2->Wrap(100);
129header->Add(itemStaticHeader2, 0, wxALIGN_CENTER|wxALL, 5);
130wxStaticText* itemStaticHeader3 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Length"), wxDefaultPosition, wxSize(80,-1), 0 );
131header->Add(itemStaticHeader3, 0, wxALIGN_CENTER|wxALL, 5);
132wxStaticText* itemStaticHeader4 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Primers"), wxDefaultPosition, wxSize(80,-1), 0 );
133header->Add(itemStaticHeader4, 0, wxALIGN_CENTER|wxALL, 5);
134wxStaticText* itemStaticHeader5 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Country"), wxDefaultPosition, wxSize(80,-1), 0 );
135header->Add(itemStaticHeader5, 0, wxALIGN_CENTER|wxALL, 5);
136wxStaticText* itemStaticHeader6 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Voucher"), wxDefaultPosition, wxSize(80,-1), 0 );
137header->Add(itemStaticHeader6, 0, wxALIGN_CENTER|wxALL, 5);
138wxStaticText* itemStaticHeader7 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Structured Voucher"), wxDefaultPosition, wxSize(80,-1), 0 );
139itemStaticHeader7->Wrap(80);
140header->Add(itemStaticHeader7, 0, wxALIGN_CENTER|wxALL, 5);
141wxStaticText* itemStaticHeader8 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Percent Ns"), wxDefaultPosition, wxSize(80,-1), 0 );
142itemStaticHeader8->Wrap(80);
143header->Add(itemStaticHeader8, 0, wxALIGN_CENTER|wxALL, 5);
144wxStaticText* itemStaticHeader9 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Collection Date"), wxDefaultPosition, wxSize(80,-1), 0 );
145itemStaticHeader9->Wrap(80);
146header->Add(itemStaticHeader9, 0, wxALIGN_CENTER|wxALL, 5);
147wxStaticText* itemStaticHeader10 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Order Assignment"), wxDefaultPosition, wxSize(80,-1), 0 );
148itemStaticHeader10->Wrap(80);
149header->Add(itemStaticHeader10, 0, wxALIGN_CENTER|wxALL, 5);
150wxStaticText* itemStaticHeader11 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Low Trace"), wxDefaultPosition, wxSize(80,-1), 0 );
151itemStaticHeader11->Wrap(80);
152header->Add(itemStaticHeader11, 0, wxALIGN_CENTER|wxALL, 5);
153wxStaticText* itemStaticHeader12 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Frame Shift"), wxDefaultPosition, wxSize(80,-1), 0 );
154itemStaticHeader12->Wrap(80);
155header->Add(itemStaticHeader12, 0, wxALIGN_CENTER|wxALL, 5);
156wxStaticText* itemStaticHeader13 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Has BARCODE Keyword"), wxDefaultPosition, wxSize(80,-1), 0 );
157itemStaticHeader13->Wrap(80);
158header->Add(itemStaticHeader13, 0, wxALIGN_CENTER|wxALL, 5);
161wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
162itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);
165itemBoxSizer3->Add(
m_scrolled, 1, wxGROW|wxALL, 0);
167wxBoxSizer* itemBoxSizer17 =
newwxBoxSizer(wxHORIZONTAL);
168itemBoxSizer2->Add(itemBoxSizer17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
171wxArrayString radioboxStrings;
172radioboxStrings.Add(
_(
"Check features where"));
173radioboxStrings.Add(
_(
"Uncheck features where"));
174 m_Radiobox=
newwxRadioBox( itemPanel1,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, radioboxStrings, 0, wxRA_SPECIFY_ROWS );
176itemBoxSizer17->Add(
m_Radiobox, 0, wxALIGN_TOP|wxRIGHT|wxLEFT, 5);
178wxArrayString choice_strings;
179choice_strings.Add(
_(
"Barcode ID"));
180choice_strings.Add(
_(
"Genbank Accession"));
181choice_strings.Add(
_(
"Percent Ns"));
182 m_Choice=
newwxChoice( itemPanel1,
wxID_ANY, wxDefaultPosition, wxDefaultSize, choice_strings, 0 );
184itemBoxSizer17->Add(
m_Choice, 0, wxALIGN_TOP|wxALL, 7);
191wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
192itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
194wxButton* itemButton13 =
newwxButton(itemPanel1,
ID_BARCODE_TOOL_SELECT,
_(
"Select"), wxDefaultPosition, wxDefaultSize, 0);
195itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
197wxButton* itemButton14 =
newwxButton(itemPanel1,
ID_BARCODE_TOOL_SELECT_ALL,
_(
"Select All"), wxDefaultPosition, wxDefaultSize, 0);
198itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
201itemBoxSizer12->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
203wxBoxSizer* itemBoxSizer16 =
newwxBoxSizer(wxHORIZONTAL);
204itemBoxSizer2->Add(itemBoxSizer16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
207itemBoxSizer16->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
209wxButton* itemButton17 =
newwxButton( itemPanel1,
ID_BARCODE_TOOL_REMOVE_KEYWORD,
_(
"Remove BARCODE Keyword from Selected"), wxDefaultPosition, wxDefaultSize, 0 );
210itemBoxSizer16->Add(itemButton17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
212wxButton* itemButton18 =
newwxButton( itemPanel1,
ID_BARCODE_TOOL_ADD_KEYWORD,
_(
"Add BARCODE Keyword to BARCODE Tech"), wxDefaultPosition, wxDefaultSize, 0 );
213itemBoxSizer16->Add(itemButton18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
215wxButton* itemButton19 =
newwxButton( itemPanel1,
ID_BARCODE_TOOL_DISMISS,
_(
"Dismiss"), wxDefaultPosition, wxDefaultSize, 0 );
216itemBoxSizer16->Add(itemButton19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
225 boolhas_keyword(
false);
230 const string&keyword = *qual_it;
244validator::SBarcode
b;
272 boolselect =
m_Radiobox->GetSelection() == 0;
273 stringchoice =
m_Choice->GetStringSelection().ToStdString();
280 if(choice ==
"Barcode ID")
284 else if(choice ==
"Genbank Accession")
288 else if(choice ==
"Percent Ns")
294 if(constraint->DoesTextMatch(
value))
323 bool CBarcodeTool::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle)
325wxFrame::Create( parent,
id, caption, pos,
size, style );
329GetSizer()->SetSizeHints(
this);
343objects::CBioseq_CI b_iter(
m_TopSeqEntry, objects::CSeq_inst::eMol_na);
344 for( ; b_iter ; ++b_iter )
357new_desc->
Assign(*desc_ci);
360 cmd->AddCommand(*ecmd);
377 boolselected_all(
false);
380 intanswer = wxMessageBox(
_(
"You have not selected any Bioseqs - remove BARCODE keyword from all?"),
wxT(
"Remove from all"), wxYES_NO | wxICON_QUESTION,
this);
387selected_all =
true;
406new_desc->
Assign(*desc_ci);
409 const string&keyword = *qual_it;
414 cmd->AddCommand (*ecmd);
440vector<string> values;
442values.push_back(
"Too Short");
444values.push_back(
"Missing Primers");
446values.push_back(
"Missing Country");
448values.push_back(
"Missing Voucher");
449 if(
b.structured_voucher)
450values.push_back(
"Structured Voucher");
451 if(!
b.percent_n.empty())
452values.push_back(
"Too Many Ns:"+
b.percent_n+
"%");
453 if(
b.collection_date)
454values.push_back(
"Bad Collection Date");
455 if(
b.order_assignment)
456values.push_back(
"Missing Order Assignment");
458values.push_back(
"Low Trace");
460values.push_back(
"Frame Shift");
470report->SetTitle(
wxT(
"BARCODE Keywords Removed"));
472report->Show(
true);
486 for( objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_na); b_iter ; ++b_iter )
491 for(CBioseq_Handle::TId::const_iterator it = bsh.
GetId().begin(); it != bsh.
GetId().end(); ++it)
493 const CSeq_id&
id= *(it->GetSeqId());
494 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
NStr::EqualNocase(
id.GetGeneral().GetDb(),
"uoguelph") &&
id.GetGeneral().IsSetTag())
496 const CObject_id&obj_id =
id.GetGeneral().GetTag();
497 if(obj_id.
IsStr())
498barcode = obj_id.
GetStr();
510 if(source_ci->GetSource().IsSetOrg())
514 if((*dbxref)->IsSetDb() && (*dbxref)->GetDb() ==
"BOLD"&& (*dbxref)->IsSetTag())
517 const CObject_id&obj_id = (*dbxref)->GetTag();
518 if(obj_id.
IsStr())
530new_desc->
Assign(*source_ci);
532dbtag->
SetDb(
"BOLD");
533dbtag->
SetTag().SetStr(barcode);
536 cmd->AddCommand (*ecmd);
577: wxVScrolledWindow(parent,
id, pos,
size, wxFULL_REPAINT_ON_RESIZE), m_barcode(barcode), m_selected(selected)
579SetBackgroundStyle(wxBG_STYLE_PAINT);
580wxGraphicsContext *gc = wxGraphicsContext::Create();
581gc->SetFont(GetFont(), *wxBLACK);
585wxDouble externalLeading;
586gc->GetTextExtent(
_(
"A"), &width, &height, &descent, &externalLeading);
587m_RowHeight = ceil(height) + 3;
589SetRowCount(m_barcode->size());
621wxAutoBufferedPaintDC dc(
this);
623wxGraphicsContext *gc = wxGraphicsContext::Create( dc );
624wxColour backgroundColour = GetBackgroundColour();
625 if(!backgroundColour.Ok())
626backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
627wxSize sz = GetClientSize();
628wxRect windowRect(wxPoint(0,0), sz);
629gc->SetBrush(wxBrush(backgroundColour));
630gc->SetPen(wxPen(backgroundColour, 1));
631gc->DrawRectangle(windowRect.GetX(),windowRect.GetY(),windowRect.GetWidth(),windowRect.GetHeight());
639 autostart = GetVisibleRowsBegin();
640 autostop = GetVisibleRowsEnd();
647wxRect rect(wxPoint(5, 5), renderer.GetCheckBoxSize(
this));
648 for(
size_t i= start;
i<= stop;
i++)
654 constvalidator::SBarcode &
b= (*m_barcode)[
i];
656dc.DrawLabel(wxString(
b.barcode), rect);
662dc.DrawLabel(wxString(
b.genbank), rect);
663 m_links.push_back(pair<size_t, wxRect>(
i, rect));
667renderer.DrawCheckBox(
this, dc, rect,
b.length ? wxCONTROL_CHECKED : 0);
670renderer.DrawCheckBox(
this, dc, rect,
b.primers ? wxCONTROL_CHECKED : 0);
673renderer.DrawCheckBox(
this, dc, rect,
b.country ? wxCONTROL_CHECKED : 0);
676renderer.DrawCheckBox(
this, dc, rect,
b.voucher ? wxCONTROL_CHECKED : 0);
679renderer.DrawCheckBox(
this, dc, rect,
b.structured_voucher ? wxCONTROL_CHECKED : 0);
683dc.DrawLabel(wxString(
b.percent_n), rect);
687renderer.DrawCheckBox(
this, dc, rect,
b.collection_date ? wxCONTROL_CHECKED : 0);
690renderer.DrawCheckBox(
this, dc, rect,
b.order_assignment ? wxCONTROL_CHECKED : 0);
693renderer.DrawCheckBox(
this, dc, rect,
b.low_trace ? wxCONTROL_CHECKED : 0);
696renderer.DrawCheckBox(
this, dc, rect,
b.frame_shift ? wxCONTROL_CHECKED : 0);
699renderer.DrawCheckBox(
this, dc, rect,
b.has_keyword ? wxCONTROL_CHECKED : 0);
709wxPoint p = evt.GetPosition();
710wxWindow *win = GetGrandParent();
723parent->
CheckRow(
static_cast<int>(
i));
731 for(
size_tk = 0; k <
m_links.size(); k++)
733 if(
m_links[k].second.Contains(p))
750objects::CBioseq_CI b_iter(seh, objects::CSeq_inst::eMol_na);
751 for( ; b_iter ; ++b_iter )
756 for(CBioseq_Handle::TId::const_iterator it = bsh.
GetId().begin(); it != bsh.
GetId().end(); ++it)
758 const CSeq_id&
id= *(it->GetSeqId());
759 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
NStr::EqualNocase(
id.GetGeneral().GetDb(),
"FBOL") &&
id.GetGeneral().IsSetTag())
761 const CObject_id&obj_id =
id.GetGeneral().GetTag();
762 if(obj_id.
IsStr())
775 if(source_ci->GetSource().IsSetOrg())
779 if((*dbxref)->IsSetDb() && (*dbxref)->GetDb() ==
"FBOL")
788new_desc->
Assign(*source_ci);
790dbtag->
SetDb(
"FBOL");
791dbtag->
SetTag().SetStr(fbol);
794 cmd->AddCommand (*ecmd);
User-defined methods of the data storage class.
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle seh)
void OnResize(wxSizeEvent &)
vector< pair< size_t, wxRect > > m_links
virtual void OnPaint(wxPaintEvent &event)
void OnMouseClick(wxMouseEvent &evt)
vector< pair< size_t, wxRect > > m_checkboxes
virtual void OnUpdate()
Notification for the derived class that moment is good for doing its update and drawing stuff.
virtual wxCoord OnGetRowHeight(size_t row) const
validator::TBarcodeResults * m_barcode
virtual void OnEraseBackground(wxEraseEvent &event)
void SetText(const wxString &text)
CProjectService - a service providing API for operations with Workspaces and Projects.
void SetStringSelection(const wxString &str)
CRef< edit::CStringConstraint > GetStringConstraint()
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
IWorkbench is the central interface in the application framework.
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator find(const key_type &key) const
const_iterator end() const
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
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
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
CConstRef< TObject > GetObjectCore(void) const
const TId & GetId(void) const
CSeq_entry_Handle GetSeq_entry_Handle(void) const
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
#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 EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
TKeywords & SetKeywords(void)
Assign a value to Keywords data member.
void SetOrg(TOrg &value)
Assign a value to Org data member.
bool IsStr(void) const
Check if variant Str is selected.
void SetTag(TTag &value)
Assign a value to Tag data member.
bool IsId(void) const
Check if variant Id is selected.
const TStr & GetStr(void) const
Get the variant data.
void SetDb(const TDb &value)
Assign a value to Db data member.
TId GetId(void) const
Get the variant data.
TGenbank & SetGenbank(void)
Select the variant.
TSource & SetSource(void)
Select the variant.
@ e_Genbank
GenBank specific info.
@ e_Source
source of materials, includes Org-ref
const TYPE & Get(const CNamedParameterList *param)
void ReportUsage(const wxString &dialog_name)
Report opening & accepting events in the editing package.
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Utility macros and typedefs for exploring NCBI objects from seqblock.asn.
#define FOR_EACH_KEYWORD_ON_GENBANKBLOCK(Itr, Var)
FOR_EACH_KEYWORD_ON_GENBANKBLOCK EDIT_EACH_KEYWORD_ON_GENBANKBLOCK.
#define ERASE_KEYWORD_ON_GENBANKBLOCK(Itr, Var)
ERASE_KEYWORD_ON_GENBANKBLOCK.
#define EDIT_EACH_KEYWORD_ON_GENBANKBLOCK(Itr, Var)
#define FOR_EACH_DBXREF_ON_ORGREF(Itr, Var)
FOR_EACH_DBXREF_ON_ORGREF EDIT_EACH_DBXREF_ON_ORGREF.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
bool BarcodeTestFails(const SBarcode &b)
bool IsTechBarcode(CBioseq_Handle bsh)
vector< SBarcode > TBarcodeResults
void BarcodeTestBioseq(CBioseq_Handle bsh, SBarcode &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