A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/segregate__sets_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/packages/pkg_sequence_edit/segregate_sets.cpp Source File

51 #include <wx/button.h> 52 #include <wx/statbox.h> 53 #include <wx/stattext.h> 89

wxWindowID

id

,

const

wxString& caption,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

96  Create

(parent,

id

, caption, pos,

size

, style);

105 bool CSegregateSets::Create

( wxWindow* parent, wxWindowID

id

,

const

wxString& caption,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

108 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

109

wxFrame::Create( parent,

id

, caption, pos,

size

, style );

114

GetSizer()->SetSizeHints(

this

);

150

wxBoxSizer* itemBoxSizer1 =

new

wxBoxSizer(wxHORIZONTAL);

151

frame->SetSizer(itemBoxSizer1);

153

wxPanel* itemDialog1 =

new

wxPanel(

this

);

154

itemBoxSizer1->Add(itemDialog1, 1, wxGROW|wxALL, 0);

156

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

157

itemDialog1->SetSizer(itemBoxSizer2);

160

itemBoxSizer2->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"

));

193

itemBoxSizer2->Add(

m_SetClassPanel

, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

199

wxBoxSizer* itemBoxSizer12 =

new

wxBoxSizer(wxHORIZONTAL);

200

itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

202

wxButton* itemButton13 =

new

wxButton( itemDialog1, wxID_OK,

_

(

"Accept"

), wxDefaultPosition, wxDefaultSize, 0 );

203

itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

205

wxButton* itemButton14 =

new

wxButton( itemDialog1, wxID_CANCEL,

_

(

"Cancel"

), wxDefaultPosition, wxDefaultSize, 0 );

206

itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

208  m_LeaveUp

=

new

wxCheckBox( itemDialog1,

wxID_ANY

,

_

(

"Leave Dialog Up"

), wxDefaultPosition, wxDefaultSize, 0 );

210

itemBoxSizer12->Add(

m_LeaveUp

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

319

vector< vector<int> > &subsets =

GetSubsets

();

320  if

(

m_TopSeqEntry

&& !subsets.empty() && !subsets.front().empty())

323  int i

= subsets.front().front();

328  if

(grandparent != parent)

338

changed_set->SetSeq_set().push_back(new_se);

339

changed_set->SetClass(parent.

GetClass

());

343  for

(

unsigned int

s = 0; s < subsets.size(); s++)

356  cmd

->AddCommand(*set_cmd);

365

user.

SetType

().SetStr(

"GbenchModification"

);

367

method->

SetValue

(

"SegregateSets"

);

368

se.

SetDescr

().Set().push_back( user_object );

375  bool

user_object_present =

false

;

378  bool

title_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())

385

title_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"

)

398

user_object_present =

true

;

401

(*it)->SetDescr().Set().push_back(*desc);

412  if

(user_object_present)

423

new_set->SetClass(top_class);

425  for

(

unsigned int

j = 0; j < subset.size(); j++)

431

new_set->SetSeq_set().push_back(se);

434

new_se->

SetSet

(*new_set);

443

CBioseq_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() )

508

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

509

itemPanel1->SetSizer(itemBoxSizer2);

511

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

512

itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

514

m_TreeCtrl =

new

wxTreeCtrl(itemPanel1,

wxID_ANY

, wxDefaultPosition, wxSize(400,320),wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT|wxTR_MULTIPLE );

515

itemBoxSizer3->Add(m_TreeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

517

m_ListCtrl2 =

new

wxListCtrl( itemPanel1,

wxID_ANY

, wxDefaultPosition, wxSize(400, 320), wxLC_REPORT|wxLC_NO_HEADER );

518

itemBoxSizer3->Add(m_ListCtrl2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

519

m_ListCtrl2->InsertColumn(0,wxEmptyString,wxLIST_FORMAT_LEFT,380);

521

wxBoxSizer* itemBoxSizer4 =

new

wxBoxSizer(wxHORIZONTAL);

522

itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

524

wxButton* itemButton1 =

new

wxButton(itemPanel1, ID_RBSUB_TOLEFT,

_

(

"<<<"

), wxDefaultPosition, wxDefaultSize, 0);

525

itemBoxSizer4->Add(itemButton1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);

527

wxButton* itemButton2 =

new

wxButton( itemPanel1, ID_RBSUB_TORIGHT,

_

(

">>>"

), wxDefaultPosition, wxDefaultSize, 0 );

528

itemBoxSizer4->Add(itemButton2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 15);

537

wxSizer* itemBoxSizer2 = GetSizer();

539

wxBoxSizer* itemBoxSizer12 =

new

wxBoxSizer(wxHORIZONTAL);

540

itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

542

wxButton* itemButton13 =

new

wxButton( itemPanel1,

wxID_ANY

,

_

(

"Select"

), wxDefaultPosition, wxDefaultSize, 0 );

543

itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

545

wxButton* itemButton14 =

new

wxButton( itemPanel1,

wxID_ANY

,

_

(

"Select All"

), wxDefaultPosition, wxDefaultSize, 0 );

546

itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

548

wxButton* itemButton15 =

new

wxButton( itemPanel1,

wxID_ANY

,

_

(

"Unselect All"

), wxDefaultPosition, wxDefaultSize, 0 );

549

itemBoxSizer12->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

558

wxWindow *win = GetParent();

564

win = win->GetParent();

571  if

(

id

.IsGenbank() &&

id

.GetGenbank().IsSetAccession())

572

labels[0] =

id

.GetGenbank().GetAccession();

573  if

(

id

.IsGeneral() &&

id

.GetGeneral().IsSetDb() &&

id

.GetGeneral().GetDb() ==

"BankIt"

&&

id

.GetGeneral().IsSetTag() &&

id

.GetGeneral().GetTag().IsStr())

574

labels[1] =

id

.GetGeneral().GetTag().GetStr();

575  if

(

id

.IsGeneral() &&

id

.GetGeneral().IsSetDb() &&

id

.GetGeneral().GetDb() ==

"NCBIFILE"

&&

id

.GetGeneral().IsSetTag() &&

id

.GetGeneral().GetTag().IsStr())

576

labels[2] =

id

.GetGeneral().GetTag().GetStr();

577  if

(

id

.IsLocal() &&

id

.GetLocal().IsStr())

578

labels[3] =

id

.GetLocal().GetStr();

583

vector<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

())

600

strs.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())

609

labels.

insert

(

id

.GetGeneral().GetTag().GetStr());

610

labels.

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())

618

labels.

insert

(

id

.GetGeneral().GetTag().GetStr());

619

labels.

insert

(

"NCBIFILE"

+

id

.GetGeneral().GetTag().GetStr());

621  if

(

id

.IsLocal() &&

id

.GetLocal().IsStr())

622

labels.

insert

(

id

.GetLocal().GetStr());

633  for

(CBioseq_Handle::TId::const_iterator it = seh.

GetSeq

().

GetId

().begin(); it != seh.

GetSeq

().

GetId

().end(); ++it)

657

vector<string> vec(strs.

begin

(), strs.

end

());

658  return

constraint->DoesListMatch(vec);

669  for

(

unsigned int

k=0; k<

m_Subsets

.size(); k++)

670  for

(

unsigned int

j=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)

692

avail_to_cluster_label[s->first] = pair<string,string>(it->first,s->second);

695

wxTreeItemId 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

())

706

parent =

m_TreeCtrl

->AppendItem(root,wxString(it->first));

707

cluster_to_id[wxString(it->first)] = parent;

710

parent = cluster_to_id[wxString(it->first)];

715

vector<wxTreeItemId> to_delete;

716

wxTreeItemIdValue cookie;

717

wxTreeItemId

id

=

m_TreeCtrl

->GetFirstChild( root, cookie );

722

wxTreeItemIdValue cookie2;

723

wxTreeItemId item =

m_TreeCtrl

->GetFirstChild(

id

, cookie2 );

728

to_delete.push_back(

id

);

731  id

=

m_TreeCtrl

->GetNextChild( root, cookie);

734  for

(

size_t i

=0;

i

<to_delete.size();

i

++)

742

wxWindow *btn =

dynamic_cast<

wxWindow*

>

(

event

.GetEventObject());

746  self

=

dynamic_cast<CRBSubpanel

*

>

(btn->GetParent());

760

wxArrayTreeItemIds selection;

761  size_t

size_sel =

m_TreeCtrl

->GetSelections(selection);

762  for

(

unsigned int i

=0;

i

<size_sel;

i

++)

764

wxTreeItemId

id

= selection[

i

];

769

vector<int> cluster_subset;

770

wxTreeItemIdValue cookie;

771

wxTreeItemId item =

m_TreeCtrl

->GetFirstChild(

id

, cookie );

772  while

( item.IsOk() )

777

cluster_subset.push_back(

data

);

779

item =

m_TreeCtrl

->GetNextChild(

id

, cookie);

787

subset.push_back(

data

);

792  if

(

m_Subsets

.empty() && !subset.empty())

808

item =

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 int

k=0; k<

m_Subsets

.size(); k++)

834

wxTreeItemId root =

m_TreeCtrl

->GetRootItem();

835

wxTreeItemIdValue cookie;

836

wxTreeItemId

id

=

m_TreeCtrl

->GetFirstChild( root, cookie );

843

vector<int> cluster_subset;

844

wxTreeItemIdValue cookie2;

845

wxTreeItemId item =

m_TreeCtrl

->GetFirstChild(

id

, cookie2 );

846  while

( item.IsOk() )

851

cluster_subset.push_back(

data

);

853

item =

m_TreeCtrl

->GetNextChild(

id

, cookie2);

861

subset.push_back(

data

);

865  id

=

m_TreeCtrl

->GetNextChild( root, cookie);

868  if

(

m_Subsets

.empty() && !subset.empty())

916

wxPanel::Create( parent,

id

, pos,

size

, style );

920

GetSizer()->SetSizeHints(

this

);

950  if

(selected.

find

(bsh) != selected.

end

())

951

subset.push_back(

i

);

967

wxSizer* itemBoxSizer2 = GetSizer();

969

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

970

itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

972

wxBoxSizer* itemBoxSizer4 =

new

wxBoxSizer(wxVERTICAL);

973

itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

975

wxStaticText* itemStaticText5 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Minimum Length"

), wxDefaultPosition, wxDefaultSize, 0 );

976

itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

978

wxStaticText* itemStaticText6 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Maximum Length"

), wxDefaultPosition, wxDefaultSize, 0 );

979

itemBoxSizer4->Add(itemStaticText6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

981

wxBoxSizer* itemBoxSizer7 =

new

wxBoxSizer(wxVERTICAL);

982

itemBoxSizer3->Add(itemBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

984

m_Min =

new

wxTextCtrl(itemPanel1, ID_LENGTH_MINTEXT, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);

985

itemBoxSizer7->Add(m_Min, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

987

m_Max =

new

wxTextCtrl(itemPanel1, ID_LENGTH_MAXTEXT, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);

988

itemBoxSizer7->Add(m_Max, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

993  unsigned long

min_length = 0;

994  unsigned long

max_length = INT_MAX;

995  bool

min_num =

m_Min

->GetValue().ToULong(&min_length);

996  bool

max_num =

m_Max

->GetValue().ToULong(&max_length);

997  if

( !min_num && !max_num )

1015  if

(length >= min_length && length <= max_length)

1016

subset.push_back(

i

);

1018  if

(!subset.empty())

1027  for

(

unsigned i

= 0;

i

< set_size;

i

++)

1041  if

(!

label

.empty())

1058

wxSizer* itemBoxSizer2 = GetSizer();

1061

itemBoxSizer2->Add(m_StringConstraintPanel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|

wxFIXED_MINSIZE

, 0);

1062

m_StringConstraintPanel->SetStringSelection(

_

(

"Is one of"

));

1069  if

(!constraint)

return

;

1078

subset.push_back(

i

);

1080  if

(!subset.empty())

1089  for

(

unsigned i

= 0;

i

< set_size;

i

++)

1093  if

(!

label

.empty())

1115

wxSizer* itemBoxSizer2 = GetSizer();

1120

itemBoxSizer2->Add(m_Constraint, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

1141  string

constraint_field;

1143  if

(constraint_field_panel)

1144

constraint_field = constraint_field_panel->

GetFieldName

();

1147

constraint_field = constraint_field_type;

1150

constraint_field =

"RNA "

+ constraint_field;

1155  if

(!constraint || constraint_field.empty())

return

;

1163

vector<CRef<edit::CApplyObject> > src_objects = src_col->

GetApplyObjects

(seh, constraint_field, constraint);

1165  if

(!src_objects.empty())

1166

subset.push_back(

i

);

1168  if

(!subset.empty())

1179  string

constraint_field;

1181  if

(constraint_field_panel)

1182

constraint_field = constraint_field_panel->

GetFieldName

();

1185

constraint_field = constraint_field_type;

1188

constraint_field =

"RNA "

+ constraint_field;

1192  if

(constraint_field.empty())

return

;

1195  for

(

unsigned i

= 0;

i

< set_size;

i

++)

1232

wxSizer* itemBoxSizer2 = GetSizer();

1234

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

1235

itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

1237

wxBoxSizer* itemBoxSizer4 =

new

wxBoxSizer(wxVERTICAL);

1238

itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

1240

wxStaticText* itemStaticText5 =

new

wxStaticText( itemPanel1, wxID_STATIC,

_

(

"Number of Sets"

), wxDefaultPosition, wxDefaultSize, 0 );

1241

itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

1243

wxBoxSizer* itemBoxSizer7 =

new

wxBoxSizer(wxVERTICAL);

1244

itemBoxSizer3->Add(itemBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

1246

m_Num =

new

wxTextCtrl(itemPanel1, ID_NUM_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0);

1247

itemBoxSizer7->Add(m_Num, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

1253  unsigned long

num = 0;

1254  bool

num_exists =

m_Num

->GetValue().ToULong(&num);

1259  long

remainder = total_items % num;

1260  long

items_per_subset = total_items / num;

1266

subset.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())

1302

name =

tag

.GetStr();

1305

name = 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  string

filename =

GetFilename

(idh->GetSeqId()->GetGeneral().GetTag());

1325  if

(!filename.empty())

1326

tag_to_subset[filename].push_back(

i

);

1334  if

((*idh)->IsGeneral() && (*idh)->GetGeneral().IsSetDb() && (*idh)->GetGeneral().GetDb() ==

"NCBIFILE"

&& (*idh)->GetGeneral().IsSetTag())

1336  string

filename =

GetFilename

((*idh)->GetGeneral().GetTag());

1337  if

(!filename.empty())

1338

tag_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())

1366

filename =

GetFilename

(idh->GetSeqId()->GetGeneral().GetTag());

1374  if

((*idh)->IsGeneral() && (*idh)->GetGeneral().IsSetDb() && (*idh)->GetGeneral().GetDb() ==

"NCBIFILE"

&& (*idh)->GetGeneral().IsSetTag())

1376

filename =

GetFilename

((*idh)->GetGeneral().GetTag());

1379  if

(!

label

.empty() && !filename.empty())

1399

wxSizer* itemBoxSizer2 = GetSizer();

1401

wxPanel *container1 =

new

wxPanel( itemPanel1,

wxID_ANY

, wxDefaultPosition, wxSize(800,260), 0 );

1402

itemBoxSizer2->Add(container1, 0, wxALIGN_LEFT|wxALL|

wxFIXED_MINSIZE

, 0);

1404

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

1405

container1->SetSizer(itemBoxSizer3);

1407

vector<CFieldNamePanel::EFieldType> field_types;

1419

m_FieldType =

new CFieldChoicePanel

( container1, field_types,

true

,

false

,

wxID_ANY

, wxDefaultPosition, wxDefaultSize, 0 );

1420

itemBoxSizer3->Add(m_FieldType, 0, wxALIGN_LEFT|wxALL|

wxFIXED_MINSIZE

, 0);

1433  if

(constraint_field.empty())

return

;

1443  if

(!values.

empty

() && !values.

begin

()->empty())

1445

value_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

++)

1485

wxSizerItemList& slist = sizer->GetChildren();

1490  for

(wxSizerItemList::iterator iter = slist.begin(); iter != slist.end(); ++iter, ++

n

) {

1491  if

((*iter)->IsSizer()) {

1493

}

else if

((*iter)->IsWindow()) {

1494

wxWindow* child = (*iter)->GetWindow();

1500

wxSizer* subsizer = child->GetSizer();

1523

wxSizer* itemBoxSizer2 = GetSizer();

1526

itemBoxSizer2->Add(m_FeatureType, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|

wxFIXED_MINSIZE

, 0);

1529

m_FeatureType->ListPresentFeaturesFirst(owner->

GetTopSeqEntry

());

1542  if

(constraint_field.empty())

return

;

1543  int

itype, isubtype;

1557

subset.push_back(

i

);

1560  if

(!subset.empty())

1572  if

(constraint_field.empty())

return

;

1573  int

itype, isubtype;

1578  for

(

unsigned i

= 0;

i

< set_size;

i

++)

1584  if

(!

label

.empty() && feat_iter)

1601

wxSizer* itemBoxSizer2 = GetSizer();

1603

wxArrayString choices;

1606

m_DescType =

new

wxChoice(itemPanel1, ID_DESC_CHOICE, wxDefaultPosition, wxDefaultSize, choices, 0);

1607

itemBoxSizer2->Add(m_DescType, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|

wxFIXED_MINSIZE

, 0);

1608

m_DescType->SetSelection(0);

1623  if

(ichoice == wxNOT_FOUND)

return

;

1635

subset.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())

1686

wxSizer* itemBoxSizer2 = GetSizer();

1688

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

1689

itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

1691

wxBoxSizer* itemBoxSizer4 =

new

wxBoxSizer(wxVERTICAL);

1692

itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_TOP|wxALL, 5);

1694

m_Class =

new

wxCheckBox(itemPanel1, ID_MOLINFO_CHKBX1,

_

(

"Class"

));

1695

itemBoxSizer4->Add(m_Class, 0, wxALIGN_LEFT|wxALL, 5);

1697

m_Type =

new

wxCheckBox(itemPanel1, ID_MOLINFO_CHKBX2,

_

(

"Type"

));

1698

itemBoxSizer4->Add(m_Type, 0, wxALIGN_LEFT|wxALL, 5);

1700

m_Topology =

new

wxCheckBox(itemPanel1, ID_MOLINFO_CHKBX3,

_

(

"Topology"

));

1701

itemBoxSizer4->Add(m_Topology, 0, wxALIGN_LEFT|wxALL, 5);

1738  if

(

m_Type

->IsChecked() )

1762

class_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())

1850

wxSizer* itemBoxSizer2 = GetSizer();

1852

wxArrayString choices;

1853

GetAllLabels(choices);

1854

m_Label =

new

wxChoice(itemPanel1, ID_STRCOMMENT_CHOICE, wxDefaultPosition, wxDefaultSize, choices, 0);

1855

itemBoxSizer2->Add(m_Label, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|

wxFIXED_MINSIZE

, 0);

1872  for

(

unsigned i

= 0;

i

< set_size;

i

++)

1878

choices.Add(wxString(*

label

));

1890

CUser_object::TData::const_iterator

i

= user.

GetData

().begin();

1891  while

(

i

!= user.

GetData

().end())

1897  if

(!

label

.empty() &&

label

!=

"StructuredCommentPrefix"

&&

label

!=

"StructuredCommentSuffix"

)

1909  int

ichoice =

m_Label

->GetSelection();

1910  if

(ichoice == wxNOT_FOUND)

return

;

1911  string label

=

m_Label

->GetString(ichoice).ToStdString();

1922

subset.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