wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
96 Create(parent,
id, caption, pos,
size, style);
105 bool CSegregateSets::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
108SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
109wxFrame::Create( parent,
id, caption, pos,
size, style );
114GetSizer()->SetSizeHints(
this);
150wxBoxSizer* itemBoxSizer1 =
newwxBoxSizer(wxHORIZONTAL);
151frame->SetSizer(itemBoxSizer1);
153wxPanel* itemDialog1 =
newwxPanel(
this);
154itemBoxSizer1->Add(itemDialog1, 1, wxGROW|wxALL, 0);
156wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
157itemDialog1->SetSizer(itemBoxSizer2);
160itemBoxSizer2->Add(
m_Notebook, 1, wxGROW|wxALL, 5);
169 m_Notebook->AddPage(panel3,
_(
"Num Seq Length"));
181 m_Notebook->AddPage(panel7,
_(
"Feature Type"));
190 m_Notebook->AddPage(panel10,
_(
"Struct Comment"));
193itemBoxSizer2->Add(
m_SetClassPanel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
199wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
200itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
202wxButton* itemButton13 =
newwxButton( itemDialog1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
203itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
205wxButton* itemButton14 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
206itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
208 m_LeaveUp=
newwxCheckBox( itemDialog1,
wxID_ANY,
_(
"Leave Dialog Up"), wxDefaultPosition, wxDefaultSize, 0 );
210itemBoxSizer12->Add(
m_LeaveUp, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
319vector< vector<int> > &subsets =
GetSubsets();
320 if(
m_TopSeqEntry&& !subsets.empty() && !subsets.front().empty())
323 int i= subsets.front().front();
328 if(grandparent != parent)
338changed_set->SetSeq_set().push_back(new_se);
339changed_set->SetClass(parent.
GetClass());
343 for(
unsigned ints = 0; s < subsets.size(); s++)
356 cmd->AddCommand(*set_cmd);
365user.
SetType().SetStr(
"GbenchModification");
367method->
SetValue(
"SegregateSets");
368se.
SetDescr().Set().push_back( user_object );
375 booluser_object_present =
false;
378 booltitle_present =
false;
379 if((*it)->IsSetDescr())
381 for(CSeq_descr::Tdata::const_iterator desc = (*it)->GetDescr().Get().begin(); desc != (*it)->GetDescr().Get().end(); ++desc)
383 if((*desc)->IsTitle() && !(*desc)->GetTitle().empty())
385title_present =
true;
392 for(CSeq_descr::Tdata::const_iterator desc = se.
GetDescr().
Get().begin(); desc != se.
GetDescr().
Get().end(); ++desc)
394 if(title_present && (*desc)->IsTitle())
396 if((*desc)->IsUser() && (*desc)->GetUser().IsSetType() && (*desc)->GetUser().GetType().IsStr() && (*desc)->GetUser().GetType().GetStr() ==
"GbenchModification")
398user_object_present =
true;
401(*it)->SetDescr().Set().push_back(*desc);
412 if(user_object_present)
423new_set->SetClass(top_class);
425 for(
unsigned intj = 0; j < subset.size(); j++)
431new_set->SetSeq_set().push_back(se);
434new_se->
SetSet(*new_set);
443CBioseq_set::TSeq_set::iterator it = changed_set.
SetSeq_set().begin();
444 while(it != changed_set.
SetSeq_set().end())
454(*it)->GetSet().CanGetClass() && (*it)->GetSet().GetClass() ==
CBioseq_set::eClass_nuc_prot&& (*it)->GetSet().GetNucFromNucProtSet().CanGetId() &&
460 if( (*it)->GetSet().GetSeq_set().empty() )
508wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
509itemPanel1->SetSizer(itemBoxSizer2);
511wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
512itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
514m_TreeCtrl =
newwxTreeCtrl(itemPanel1,
wxID_ANY, wxDefaultPosition, wxSize(400,320),wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT|wxTR_MULTIPLE );
515itemBoxSizer3->Add(m_TreeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
517m_ListCtrl2 =
newwxListCtrl( itemPanel1,
wxID_ANY, wxDefaultPosition, wxSize(400, 320), wxLC_REPORT|wxLC_NO_HEADER );
518itemBoxSizer3->Add(m_ListCtrl2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
519m_ListCtrl2->InsertColumn(0,wxEmptyString,wxLIST_FORMAT_LEFT,380);
521wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
522itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
524wxButton* itemButton1 =
newwxButton(itemPanel1, ID_RBSUB_TOLEFT,
_(
"<<<"), wxDefaultPosition, wxDefaultSize, 0);
525itemBoxSizer4->Add(itemButton1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
527wxButton* itemButton2 =
newwxButton( itemPanel1, ID_RBSUB_TORIGHT,
_(
">>>"), wxDefaultPosition, wxDefaultSize, 0 );
528itemBoxSizer4->Add(itemButton2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);
537wxSizer* itemBoxSizer2 = GetSizer();
539wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
540itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
542wxButton* itemButton13 =
newwxButton( itemPanel1,
wxID_ANY,
_(
"Select"), wxDefaultPosition, wxDefaultSize, 0 );
543itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
545wxButton* itemButton14 =
newwxButton( itemPanel1,
wxID_ANY,
_(
"Select All"), wxDefaultPosition, wxDefaultSize, 0 );
546itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
548wxButton* itemButton15 =
newwxButton( itemPanel1,
wxID_ANY,
_(
"Unselect All"), wxDefaultPosition, wxDefaultSize, 0 );
549itemBoxSizer12->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
558wxWindow *win = GetParent();
564win = win->GetParent();
571 if(
id.IsGenbank() &&
id.GetGenbank().IsSetAccession())
572labels[0] =
id.GetGenbank().GetAccession();
573 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
id.GetGeneral().GetDb() ==
"BankIt"&&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
574labels[1] =
id.GetGeneral().GetTag().GetStr();
575 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
id.GetGeneral().GetDb() ==
"NCBIFILE"&&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
576labels[2] =
id.GetGeneral().GetTag().GetStr();
577 if(
id.IsLocal() &&
id.GetLocal().IsStr())
578labels[3] =
id.GetLocal().GetStr();
583vector<string> labels(4);
587 for(CBioseq_Handle::TId::const_iterator it = seh.
GetSeq().
GetId().begin(); it != seh.
GetSeq().
GetId().end(); ++it)
598 for(
int i=0;
i<labels.size();
i++)
599 if(!labels[
i].
empty())
600strs.push_back(labels[
i]);
605 if(
id.IsGenbank() &&
id.GetGenbank().IsSetAccession())
607 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
id.GetGeneral().GetDb() ==
"BankIt"&&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
609labels.
insert(
id.GetGeneral().GetTag().GetStr());
610labels.
insert(
"BankIt"+
id.GetGeneral().GetTag().GetStr());
611 string first, second;
616 if(
id.IsGeneral() &&
id.GetGeneral().IsSetDb() &&
id.GetGeneral().GetDb() ==
"NCBIFILE"&&
id.GetGeneral().IsSetTag() &&
id.GetGeneral().GetTag().IsStr())
618labels.
insert(
id.GetGeneral().GetTag().GetStr());
619labels.
insert(
"NCBIFILE"+
id.GetGeneral().GetTag().GetStr());
621 if(
id.IsLocal() &&
id.GetLocal().IsStr())
622labels.
insert(
id.GetLocal().GetStr());
633 for(CBioseq_Handle::TId::const_iterator it = seh.
GetSeq().
GetId().begin(); it != seh.
GetSeq().
GetId().end(); ++it)
657vector<string> vec(strs.
begin(), strs.
end());
658 returnconstraint->DoesListMatch(vec);
669 for(
unsigned intk=0; k<
m_Subsets.size(); k++)
670 for(
unsigned intj=0; j<
m_Subsets[k].size(); j++)
679 m_ListCtrl2->SetItemBackgroundColour(item,*wxLIGHT_GREY);
684 for(
unsigned int i=0;
i<set_size; ++
i)
685 if(removed.
find(
i) == removed.
end())
691 for(vector<pair<int,string> >::iterator s = it->second.begin(); s != it->second.end(); ++s)
692avail_to_cluster_label[s->first] = pair<string,string>(it->first,s->second);
695wxTreeItemId root =
m_TreeCtrl->AddRoot(wxEmptyString);
699 if(
i== avail_to_cluster_label.
end())
704 if(cluster_to_id.
find(wxString(it->first)) == cluster_to_id.
end())
706parent =
m_TreeCtrl->AppendItem(root,wxString(it->first));
707cluster_to_id[wxString(it->first)] = parent;
710parent = cluster_to_id[wxString(it->first)];
715vector<wxTreeItemId> to_delete;
716wxTreeItemIdValue cookie;
717wxTreeItemId
id=
m_TreeCtrl->GetFirstChild( root, cookie );
722wxTreeItemIdValue cookie2;
723wxTreeItemId item =
m_TreeCtrl->GetFirstChild(
id, cookie2 );
728to_delete.push_back(
id);
731 id=
m_TreeCtrl->GetNextChild( root, cookie);
734 for(
size_t i=0;
i<to_delete.size();
i++)
742wxWindow *btn =
dynamic_cast<wxWindow*
>(
event.GetEventObject());
746 self=
dynamic_cast<CRBSubpanel*
>(btn->GetParent());
760wxArrayTreeItemIds selection;
761 size_tsize_sel =
m_TreeCtrl->GetSelections(selection);
762 for(
unsigned int i=0;
i<size_sel;
i++)
764wxTreeItemId
id= selection[
i];
769vector<int> cluster_subset;
770wxTreeItemIdValue cookie;
771wxTreeItemId item =
m_TreeCtrl->GetFirstChild(
id, cookie );
772 while( item.IsOk() )
777cluster_subset.push_back(
data);
779item =
m_TreeCtrl->GetNextChild(
id, cookie);
787subset.push_back(
data);
792 if(
m_Subsets.empty() && !subset.empty())
808item =
m_ListCtrl2->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
809 if( item == -1 )
break;
810 int i=
static_cast<int>(
m_ListCtrl2->GetItemData(item));
811 for(
unsigned intk=0; k<
m_Subsets.size(); k++)
834wxTreeItemId root =
m_TreeCtrl->GetRootItem();
835wxTreeItemIdValue cookie;
836wxTreeItemId
id=
m_TreeCtrl->GetFirstChild( root, cookie );
843vector<int> cluster_subset;
844wxTreeItemIdValue cookie2;
845wxTreeItemId item =
m_TreeCtrl->GetFirstChild(
id, cookie2 );
846 while( item.IsOk() )
851cluster_subset.push_back(
data);
853item =
m_TreeCtrl->GetNextChild(
id, cookie2);
861subset.push_back(
data);
865 id=
m_TreeCtrl->GetNextChild( root, cookie);
868 if(
m_Subsets.empty() && !subset.empty())
916wxPanel::Create( parent,
id, pos,
size, style );
920GetSizer()->SetSizeHints(
this);
950 if(selected.
find(bsh) != selected.
end())
951subset.push_back(
i);
967wxSizer* itemBoxSizer2 = GetSizer();
969wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
970itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
972wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxVERTICAL);
973itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
975wxStaticText* itemStaticText5 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Minimum Length"), wxDefaultPosition, wxDefaultSize, 0 );
976itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
978wxStaticText* itemStaticText6 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Maximum Length"), wxDefaultPosition, wxDefaultSize, 0 );
979itemBoxSizer4->Add(itemStaticText6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
981wxBoxSizer* itemBoxSizer7 =
newwxBoxSizer(wxVERTICAL);
982itemBoxSizer3->Add(itemBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
984m_Min =
newwxTextCtrl(itemPanel1, ID_LENGTH_MINTEXT, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);
985itemBoxSizer7->Add(m_Min, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
987m_Max =
newwxTextCtrl(itemPanel1, ID_LENGTH_MAXTEXT, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);
988itemBoxSizer7->Add(m_Max, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
993 unsigned longmin_length = 0;
994 unsigned longmax_length = INT_MAX;
995 boolmin_num =
m_Min->GetValue().ToULong(&min_length);
996 boolmax_num =
m_Max->GetValue().ToULong(&max_length);
997 if( !min_num && !max_num )
1015 if(length >= min_length && length <= max_length)
1016subset.push_back(
i);
1018 if(!subset.empty())
1027 for(
unsigned i= 0;
i< set_size;
i++)
1041 if(!
label.empty())
1058wxSizer* itemBoxSizer2 = GetSizer();
1061itemBoxSizer2->Add(m_StringConstraintPanel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|
wxFIXED_MINSIZE, 0);
1062m_StringConstraintPanel->SetStringSelection(
_(
"Is one of"));
1069 if(!constraint)
return;
1078subset.push_back(
i);
1080 if(!subset.empty())
1089 for(
unsigned i= 0;
i< set_size;
i++)
1093 if(!
label.empty())
1115wxSizer* itemBoxSizer2 = GetSizer();
1120itemBoxSizer2->Add(m_Constraint, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1141 stringconstraint_field;
1143 if(constraint_field_panel)
1144constraint_field = constraint_field_panel->
GetFieldName();
1147constraint_field = constraint_field_type;
1150constraint_field =
"RNA "+ constraint_field;
1155 if(!constraint || constraint_field.empty())
return;
1163vector<CRef<edit::CApplyObject> > src_objects = src_col->
GetApplyObjects(seh, constraint_field, constraint);
1165 if(!src_objects.empty())
1166subset.push_back(
i);
1168 if(!subset.empty())
1179 stringconstraint_field;
1181 if(constraint_field_panel)
1182constraint_field = constraint_field_panel->
GetFieldName();
1185constraint_field = constraint_field_type;
1188constraint_field =
"RNA "+ constraint_field;
1192 if(constraint_field.empty())
return;
1195 for(
unsigned i= 0;
i< set_size;
i++)
1232wxSizer* itemBoxSizer2 = GetSizer();
1234wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
1235itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1237wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxVERTICAL);
1238itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1240wxStaticText* itemStaticText5 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Number of Sets"), wxDefaultPosition, wxDefaultSize, 0 );
1241itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1243wxBoxSizer* itemBoxSizer7 =
newwxBoxSizer(wxVERTICAL);
1244itemBoxSizer3->Add(itemBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1246m_Num =
newwxTextCtrl(itemPanel1, ID_NUM_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);
1247itemBoxSizer7->Add(m_Num, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1253 unsigned longnum = 0;
1254 boolnum_exists =
m_Num->GetValue().ToULong(&num);
1259 longremainder = total_items % num;
1260 longitems_per_subset = total_items / num;
1266subset.push_back(
i);
1269 if(subset.size() >= items_per_subset+1)
1277 if(subset.size() >= items_per_subset && !subset.empty())
1301 else if(
tag.IsStr())
1302name =
tag.GetStr();
1305name = name.substr(0,pos);
1321 for(vector<CSeq_id_Handle>::const_iterator idh = seh.
GetSeq().
GetId().begin(); idh != seh.
GetSeq().
GetId().end(); ++idh)
1322 if(idh->GetSeqId()->IsGeneral() && idh->GetSeqId()->GetGeneral().IsSetDb() && idh->GetSeqId()->GetGeneral().GetDb() ==
"NCBIFILE"&& idh->GetSeqId()->GetGeneral().IsSetTag() )
1324 stringfilename =
GetFilename(idh->GetSeqId()->GetGeneral().GetTag());
1325 if(!filename.empty())
1326tag_to_subset[filename].push_back(
i);
1334 if((*idh)->IsGeneral() && (*idh)->GetGeneral().IsSetDb() && (*idh)->GetGeneral().GetDb() ==
"NCBIFILE"&& (*idh)->GetGeneral().IsSetTag())
1336 stringfilename =
GetFilename((*idh)->GetGeneral().GetTag());
1337 if(!filename.empty())
1338tag_to_subset[filename].push_back(
i);
1343 for(
map<
string,vector<int> >::iterator it = tag_to_subset.
begin(); it != tag_to_subset.
end(); ++it)
1344 if(!it->second.empty())
1354 for(
unsigned i= 0;
i< set_size;
i++)
1363 for(vector<CSeq_id_Handle>::const_iterator idh = seh.
GetSeq().
GetId().begin(); idh != seh.
GetSeq().
GetId().end(); ++idh)
1364 if(idh->GetSeqId()->IsGeneral() && idh->GetSeqId()->GetGeneral().IsSetDb() && idh->GetSeqId()->GetGeneral().GetDb() ==
"NCBIFILE"&& idh->GetSeqId()->GetGeneral().IsSetTag())
1366filename =
GetFilename(idh->GetSeqId()->GetGeneral().GetTag());
1374 if((*idh)->IsGeneral() && (*idh)->GetGeneral().IsSetDb() && (*idh)->GetGeneral().GetDb() ==
"NCBIFILE"&& (*idh)->GetGeneral().IsSetTag())
1376filename =
GetFilename((*idh)->GetGeneral().GetTag());
1379 if(!
label.empty() && !filename.empty())
1399wxSizer* itemBoxSizer2 = GetSizer();
1401wxPanel *container1 =
newwxPanel( itemPanel1,
wxID_ANY, wxDefaultPosition, wxSize(800,260), 0 );
1402itemBoxSizer2->Add(container1, 0, wxALIGN_LEFT|wxALL|
wxFIXED_MINSIZE, 0);
1404wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
1405container1->SetSizer(itemBoxSizer3);
1407vector<CFieldNamePanel::EFieldType> field_types;
1419m_FieldType =
new CFieldChoicePanel( container1, field_types,
true,
false,
wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
1420itemBoxSizer3->Add(m_FieldType, 0, wxALIGN_LEFT|wxALL|
wxFIXED_MINSIZE, 0);
1433 if(constraint_field.empty())
return;
1443 if(!values.
empty() && !values.
begin()->empty())
1445value_to_subset[*values.
begin()].push_back(
i);
1448 for(
map<
string,vector<int> >::iterator it = value_to_subset.
begin(); it != value_to_subset.
end(); ++it)
1449 if(!it->second.empty())
1461 if(constraint_field.empty())
return;
1464 for(
unsigned i= 0;
i< set_size;
i++)
1485wxSizerItemList& slist = sizer->GetChildren();
1490 for(wxSizerItemList::iterator iter = slist.begin(); iter != slist.end(); ++iter, ++
n) {
1491 if((*iter)->IsSizer()) {
1493}
else if((*iter)->IsWindow()) {
1494wxWindow* child = (*iter)->GetWindow();
1500wxSizer* subsizer = child->GetSizer();
1523wxSizer* itemBoxSizer2 = GetSizer();
1526itemBoxSizer2->Add(m_FeatureType, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|
wxFIXED_MINSIZE, 0);
1529m_FeatureType->ListPresentFeaturesFirst(owner->
GetTopSeqEntry());
1542 if(constraint_field.empty())
return;
1543 intitype, isubtype;
1557subset.push_back(
i);
1560 if(!subset.empty())
1572 if(constraint_field.empty())
return;
1573 intitype, isubtype;
1578 for(
unsigned i= 0;
i< set_size;
i++)
1584 if(!
label.empty() && feat_iter)
1601wxSizer* itemBoxSizer2 = GetSizer();
1603wxArrayString choices;
1606m_DescType =
newwxChoice(itemPanel1, ID_DESC_CHOICE, wxDefaultPosition, wxDefaultSize, choices, 0);
1607itemBoxSizer2->Add(m_DescType, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|
wxFIXED_MINSIZE, 0);
1608m_DescType->SetSelection(0);
1623 if(ichoice == wxNOT_FOUND)
return;
1635subset.push_back(
i);
1638 if(!subset.empty())
1649 if(ichoice == wxNOT_FOUND)
1655 for(
unsigned i= 0;
i< set_size;
i++)
1666 if(!
label.empty() && !desc_label.empty())
1686wxSizer* itemBoxSizer2 = GetSizer();
1688wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
1689itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1691wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxVERTICAL);
1692itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_TOP|wxALL, 5);
1694m_Class =
newwxCheckBox(itemPanel1, ID_MOLINFO_CHKBX1,
_(
"Class"));
1695itemBoxSizer4->Add(m_Class, 0, wxALIGN_LEFT|wxALL, 5);
1697m_Type =
newwxCheckBox(itemPanel1, ID_MOLINFO_CHKBX2,
_(
"Type"));
1698itemBoxSizer4->Add(m_Type, 0, wxALIGN_LEFT|wxALL, 5);
1700m_Topology =
newwxCheckBox(itemPanel1, ID_MOLINFO_CHKBX3,
_(
"Topology"));
1701itemBoxSizer4->Add(m_Topology, 0, wxALIGN_LEFT|wxALL, 5);
1738 if(
m_Type->IsChecked() )
1762class_type_topology_to_subset[pair<int, pair<int,int> >(iclass,pair<int,int>(itype,itopology))].push_back(
i);
1765 for(
map< pair<
int, pair<int,int> >,vector<int> >::iterator it = class_type_topology_to_subset.
begin(); it != class_type_topology_to_subset.
end(); ++it)
1766 if(!it->second.empty())
1783 for(
unsigned i= 0;
i< set_size;
i++)
1803 if(
m_Type->IsChecked() )
1811 if(!
str.str().empty())
1828 if(!
str.str().empty())
1833 if(!
label.empty() && !
str.str().empty())
1850wxSizer* itemBoxSizer2 = GetSizer();
1852wxArrayString choices;
1853GetAllLabels(choices);
1854m_Label =
newwxChoice(itemPanel1, ID_STRCOMMENT_CHOICE, wxDefaultPosition, wxDefaultSize, choices, 0);
1855itemBoxSizer2->Add(m_Label, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|
wxFIXED_MINSIZE, 0);
1872 for(
unsigned i= 0;
i< set_size;
i++)
1878choices.Add(wxString(*
label));
1890CUser_object::TData::const_iterator
i= user.
GetData().begin();
1891 while(
i!= user.
GetData().end())
1897 if(!
label.empty() &&
label!=
"StructuredCommentPrefix"&&
label!=
"StructuredCommentSuffix")
1909 intichoice =
m_Label->GetSelection();
1910 if(ichoice == wxNOT_FOUND)
return;
1911 string label=
m_Label->GetString(ichoice).ToStdString();
1922subset.push_back(
i);
1925 if(!subset.empty())
1937 for(
unsigned i= 0;
i< set_size;
i++)
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
const CBioseq & GetNucFromNucProtSet(void) const
const CSeq_id * GetFirstId() const
TSeqPos GetLength(void) const
bool IsSetLength(void) const
string GetFieldType(void) const
CFieldNamePanel * GetFieldNamePanel(void)
void ListPresentFeaturesFirst(objects::CSeq_entry_Handle seh)
CRef< edit::CStringConstraint > GetStringConstraint(void)
virtual void SetClusters()
virtual void OnSelectButton(CSegregateSetsBase *win)
void OnChoiceChanged(wxCommandEvent &event)
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
void ListPresentFeaturesFirst(const objects::CSeq_entry_Handle &entry, vector< const objects::CFeatListItem * > *featlist=nullptr)
virtual void SetClusters()
CFeatureTypePanel * m_FeatureType
void OnChoiceChanged(wxCommandEvent &event)
virtual void OnSelectButton(CSegregateSetsBase *win)
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
virtual string GetFieldName(const bool subfield=false)=0
Returns the name of the field as selected in the panel.
virtual void OnSelectButton(CSegregateSetsBase *win)
void ProcessUpdateFeatEvent(wxCommandEvent &event)
void OnChoiceChanged(wxCommandEvent &event)
virtual void SetClusters()
CFieldChoicePanel * m_FieldType
void UpdateChildrenFeaturePanels(wxSizer *sizer)
virtual void OnSelectButton(CSegregateSetsBase *win)
string GetFilename(const objects::CObject_id &tag)
virtual void SetClusters()
virtual void OnSelectButton(CSegregateSetsBase *win)
virtual void SetClusters()
CStringConstraintPanel * m_StringConstraintPanel
virtual void SetClusters()
virtual void OnSelectButton(CSegregateSetsBase *win)
vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
void GetApplyObjectsValues(objects::CSeq_entry_Handle seh, const string &constraint_field, set< string > &values)
virtual void OnSelectButton(CSegregateSetsBase *win)
virtual void SetClusters()
void OnChoiceChanged(wxCommandEvent &event)
virtual void OnSelectButton(CSegregateSetsBase *win)
void OnSelect(wxCommandEvent &event)
void CollectLabels(objects::CSeq_entry_Handle seh, list< string > &strs)
map< string, vector< pair< int, string > > > m_Clusters
vector< vector< int > > m_Subsets
virtual void CreateControlsMiddle()
void OnUnselectAll(wxCommandEvent &event)
vector< vector< int > > & GetSubsets()
void SetSubsets(const set< objects::CBioseq_Handle > &selected)
void CombineLabelsAll(const CSeq_id &id, set< string > &labels)
void OnButtonMoveRight(wxCommandEvent &event)
CRBSubpanel * GetEventCaller(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
CSegregateSetsBase * GetBaseFrame()
string GetLabel(objects::CSeq_entry_Handle seh)
virtual void SetClusters()
vector< int > m_Available
void CreateControlsHeader()
virtual void OnSelectButton(CSegregateSetsBase *win)
void CreateControlsFooter()
bool MatchConstraint(CRef< objects::edit::CStringConstraint > constraint, objects::CSeq_entry_Handle seh)
void OnButtonMoveLeft(wxCommandEvent &event)
void CollectLabelsAll(CSeq_entry_Handle seh, set< string > &strs)
void CombineLabels(const objects::CSeq_id &id, vector< string > &labels)
void OnSelectAll(wxCommandEvent &event)
virtual void PopulateSet(objects::CBioseq_set &new_set, const vector< int > &subset, CBioseq_set::EClass top_class)
objects::CSeq_entry_Handle GetTopSeqEntry()
void AddUserObject(objects::CBioseq_set &se)
void TakeFromSet(objects::CBioseq_set &changed_set, CRef< objects::CSeq_entry > se)
void ReadBioseq(const objects::CSeq_entry &se)
vector< SSetSeqRecord > m_SetSeq
void MoveDescrToEntries(objects::CBioseq_set &se)
objects::CSeq_entry_Handle m_TopSeqEntry
objects::CSeq_entry_Handle GetSeqEntry(unsigned int i)
static bool ShowToolTips()
Should we show tooltips?
ICommandProccessor * m_CmdProcessor
@ ID_CSEGREGATE_FEATTYPETAB
@ ID_CSEGREGATE_NUMSETSTAB
@ ID_CSEGREGATE_STRCOMMENTTAB
@ ID_CSEGREGATE_MOLINFOTAB
@ ID_CSEGREGATE_NUMSLENTAB
@ ID_CSEGREGATE_DESCTYPETAB
void SetSubsets(const set< objects::CBioseq_Handle > &selected)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
virtual ~CSegregateSets()
Destructor.
vector< vector< int > > & GetSubsets()
virtual CRef< CCmdComposite > GetCommand()
void OnAccept(wxCommandEvent &event)
CSetClassPanel * m_SetClassPanel
CSegregateSets()
Constructors.
void OnCancel(wxCommandEvent &event)
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool Create(wxWindow *parent, wxWindowID id=ID_CSEGREGATE_SETS, const wxString &caption=_("Segregate Sets"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
static const CFeatList * GetFeatList()
void GetLabel(string *const label, ELabelType label_type) const
objects::CBioseq_set::EClass GetClass()
void SetClass(objects::CBioseq_set::EClass class_type)
CRef< edit::CStringConstraint > GetStringConstraint()
void ProcessUpdateFeatEvent(wxCommandEvent &event)
void OnChoiceChanged(wxCommandEvent &event)
void OnPageChanged(wxBookCtrlEvent &event)
virtual void SetClusters()
void UpdateChildrenFeaturePanels(wxSizer *sizer)
CConstraintPanel * m_Constraint
virtual void OnSelectButton(CSegregateSetsBase *win)
CUser_field & SetValue(int value)
set a data field to a given value Int8 and TGi values can be stored into 'str' field if the value doe...
CRef< CUser_field > SetFieldRef(const string &str, const string &delim=".", const string &obj_subtype=kEmptyStr, NStr::ECase use_case=NStr::eCase)
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator find(const key_type &key) const
const_iterator end() const
#define EVT_UPDATE_FEATURE_LIST(id, fn)
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
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.
#define ENUM_METHOD_NAME(EnumName)
@ eContent
Untagged human-readable accession or the like.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
bool IsSetInst_Mol(void) const
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.
TInst_Mol GetInst_Mol(void) const
CConstRef< CBioseq_set > GetCompleteBioseq_set(void) const
Return the complete bioseq-set object.
CBioseq_set_Handle GetParentBioseq_set(void) const
Return a handle for the parent Bioseq-set, or null handle.
TInst_Topology GetInst_Topology(void) const
CSeq_entry_Handle GetParentEntry(void) const
Return a handle for the parent seq-entry of the bioseq.
bool IsSetClass(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
bool IsSetInst_Topology(void) const
const TId & GetId(void) const
CConstRef< CBioseq_set > GetBioseq_setCore(void) const
Return core data for the bioseq-set.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
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 StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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.
@ eReverseSearch
Search in a backward direction.
@ eCase
Case sensitive compare.
static const char label[]
bool IsSetData(void) const
the object itself Check if a value has been assigned to Data data member.
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 TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
void SetType(TType &value)
Assign a value to Type data member.
const TLabel & GetLabel(void) const
Get the Label member data.
const TType & GetType(void) const
Get the Type member data.
bool CanGetLabel(void) const
Check if it is safe to call GetLabel method.
const TSeq & GetSeq(void) const
Get the variant data.
bool IsSetClass(void) const
Check if a value has been assigned to Class data member.
const TDescr & GetDescr(void) const
Get the Descr member data.
TSet & SetSet(void)
Select the variant.
bool CanGetSeq_set(void) const
Check if it is safe to call GetSeq_set method.
TClass GetClass(void) const
Get the Class member data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSetDescr(void) const
Check if a value has been assigned to Descr data member.
bool CanGetClass(void) const
Check if it is safe to call GetClass method.
bool IsSet(void) const
Check if variant Set is selected.
void ResetDescr(void)
Reset Descr data member.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
@ eClass_nuc_prot
nuc acid and coded proteins
@ eClass_genbank
converted genbank
const TUser & GetUser(void) const
Get the variant data.
const TInst & GetInst(void) const
Get the Inst member data.
TTopology GetTopology(void) const
Get the Topology member data.
bool IsSetMol(void) const
Check if a value has been assigned to Mol data member.
bool IsSetBiomol(void) const
Check if a value has been assigned to Biomol data member.
const TId & GetId(void) const
Get the Id member data.
const Tdata & Get(void) const
Get the member data.
bool IsSetInst(void) const
the sequence data Check if a value has been assigned to Inst data member.
TMol GetMol(void) const
Get the Mol member data.
E_Choice
Choice variants.
TBiomol GetBiomol(void) const
Get the Biomol member data.
bool CanGetId(void) const
Check if it is safe to call GetId method.
TUser & SetUser(void)
Select the variant.
bool IsSetId(void) const
equivalent identifiers Check if a value has been assigned to Id data member.
const TMolinfo & GetMolinfo(void) const
Get the variant data.
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
bool IsSetTopology(void) const
Check if a value has been assigned to Topology data member.
@ e_MaxChoice
== e_Modelev+1
@ e_User
user defined object
@ e_Molinfo
info on the molecule and techniques
@ e_not_set
No variant selected.
@ eMol_not_set
> cdna = rna
void ReportUsage(const wxString &dialog_name)
Report opening & accepting events in the editing package.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::CREATED created
const CConstRef< CSeq_id > GetAccession(const CSeq_id_Handle &id_handle)
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)
#define FOR_EACH_SEQENTRY_ON_SEQSET(Itr, Var)
FOR_EACH_SEQENTRY_ON_SEQSET EDIT_EACH_SEQENTRY_ON_SEQSET.
#define EDIT_EACH_SEQENTRY_ON_SEQSET(Itr, Var)
objects::CBioseq_set_Handle parent
objects::CSeq_entry_Handle entry
objects::CBioseq_set_Handle grandparent
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