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/cdd__annot__dialog_8cpp_source.html below:

NCBI C++ ToolKit: src/app/cn3d/cdd_annot_dialog.cpp Source File

84 #include <wx/statline.h> 85 #include <wx/spinbutt.h> 86 #include <wx/spinctrl.h> 87 #include <wx/splitter.h> 88 #include <wx/listctrl.h> 89 #include <wx/treectrl.h> 90 #include <wx/notebook.h> 94 #define ID_L_ANNOT 10000 95 #define ID_B_NEW_ANNOT 10001 96 #define ID_B_HIGHLIGHT 10002 97 #define ID_B_DEFINE_MOTIF 10003 98 #define ID_B_ANNOT_UP 10004 99 #define ID_B_EDIT_ANNOT 10005 100 #define ID_B_DEL_ANNOT 10006 101 #define ID_B_DEL_MOTIF 10007 102 #define ID_B_HIGHLIGHT_MOTIF 10008 103 #define ID_B_ANNOT_DOWN 10009 104 #define ID_L_EVID 10010 105 #define ID_B_NEW_EVID 10011 106 #define ID_B_SHOW 10012 107 #define ID_B_EVID_UP 10013 108 #define ID_B_EDIT_EVID 10014 109 #define ID_B_DEL_EVID 10015 110 #define ID_B_EVID_DOWN 10016 113 #define ID_R_COMMENT 10017 114 #define ID_ST_COMMENT 10018 115 #define ID_T_COMMENT 10019 116 #define ID_LINE 10020 117 #define ID_R_PMID 10021 118 #define ID_ST_PMID 10022 119 #define ID_T_PMID 10023 120 #define ID_R_STRUCTURE 10024 121 #define ID_ST_STRUCTURE 10025 122 #define ID_T_STRUCTURE 10026 123 #define ID_B_RERANGE 10027 124 #define ID_B_EDIT_OK 10028 125 #define ID_B_EDIT_CANCEL 10029 128 #define ID_ST_TYPE 10030 129 #define ID_C_TYPE 10031 130 #define ID_CB_PUTATIVE 10032 131 #define ID_ST_DESCR2 10033 132 #define ID_CMB_DESCR 10034 133 #define ID_B_DESCR_OK 10035 134 #define ID_B_DESCR_CANCEL 10036 154 #define IS_STRUCTURE_EVIDENCE_BSANNOT(evidence) \ 155  ((evidence).IsBsannot() && \ 156  (evidence).GetBsannot().IsSetDescr() && \ 157  (evidence).GetBsannot().GetDescr().size() > 0 && \ 158  (evidence).GetBsannot().GetDescr().front()->IsOther_comment() && \ 159  (evidence).GetBsannot().GetDescr().front()->GetOther_comment() == STRUCTURE_EVIDENCE_COMMENT && \ 160  (evidence).GetBsannot().GetFeatures().size() > 0 && \ 161  (evidence).GetBsannot().GetFeatures().front()->IsSetDescr() && \ 162  (evidence).GetBsannot().GetFeatures().front()->GetDescr().size() > 0 && \ 163  (evidence).GetBsannot().GetFeatures().front()->GetDescr().front()->IsName()) 166 #define DECLARE_AND_FIND_WINDOW_RETURN_ON_ERR(var, id, type) \ 168  var = wxDynamicCast(FindWindow(id), type); \ 170  ERRORMSG("Can't find window with id "

<< id); \

174 #define DECLARE_AND_FIND_WINDOW_RETURN_FALSE_ON_ERR(var, id, type) \ 176  var = wxDynamicCast(FindWindow(id), type); \ 178  ERRORMSG("Can't find window with id "

<< id); \

189

wxDialog(parent, -1, "CDD Annotations", wxPoint(400, 100), wxDefaultSize, wxDEFAULT_DIALOG_STYLE),

190

dialogHandle(handle), structureSet(

set

), annotSet(

set

->GetCDDAnnotSet())

193  if

(annotSet.Empty()) {

202

topSizer->Fit(

this

);

203

topSizer->SetSizeHints(

this

);

204

SetClientSize(topSizer->GetMinSize());

207  if

(!ncbi::cd_utils::CStdAnnotTypes::HasTypeData()) {

209  if

(!ncbi::cd_utils::CStdAnnotTypes::LoadTypes(typeFile)) {

210

wxMessageBox(wxString(

"Warning: error parsing standard annotation types from file\n"

) + wxString(typeFile.c_str()),

211  "Missing Annotation Type Definitions"

,

212

wxOK | wxCENTRE | wxICON_WARNING,

this

);

217

SetupGUIControls(0, 0);

224  TRACEMSG

(

"destroyed CDDAnnotateDialog"

);

234

BlockMultipleAlignment::ConstBlockList::const_iterator

b

, be =

blocks

.end();

235  for

(

b

=

blocks

.begin();

b

!=be; ++

b

) {

236  int

from = (*b)->GetRangeOfRow(0)->from;

237  if

(from == (

int

) masterIndex)

239  else if

(from > (

int

) masterIndex)

255  while

(first < master->Length()) {

258  while

(first < master->Length() &&

275

intervals->push_back(interval);

282  switch

(event.GetId()) {

336  if

(event.GetEventObject() == annots)

369  int

pos = annots->GetScrollPos(wxVERTICAL);

372

CAlign_annot_set::Tdata::iterator

a

, ae =

annotSet

->Set().end();

373  for

(

a

=

annotSet

->Set().begin();

a

!=ae; ++

a

) {

374

descr =

"(no description)"

;

375  if

((*a)->IsSetDescription() && (*a)->GetDescription().length() > 0)

376

descr = (*a)->GetDescription().c_str();

380  if

((*a)->GetType() > 0) {

381

typeStr =

" ["

+ typeStr +

" Site]"

;

382

descr += wxString(typeStr.c_str());

386

annots->Append(descr,

a

->GetPointer());

389  if

(selectAnnot < (

int

) annots->GetCount())

390

annots->SetSelection(selectAnnot);

391  else if

(annots->GetCount() > 0)

392

annots->SetSelection(0);

393  if

(annots->GetCount() > 0)

394

selectedAnnot =

reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

395

annots->SetFirstItem(pos);

398

pos = evids->GetScrollPos(wxVERTICAL);

402

CAlign_annot::TEvidence::iterator e, ee = selectedAnnot->

SetEvidence

().end();

403  for

(e=selectedAnnot->

SetEvidence

().begin(); e!=ee; ++e) {

406  if

((*e)->IsComment())

407

evidTitle.Printf(

"Comment: %s"

, (*e)->GetComment().c_str());

408  else if

((*e)->IsReference() && (*e)->GetReference().IsPmid())

409

evidTitle.Printf(

"PMID: %i"

, (*e)->GetReference().GetPmid().Get());

411

evidTitle.Printf(

"Structure: %s"

,

412

(*e)->GetBsannot().GetFeatures().front()->GetDescr().front()->GetName().c_str());

414

evidTitle =

"(unknown type)"

;

415

evids->Append(evidTitle, e->GetPointer());

417  if

(selectEvidence < (

int

) evids->GetCount())

418

evids->SetSelection(selectEvidence);

419  else if

(evids->GetCount() > 0)

420

evids->SetSelection(0);

421  if

(evids->GetCount() > 0)

422

selectedEvid =

reinterpret_cast<CFeature_evidence

*

>

(evids->GetClientData(evids->GetSelection()));

423

evids->SetFirstItem(pos);

427

bNewAnnot->Enable(!readOnly);

428

bDelAnnot->Enable(selectedAnnot !=

NULL

&& !readOnly);

429

bEditAnnot->Enable(selectedAnnot !=

NULL

&& !readOnly);

431

bNewEditMotif->SetLabel(

"Edit Motif"

);

433

bNewEditMotif->SetLabel(

"New Motif"

);

434

bNewEditMotif->Enable(selectedAnnot !=

NULL

&& !readOnly);

435

bDelMotif->Enable(selectedAnnot !=

NULL

&& !readOnly && selectedAnnot->

IsSetMotif

());

436

bHighlight->Enable(selectedAnnot !=

NULL

);

437

bHighlightMotif->Enable(selectedAnnot !=

NULL

&& selectedAnnot->

IsSetMotif

());

438

bAnnotUp->Enable(annots->GetSelection() > 0 && !readOnly);

439

bAnnotDown->Enable(annots->GetSelection() < ((

int

) annots->GetCount()) - 1 && !readOnly);

440

bNewEvid->Enable(selectedAnnot !=

NULL

&& !readOnly);

441

bDelEvid->Enable(selectedEvid !=

NULL

&& !readOnly);

442

bEditEvid->Enable(selectedEvid !=

NULL

&& !readOnly);

443

bShow->Enable(selectedEvid !=

NULL

&&

446

bEvidUp->Enable(evids->GetSelection() > 0 && !readOnly);

447

bEvidDown->Enable(evids->GetSelection() < ((

int

) evids->GetCount()) - 1 && !readOnly);

454  if

(intervals.size() == 0) {

455  ERRORMSG

(

"No aligned+highlighted master residues!"

);

461  int result

= dialog.ShowModal();

462  if

(

result

== wxCANCEL)

return

;

467  string

descr = (annot->IsSetDescription()) ? annot->GetDescription() :

kEmptyStr

;

468  if

(!getDataResult || descr.size() == 0)

return

;

471  if

(intervals.size() == 1) {

472

annot->SetLocation().SetInt(*(intervals.front()));

475

packed->

Set

() = intervals;

476

annot->SetLocation().SetPacked_int(*packed);

491  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

493  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

494  if

(!selectedAnnot) {

495  ERRORMSG

(

"CDDAnnotateDialog::DeleteAnnotation() - error getting annotation pointer"

);

500  int

confirm = wxMessageBox(

"This will remove the selected annotation and all the\n" 501  "evidence associated with it. Is this correct?"

,

"Confirm"

, wxOK | wxCANCEL | wxCENTRE,

this

);

502  if

(confirm != wxOK)

return

;

505

CAlign_annot_set::Tdata::iterator

a

, ae =

annotSet

->Set().end();

506  for

(

a

=

annotSet

->Set().begin();

a

!=ae; ++

a

) {

507  if

(*

a

== selectedAnnot) {

524  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

526  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

527  if

(!selectedAnnot) {

528  ERRORMSG

(

"CDDAnnotateDialog::EditAnnotation() - error getting annotation pointer"

);

534  if

(intervals.size() > 0) {

536  int

move = wxMessageBox(

"Do you want to move the annotation to the currently\n" 537  "highlighted and aligned residues?"

,

"Move?"

, wxYES_NO | wxCANCEL | wxCENTRE,

this

);

538  if

(move == wxCANCEL)

540  else if

(move == wxYES) {

542  if

(intervals.size() == 1) {

543

selectedAnnot->

SetLocation

().SetInt(*(intervals.front()));

546

packed->

Set

() = intervals;

547

selectedAnnot->

SetLocation

().SetPacked_int(*packed);

554  int

initialType = wxNOT_FOUND, finalType = wxNOT_FOUND;

560  int result

= dialog.ShowModal();

562  bool

getDataResult = dialog.

GetData

(selectedAnnot);

568  if

(initialType == wxNOT_FOUND) {

571

selectedAnnot->

SetType

(initialType);

574  ERRORMSG

(

"CDDAnnotateDialog::EditAnnotation() - edited annotation must have a non-empty description\nAnnotation is unchanged."

);

578  if

(getDataResult && ((initialType != finalType) || (finalDescr != initialDescr))) {

596  string

highlightedResidues;

598  if

(highlightedSeqIndicesPtr) highlightedSeqIndicesPtr->

clear

();

600

Sequence::MoleculeHighlightMap::const_iterator

r

= restrictTo.find(sequence.

identifier

);

601  if

(

r

!= restrictTo.end()) {

602  for

(;

i

<

len

; ++

i

) {

603  if

(

r

->second[

i

]) {

605  if

(highlightedSeqIndicesPtr) highlightedSeqIndicesPtr->

insert

(

i

);

611  if

(highlightedResidues.length() > 0) {

623  if

(!structureSet || regexPattern.length() == 0 || restrictTo.size() == 0)

return

0;

626  unsigned int

nRowsMatched = 0;

632  for

(

unsigned int i

=0;

i

<alignment->

NRows

(); ++

i

) {

635  if

(!sequence || usedSequences.

find

(sequence) != usedSequences.

end

())

continue

;

636

usedSequences[sequence] =

true

;

654  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

656  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

657  if

(!selectedAnnot) {

658  ERRORMSG

(

"CDDAnnotateDialog::NewOrEditMotif() - error getting annotation pointer"

);

662  bool

isMotifValid =

true

;

663  bool

wasMotifSet = selectedAnnot->

IsSetMotif

();

664  int

status = wxID_CANCEL, nGroups = 0;

666  TSeqPos

annotationLength = 0, patternLength = 0;

667

wxString

msg

, labelText;

668

wxString originalMotif = (wasMotifSet) ? selectedAnnot->

GetMotif

().c_str() :

""

;

669

wxString title = (wasMotifSet && originalMotif.length() > 0) ?

"Edit Motif"

:

"New Motif"

;

674  string

annotatedMasterResidues, masterSequence = master->

sequenceString

;

679  if

(to < masterSequence.length()) {

680  for

(; from <= to; ++from) annotatedMasterResidues += masterSequence[from];

683

CPacked_seqint::Tdata::iterator s,

684

se = selectedAnnot->

SetLocation

().SetPacked_int().Set().end();

685  for

(s=selectedAnnot->

SetLocation

().SetPacked_int().Set().begin(); s!=se; ++s) {

686

annotationLength += (**s).GetLength();

687

from = (**s).GetFrom();

689  if

(to < masterSequence.length()) {

690  for

(; from <= to; ++from) annotatedMasterResidues += masterSequence[from];

700

dialog.SetTitle(title);

701

dialog.

m_Pattern

->SetValue(originalMotif);

702

dialog.

m_Pattern

->SetSelection(-1, -1);

703

dialog.

m_Mode

->SetStringSelection(

"Within"

);

704

dialog.

m_Mode

->Show(

false

);

709  if

(annotatedMasterResidues.length() > 0) {

713

wxString defaultMotif(annotatedMasterResidues.c_str());

714

dialog.

m_Pattern

->SetValue(defaultMotif);

717

labelText = dialog.

m_Text

->GetLabelText();

718

annotatedMasterResidues =

"\n[Annotated residues on master: "

+ annotatedMasterResidues +

"]\n"

;

719

labelText += wxString(annotatedMasterResidues.c_str());

720

dialog.

m_Text

->SetLabel(labelText);

724

status = dialog.ShowModal();

726  if

(status != wxID_OK)

729

wxString newMotif = dialog.

m_Pattern

->GetValue();

730  string

prositePattern(newMotif.c_str()), regexPattern;

735  if

(prositePattern[prositePattern.size() - 1] !=

'.'

) prositePattern +=

'.'

;

737  if

(newMotif.size() == 0 || newMotif == originalMotif)

739  else if

(patternLength == 0) {

740  msg

.Printf(

"The entered motif\n\n%s\n\ndoes not specify a valid Cn3D motif.\nMotif not created/modified."

, newMotif.c_str());

741

wxMessageBox(

msg

,

"Invalid Motif Specification"

, wxOK | wxICON_WARNING | wxCENTRE,

this

);

743

}

else if

(patternLength != annotationLength) {

744  msg

.Printf(

"The entered motif\n\n%s\n\nmust define the same number of residues as the annotation (%d).\nMotif not created/modified."

, newMotif.c_str(), annotationLength);

745

wxMessageBox(

msg

,

"Wrong Motif Length"

, wxOK | wxICON_WARNING | wxCENTRE,

this

);

747

}

else if

(!

Prosite2Regex

(prositePattern, &regexPattern, &nGroups)) {

748  msg

.Printf(

"The entered motif\n\n%s\n\ndid not parse as valid ProSite syntax.\nMotif not created/modified."

, newMotif.c_str());

749

wxMessageBox(

msg

,

"Motif Parsing Error"

, wxOK | wxICON_WARNING | wxCENTRE,

this

);

766  if

(nMatchesTotal == 0) {

767  msg

.Printf(

"For the entered motif\n\n%s\n\nno matches to annotated columns were found.\nMotif not created/modified."

, newMotif.c_str());

768

wxMessageBox(

msg

,

"Motif Not Found"

, wxOK | wxICON_WARNING | wxCENTRE,

this

);

770

}

else if

(!isMotifValid) {

772  msg

.Printf(

"The entered motif\n\n%s\n\ndid not satisfy validity checks.\nMotif not created/modified."

, newMotif.c_str());

773

wxMessageBox(

msg

,

"Motif Failed Validity Checks"

, wxOK | wxICON_WARNING | wxCENTRE,

this

);

791  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

793  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

794  if

(!selectedAnnot) {

795  ERRORMSG

(

"CDDAnnotateDialog::DeleteMotif() - error getting annotation pointer"

);

814  ERRORMSG

(

"CDDAnnotateDialog::HighlightInterval() - interval Seq-id/master sequence mismatch"

);

827  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

829  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

830  if

(!selectedAnnot) {

831  ERRORMSG

(

"CDDAnnotateDialog::HighlightAnnotation() - error getting annotation pointer"

);

841

CPacked_seqint::Tdata::iterator s,

842

se = selectedAnnot->

SetLocation

().SetPacked_int().Set().end();

843  for

(s=selectedAnnot->

SetLocation

().SetPacked_int().Set().begin(); s!=se; ++s) {

849

wxMessageBox(

"WARNING: this annotation specifies master residues outside the aligned blocks;" 850  " see the message log for details."

,

"Annotation Error"

,

851

wxOK | wxCENTRE | wxICON_ERROR,

this

);

859  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

861  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

862  if

(!selectedAnnot) {

863  ERRORMSG

(

"CDDAnnotateDialog::HighlightMotif() - error getting annotation pointer"

);

870  unsigned int

patternLength;

872  string

prositePattern, regexPattern;

873

prositePattern = selectedAnnot->

GetMotif

();

877  if

(prositePattern[prositePattern.size() - 1] !=

'.'

) prositePattern +=

'.'

;

880  if

(patternLength == 0) {

881  msg

.Printf(

"The motif '%s' \n\ndoes not specify a valid Cn3D motif."

, prositePattern.c_str());

882

wxMessageBox(

msg

,

"Invalid Motif Specification"

, wxOK | wxICON_WARNING | wxCENTRE,

this

);

884

}

else if

(!

Prosite2Regex

(prositePattern, &regexPattern, &nGroups)) {

885  msg

.Printf(

"The motif '%s'\n\ndid not parse as valid ProSite syntax."

, prositePattern.c_str());

886

wxMessageBox(

msg

,

"Motif Parsing Error"

, wxOK | wxICON_WARNING | wxCENTRE,

this

);

900  if

(nMatchesTotal == 0) {

901  msg

.Printf(

"For the motif '%s'\n\nno matches to annotated columns were found."

, selectedAnnot->

GetMotif

().c_str());

902

wxMessageBox(

msg

,

"Motif Not Found"

, wxOK | wxICON_WARNING | wxCENTRE,

this

);

911  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

913  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

914  if

(!selectedAnnot) {

915  ERRORMSG

(

"CDDAnnotateDialog::MoveAnnotation() - error getting annotation pointer"

);

919

CAlign_annot_set::Tdata::iterator

a

, ae =

annotSet

->Set().end(), aPrev = ae, aSwap = ae;

921  for

(

a

=

annotSet

->Set().begin();

a

!=ae; ++

a

) {

923  if

(*

a

== selectedAnnot) {

925  if

(moveUp && aPrev != ae)

927  else if

(!moveUp && (++(aSwap =

a

)) != ae)

937  SetupGUIControls

(annots->GetSelection() + (moveUp ? -1 : 1), evids->GetSelection());

944  ERRORMSG

(

"CDDAnnotateDialog::MoveAnnotation() - error finding selected annotation"

);

952  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

954  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

955  if

(!selectedAnnot) {

956  ERRORMSG

(

"CDDAnnotateDialog::NewEvidence() - error getting annotation pointer"

);

962

newEvidence->SetComment(

""

);

966  int result

= dialog.ShowModal();

971

selectedAnnot->

SetEvidence

().push_back(newEvidence);

975  ERRORMSG

(

"CDDAnnotateDialog::NewEvidence() - error getting dialog data"

);

983  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

985  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

986  if

(!selectedAnnot) {

987  ERRORMSG

(

"CDDAnnotateDialog::DeleteEvidence() - error getting annotation pointer"

);

993  if

(evids->GetCount() == 0 || evids->GetSelection() < 0)

return

;

995  reinterpret_cast<CFeature_evidence

*

>

(evids->GetClientData(evids->GetSelection()));

996  if

(!selectedEvidence) {

997  ERRORMSG

(

"CDDAnnotateDialog::DeleteEvidence() - error getting evidence pointer"

);

1002  int

confirm = wxMessageBox(

"This will remove the selected evidence from\n" 1003  "the selected annotation. Is this correct?"

,

"Confirm"

, wxOK | wxCANCEL | wxCENTRE,

this

);

1004  if

(confirm != wxOK)

return

;

1007

CAlign_annot::TEvidence::iterator e, ee = selectedAnnot->

SetEvidence

().end();

1008  for

(e=selectedAnnot->

SetEvidence

().begin(); e!=ee; ++e) {

1009  if

(*e == selectedEvidence) {

1016  ERRORMSG

(

"CDDAnnotateDialog::DeleteEvidence() - evidence pointer not found in annotation"

);

1028  if

(evids->GetCount() == 0 || evids->GetSelection() < 0)

return

;

1030  reinterpret_cast<CFeature_evidence

*

>

(evids->GetClientData(evids->GetSelection()));

1031  if

(!selectedEvidence) {

1032  ERRORMSG

(

"CDDAnnotateDialog::DeleteEvidence() - error getting evidence pointer"

);

1038  int result

= dialog.ShowModal();

1042  if

(dialog.

GetData

(selectedEvidence)) {

1047  ERRORMSG

(

"CDDAnnotateDialog::EditEvidence() - error getting dialog data"

);

1060  if

(!annot.

IsSetId

() || annot.

GetId

().size() == 0 || !annot.

GetId

().front()->IsMmdb_id())

1061  throw "no MMDB ID found in annotation"

;

1062  int

mmdbID = annot.

GetId

().front()->GetMmdb_id().Get();

1066

ObjectMap annotObjects;

1070  if

(!alignment)

throw "no alignment"

;

1073  if

(alignedBlocks.size() == 0)

throw "no aligned blocks"

;

1082

ci.

from

= alignedBlocks.front()->GetRangeOfRow(

row

)->from;

1083

ci.

to

= alignedBlocks.back()->GetRangeOfRow(

row

)->to;

1086  if

(annotObjects.size() == 0)

1087  throw "no chain of annotation's MMDB ID in the alignment"

;

1091  set

->styleManager->GetGlobalStyle().SaveSettingsToASN(&globalStyleSettings);

1095

annot.

GetFeatures

().front()->GetFeatures().size() > 0 &&

1096

annot.

GetFeatures

().front()->GetFeatures().front()->IsSetLocation() &&

1097

annot.

GetFeatures

().front()->GetFeatures().front()->GetLocation().IsSubgraph() &&

1098

annot.

GetFeatures

().front()->GetFeatures().front()->GetLocation().

1099

GetSubgraph().IsResidues() &&

1100

annot.

GetFeatures

().front()->GetFeatures().front()->GetLocation().

1101

GetSubgraph().GetResidues().IsInterval() &&

1102

annot.

GetFeatures

().front()->GetFeatures().front()->GetLocation().

1103

GetSubgraph().GetResidues().GetInterval().

size

() > 0)

1106

ObjectMap::iterator o, oe = annotObjects.

end

();

1107

CResidue_pntrs::TInterval::const_iterator

i

, ie =

1108

annot.

GetFeatures

().front()->GetFeatures().front()->GetLocation().

1109

GetSubgraph().GetResidues().GetInterval().end();

1110  for

(

i

=annot.

GetFeatures

().front()->GetFeatures().front()->GetLocation().GetSubgraph().GetResidues().GetInterval().begin();

i

!=ie; ++

i

)

1113  for

(o=annotObjects.begin(); o!=oe; ++o) {

1116

ChemicalGraph::MoleculeMap::const_iterator

1117

m = o->first->graph->molecules.find((*i)->GetMolecule_id().Get());

1118  if

(m == o->first->graph->molecules.end())

1119  throw "molecule with annotation's specified molecule ID not found in object"

;

1122  if

(m->second->IsProtein()) {

1128

}

else if

(m->second->IsNucleotide()) {

1134

}

else if

(m->second->IsSolvent()) {

1135

globalStyleSettings.

SetSolvents

().SetIs_on(

true

);

1136

}

else if

(m->second->IsHeterogen()) {

1141  if

(o == annotObjects.begin()) {

1142  if

((*i)->GetFrom().Get() >= 1 && (*i)->GetFrom().Get() <= (

int

)m->second->NResidues() &&

1143

(*i)->GetTo().Get() >= 1 && (*i)->GetTo().Get() <= (

int

)m->second->NResidues() &&

1144

(*i)->GetFrom().Get() <= (*i)->GetTo().Get())

1147  throw "annotation's residue ID out of molecule's residue range"

;

1150  for

(

int r

=(*i)->GetFrom().Get();

r

<=(*i)->GetTo().Get(); ++

r

) {

1152  if

(o->second.alignedMoleculeID == m->second->id &&

r

>= o->second.from && r <= o->second.to)

1158  set

->styleManager->SetGlobalStyle(globalStyleSettings);

1162  for

(o=annotObjects.begin(); o!=oe; ++o)

1163  if

(!bestObject || o->second.hits > annotObjects[bestObject].hits)

1164

bestObject = o->first;

1168  throw "unrecognized annotation structure"

;

1170

}

catch

(

const char

*err) {

1171  ERRORMSG

(

"HighlightResidues() - "

<< err);

1180  if

(evids->GetCount() == 0 || evids->GetSelection() < 0)

return

;

1182  reinterpret_cast<CFeature_evidence

*

>

(evids->GetClientData(evids->GetSelection()));

1183  if

(!selectedEvidence) {

1184  ERRORMSG

(

"CDDAnnotateDialog::ShowEvidence() - error getting evidence pointer"

);

1191

url.Printf(

"https://www.ncbi.nlm.nih.gov/pubmed/%i"

, selectedEvidence->

GetReference

().

GetPmid

().

Get

());

1204  if

((*o)->mmdbID != bestObject->

mmdbID

) {

1210

ChemicalGraph::MoleculeMap::const_iterator m, me = (*o)->graph->molecules.end();

1211  for

(m=(*o)->graph->molecules.begin(); m!=me; ++m)

1222  unsigned int

displayList = bestObject->

graph

->

molecules

.find(1)->second->displayLists.front();

1226  if

(*d == displayList) {

1236  "Structure Evidence"

, wxOK | wxCENTRE,

this

);

1240  else if

(selectedEvidence->

IsComment

()) {

1241

wxMessageBox(selectedEvidence->

GetComment

().c_str(),

"Comment"

, wxOK | wxCENTRE,

this

);

1245  ERRORMSG

(

"CDDAnnotateDialog::ShowEvidence() - can't show that evidence type"

);

1255  if

(annots->GetCount() == 0 || annots->GetSelection() < 0)

return

;

1257  reinterpret_cast<CAlign_annot

*

>

(annots->GetClientData(annots->GetSelection()));

1258  if

(!selectedAnnot) {

1259  ERRORMSG

(

"CDDAnnotateDialog::MoveEvidence() - error getting annotation pointer"

);

1264  if

(evids->GetCount() == 0 || evids->GetSelection() < 0)

return

;

1266  reinterpret_cast<CFeature_evidence

*

>

(evids->GetClientData(evids->GetSelection()));

1267  if

(!selectedEvidence) {

1268  ERRORMSG

(

"CDDAnnotateDialog::MoveEvidence() - error getting evidence pointer"

);

1272

CAlign_annot::TEvidence::iterator e, ee = selectedAnnot->

SetEvidence

().end(), ePrev = ee, eSwap = ee;

1274  for

(e=selectedAnnot->

SetEvidence

().begin(); e!=ee; ++e) {

1276  if

(*e == selectedEvidence) {

1278  if

(moveUp && ePrev != ee)

1280  else if

(!moveUp && (++(eSwap = e)) != ee)

1290  SetupGUIControls

(annots->GetSelection(), evids->GetSelection() + (moveUp ? -1 : 1));

1309

wxDialog(parent, -1, "CDD Annotations", wxPoint(400, 100), wxDefaultSize, wxDEFAULT_DIALOG_STYLE),

1316

topSizer->Fit(

this

);

1317

topSizer->SetSizeHints(

this

);

1320  if

(initial.IsComment()) {

1323

rComment->SetValue(

true

);

1324

tComment->SetValue(initial.GetComment().c_str());

1325

tComment->SetFocus();

1326

}

else if

(initial.IsReference() && initial.GetReference().IsPmid()) {

1329

rPMID->SetValue(

true

);

1331

pmid.Printf(

"%i"

, initial.GetReference().GetPmid().Get());

1332

tPMID->SetValue(pmid);

1337

rSTRUCTURE->SetValue(

true

);

1338

tSTRUCTURE->SetValue(

1339

initial.GetBsannot().GetFeatures().front()->GetDescr().front()->GetName().c_str());

1341  ERRORMSG

(

"CDDEvidenceDialog::CDDEvidenceDialog() - " 1342  "don't (yet) know how to edit this evidence type"

);

1356  switch

(event.GetId()) {

1392

tComment->Enable(rComment->GetValue());

1394

tPMID->Enable(rPMID->GetValue());

1396

tStructure->Enable(rStructure->GetValue());

1397

bStructure->Enable(rStructure->GetValue());

1406  if

(rComment->GetValue()) {

1408  if

(tComment->GetValue().size() > 0) {

1409

evidence->SetComment(

WX_TO_STD

(tComment->GetValue()));

1412  ERRORMSG

(

"CDDEvidenceDialog::GetData() - comment must not be zero-length"

);

1417  else if

(rPMID->GetValue()) {

1420  if

(tPMID->GetValue().ToULong(&pmid)) {

1421

evidence->SetReference().SetPmid().Set(pmid);

1424  ERRORMSG

(

"CDDEvidenceDialog::GetData() - PMID must be a positive integer"

);

1429  else if

(rSTRUCTURE->GetValue()) {

1432  if

(!evidence->IsBsannot() ||

rerange

) {

1436

evidence->SetBsannot(*ref);

1443

evidence->SetBsannot().SetDescr().clear();

1444

evidence->SetBsannot().SetDescr().push_front(descr);

1447

name->SetName(

WX_TO_STD

(tSTRUCTURE->GetValue()));

1448

evidence->SetBsannot().SetFeatures().front()->SetDescr().clear();

1449

evidence->SetBsannot().SetFeatures().front()->SetDescr().push_front(name);

1453  ERRORMSG

(

"CDDEvidenceDialog::GetData() - unknown evidence type"

);

1472

wxDialog(parent, -1, title.c_str(), wxPoint(400, 100), wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),

1475  bool

isPutative =

false

;

1476  bool

isPredefDescr =

false

;

1478  int

predefType, predefTypeIndex;

1485

topSizer->Fit(

this

);

1486

topSizer->SetSizeHints(

this

);

1493  if

(predefinedSites.empty() && ncbi::cd_utils::CStdAnnotTypes::HasTypeData()) {

1494

PopulatePredefinedSitesMap();

1498  if

(!isTypeDataRead && predefinedSites.empty()) {

1499  string

message =

"Predefined types & names are unavailable;\nonly annotations of type 'Other' may be created.\n\nCheck that the file '"

+

STD_ANNOT_TYPES_FILE

+

"' is present in the Cn3D 'data' directory."

;

1500

wxMessageBox(message.c_str(),

"Predefined Types/Names Unavailable"

, wxICON_EXCLAMATION | wxCENTRE,

this

);

1504

cType->Append(cit->second.first);

1509  if

(initial.IsSetType()) {

1510  if

(ncbi::cd_utils::CStdAnnotTypes::IsValidType(initial.GetType())) {

1511  type

= initial.GetType();

1514  if

(initial.IsSetDescription() && !initial.GetDescription().empty()) {

1516

descr = wxString(initial.GetDescription().c_str());

1520

descr = descr.Mid(8);

1521

descr.Trim(

false

);

1523

isPredefDescr = ncbi::cd_utils::CStdAnnotTypes::IsPredefinedDescr(

string

(descr.c_str()), predefType, predefTypeIndex);

1524  if

(isPredefDescr) {

1525  if

(initial.IsSetType() && (

type

!= predefType)) {

1526  WARNINGMSG

(

"CDDTypedAnnotDialog::CDDTypedAnnotDialog() - stored type inconsistent with descriptions's designated type"

);

1533

cType->SetSelection(

type

);

1534

AdjustComboboxForType(

type

);

1535

cbPutative->SetValue(isPutative);

1536  if

(isPredefDescr) {

1537

cmbDescr->SetSelection(predefTypeIndex);

1538

}

else if

(descr.length() > 0) {

1539

cmbDescr->SetValue(descr);

1541

cmbDescr->SetSelection(wxNOT_FOUND);

1543

cmbDescr->SetFocus();

1553

ncbi::cd_utils::TStandardTypesData::const_iterator rtCit = rawTypeData.begin();

1554

ncbi::cd_utils::TStandardTypesData::const_iterator rtCend = rawTypeData.end();

1557  for

(; rtCit != rtCend; ++rtCit) {

1558

typeName = wxString(rtCit->second.first.c_str());

1561  if

(rtCit->first == ncbi::cd_utils::CStdAnnotTypes::m_invalidType || rtCit->first < 0) {

1562  WARNINGMSG

(

"CDDTypedAnnotDialog::PopulatePredefinedSitesMap() - invalid code specified for type "

<< rtCit->second.first <<

"; skipped"

);

1567

p.second.Add(vit->c_str());

1576  int

sel = cmbDescr->GetSelection();

1577

wxString existingDescr = cmbDescr->GetValue();

1582

cmbDescr->Append(cit->second.second);

1587  if

(sel == wxNOT_FOUND) {

1588

cmbDescr->SetValue(existingDescr);

1590

cmbDescr->SetSelection(wxNOT_FOUND);

1602  switch

(event.GetId()) {

1632  static const string

ws(

" \t\n\r"

);

1633  static const string

leading(

" \t\n\r.,;:!@#$%^&\\|/?}])>"

);

1634  static const string

trailing(

" \t\n\r.,;:!@#$%^&\\|/?{[(<"

);

1637  if

(!alignAnnot)

return result

;

1643  bool

isPredefDescr =

false

;

1644  bool

isPutative = cbPutative->GetValue();

1645  int

predefType, predefTypeIndex;

1646  int type

= cType->GetSelection();

1647  string

descr =

string

(cmbDescr->GetValue().c_str());

1651  SIZE_TYPE

firstGoodChar = descr.find_first_not_of(leading);

1652  if

(firstGoodChar !=

NPOS

&& firstGoodChar > 0) {

1653

descr = descr.substr(firstGoodChar);

1655  SIZE_TYPE

lastGoodChar = descr.find_last_not_of(trailing);

1656  if

(lastGoodChar !=

NPOS

&& lastGoodChar < descr.size() - 1) {

1657

descr = descr.substr(0, lastGoodChar + 1);

1661

vector<string> tokens;

1663  if

(tokens.size() > 0) {

1665  for

(

unsigned int i

= 1;

i

< tokens.size(); ++

i

) {

1666

descr +=

" "

+ tokens[

i

];

1675

descr = descr.substr(8);

1683

predefType = wxNOT_FOUND;

1684  if

(ncbi::cd_utils::CStdAnnotTypes::IsPredefinedDescr(descr, predefType, predefTypeIndex,

true

)) {

1685

isPredefDescr =

true

;

1686

}

else if

(ncbi::cd_utils::CStdAnnotTypes::IsPredefinedDescr(descr, predefType, predefTypeIndex,

false

)) {

1689  if

(ncbi::cd_utils::CStdAnnotTypes::GetTypeNames(predefType,

names

) && predefTypeIndex < (

int

)

names

.size()) {

1690

descr =

names

[predefTypeIndex];

1691

isPredefDescr =

true

;

1700  if

(isPredefDescr) {

1701  if

(

type

!= predefType) {

1705

message.Printf(

"The predefined description '%s' corresponds to type '%s' and will be changed from your chosen type '%s'.\n" 1706  "Press 'OK' to reassign to the standard type '%s'.\nPress 'Cancel' to return and not create/edit the annotation.\n"

,

1707

cmbDescr->GetValue().c_str(), predefTypeStr.c_str(), typeChosen.c_str(), predefTypeStr.c_str());

1708  int

reply = wxMessageBox(message,

"Inconsistent type"

, wxOK | wxCANCEL | wxCENTRE,

this

);

1709  if

(reply == wxOK) {

1717  if

(descr.length() > 0) {

1720

descr =

"putative "

+ descr;

1722

alignAnnot->SetDescription(descr);

1723

alignAnnot->SetType(

type

);

1742

wxBoxSizer *item0 =

new

wxBoxSizer( wxVERTICAL );

1744

wxFlexGridSizer *item1 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

1746

wxStaticBox *item3 =

new

wxStaticBox( parent, -1,

wxT

(

"Annotations"

) );

1747

wxStaticBoxSizer *item2 =

new

wxStaticBoxSizer( item3, wxVERTICAL );

1749

wxString *strs4 = (wxString*)

NULL

;

1750

wxListBox *item4 =

new

wxListBox( parent,

ID_L_ANNOT

, wxDefaultPosition, wxSize(350,100), 0, strs4, wxLB_SINGLE|wxLB_HSCROLL|wxLB_NEEDED_SB|wxHSCROLL );

1751

item2->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1753

wxGridSizer *item5 =

new

wxGridSizer( 3, 0, 0, 0 );

1755

wxButton *item6 =

new

wxButton( parent,

ID_B_NEW_ANNOT

,

wxT

(

"New"

), wxDefaultPosition, wxDefaultSize, 0 );

1756

item5->Add( item6, 0, wxALIGN_CENTER|wxALL, 5 );

1758

wxButton *item7 =

new

wxButton( parent,

ID_B_HIGHLIGHT

,

wxT

(

"Highlight"

), wxDefaultPosition, wxDefaultSize, 0 );

1759

item5->Add( item7, 0, wxALIGN_CENTER|wxALL, 5 );

1761

wxButton *item8 =

new

wxButton( parent,

ID_B_ANNOT_UP

,

wxT

(

"Move Up"

), wxDefaultPosition, wxDefaultSize, 0 );

1762

item5->Add( item8, 0, wxALIGN_CENTER|wxALL, 5 );

1764

wxButton *item9 =

new

wxButton( parent,

ID_B_EDIT_ANNOT

,

wxT

(

"Edit"

), wxDefaultPosition, wxDefaultSize, 0 );

1765

item5->Add( item9, 0, wxALIGN_CENTER|wxALL, 5 );

1767

wxButton *item10 =

new

wxButton( parent,

ID_B_DEL_ANNOT

,

wxT

(

"Delete"

), wxDefaultPosition, wxDefaultSize, 0 );

1768

item5->Add( item10, 0, wxALIGN_CENTER|wxALL, 5 );

1770

wxButton *item11 =

new

wxButton( parent,

ID_B_ANNOT_DOWN

,

wxT

(

"Move Down"

), wxDefaultPosition, wxDefaultSize, 0 );

1771

item5->Add( item11, 0, wxALIGN_CENTER|wxALL, 5 );

1773

wxButton *item12 =

new

wxButton( parent,

ID_B_DEFINE_MOTIF

,

wxT

(

"Define Motif"

), wxDefaultPosition, wxDefaultSize, 0 );

1774

item5->Add( item12, 0, wxALIGN_CENTER|wxALL, 5 );

1776

wxButton *item13 =

new

wxButton( parent,

ID_B_HIGHLIGHT_MOTIF

,

wxT

(

"Highlight Motif"

), wxDefaultPosition, wxDefaultSize, 0 );

1777

item5->Add( item13, 0, wxALIGN_CENTER|wxALL, 5 );

1779

wxButton *item14 =

new

wxButton( parent,

ID_B_DEL_MOTIF

,

wxT

(

"Delete Motif"

), wxDefaultPosition, wxDefaultSize, 0 );

1780

item5->Add( item14, 0, wxALIGN_CENTER|wxALL, 5 );

1782

item2->Add( item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1784

item1->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 );

1786

wxStaticBox *item16 =

new

wxStaticBox( parent, -1,

wxT

(

"Evidence"

) );

1787

wxStaticBoxSizer *item15 =

new

wxStaticBoxSizer( item16, wxVERTICAL );

1789

wxString *strs17 = (wxString*)

NULL

;

1790

wxListBox *item17 =

new

wxListBox( parent,

ID_L_EVID

, wxDefaultPosition, wxSize(350,100), 0, strs17, wxLB_SINGLE );

1791

item15->Add( item17, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1793

wxGridSizer *item18 =

new

wxGridSizer( 2, 0, 0, 0 );

1795

wxButton *item19 =

new

wxButton( parent,

ID_B_NEW_EVID

,

wxT

(

"New"

), wxDefaultPosition, wxDefaultSize, 0 );

1796

item18->Add( item19, 0, wxALIGN_CENTER|wxALL, 5 );

1798

wxButton *item20 =

new

wxButton( parent,

ID_B_SHOW

,

wxT

(

"Show"

), wxDefaultPosition, wxDefaultSize, 0 );

1799

item18->Add( item20, 0, wxALIGN_CENTER|wxALL, 5 );

1801

wxButton *item21 =

new

wxButton( parent,

ID_B_EVID_UP

,

wxT

(

"Move Up"

), wxDefaultPosition, wxDefaultSize, 0 );

1802

item18->Add( item21, 0, wxALIGN_CENTER|wxALL, 5 );

1804

wxButton *item22 =

new

wxButton( parent,

ID_B_EDIT_EVID

,

wxT

(

"Edit"

), wxDefaultPosition, wxDefaultSize, 0 );

1805

item18->Add( item22, 0, wxALIGN_CENTER|wxALL, 5 );

1807

wxButton *item23 =

new

wxButton( parent,

ID_B_DEL_EVID

,

wxT

(

"Delete"

), wxDefaultPosition, wxDefaultSize, 0 );

1808

item18->Add( item23, 0, wxALIGN_CENTER|wxALL, 5 );

1810

wxButton *item24 =

new

wxButton( parent,

ID_B_EVID_DOWN

,

wxT

(

"Move Down"

), wxDefaultPosition, wxDefaultSize, 0 );

1811

item18->Add( item24, 0, wxALIGN_CENTER|wxALL, 5 );

1813

item15->Add( item18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1815

item1->Add( item15, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );

1817

item0->Add( item1, 0, wxALIGN_CENTER, 5 );

1821

parent->SetSizer( item0 );

1823

item0->SetSizeHints( parent );

1848

wxBoxSizer *item0 =

new

wxBoxSizer( wxVERTICAL );

1850

wxStaticBox *item2 =

new

wxStaticBox( parent, -1,

"Evidence Options"

);

1851

wxStaticBoxSizer *item1 =

new

wxStaticBoxSizer( item2, wxVERTICAL );

1853

wxFlexGridSizer *item3 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

1854

item3->AddGrowableCol( 2 );

1856

wxRadioButton *item4 =

new

wxRadioButton( parent,

ID_R_COMMENT

,

""

, wxDefaultPosition, wxDefaultSize, 0 );

1857

item3->Add( item4, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );

1859

wxStaticText *item5 =

new

wxStaticText( parent,

ID_ST_COMMENT

,

"Comment:"

, wxDefaultPosition, wxDefaultSize, 0 );

1860

item3->Add( item5, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );

1862

wxTextCtrl *item6 =

new

wxTextCtrl( parent,

ID_T_COMMENT

,

""

, wxDefaultPosition, wxSize(150,-1), 0 );

1863

item3->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1865

item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );

1867

wxStaticLine *item7 =

new

wxStaticLine( parent,

ID_LINE

, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );

1868

item1->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1870

wxFlexGridSizer *item8 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

1871

item8->AddGrowableCol( 2 );

1873

wxRadioButton *item9 =

new

wxRadioButton( parent,

ID_R_PMID

,

""

, wxDefaultPosition, wxDefaultSize, 0 );

1874

item8->Add( item9, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );

1876

wxStaticText *item10 =

new

wxStaticText( parent,

ID_ST_PMID

,

"Reference (PubMed ID):"

, wxDefaultPosition, wxDefaultSize, 0 );

1877

item8->Add( item10, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );

1879

wxTextCtrl *item11 =

new

wxTextCtrl( parent,

ID_T_PMID

,

""

, wxDefaultPosition, wxDefaultSize, 0 );

1880

item8->Add( item11, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1882

item1->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );

1884

wxStaticLine *item12 =

new

wxStaticLine( parent,

ID_LINE

, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );

1885

item1->Add( item12, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1887

wxFlexGridSizer *item13 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

1888

item13->AddGrowableCol( 2 );

1890

wxRadioButton *item14 =

new

wxRadioButton( parent,

ID_R_STRUCTURE

,

""

, wxDefaultPosition, wxDefaultSize, 0 );

1891

item13->Add( item14, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );

1893

wxStaticText *item15 =

new

wxStaticText( parent,

ID_ST_STRUCTURE

,

"Structure:"

, wxDefaultPosition, wxDefaultSize, 0 );

1894

item13->Add( item15, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );

1896

wxTextCtrl *item16 =

new

wxTextCtrl( parent,

ID_T_STRUCTURE

,

""

, wxDefaultPosition, wxSize(80,-1), 0 );

1897

item13->Add( item16, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1899

item1->Add( item13, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );

1901

wxButton *item17 =

new

wxButton( parent,

ID_B_RERANGE

,

"Reset Residues to Current Highlights"

, wxDefaultPosition, wxDefaultSize, 0 );

1902

item1->Add( item17, 0, wxALIGN_CENTRE|wxALL, 5 );

1904

item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1906

wxFlexGridSizer *item18 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

1908

wxButton *item19 =

new

wxButton( parent,

ID_B_EDIT_OK

,

"OK"

, wxDefaultPosition, wxDefaultSize, 0 );

1909

item19->SetDefault();

1910

item18->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 );

1912

item18->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );

1914

wxButton *item20 =

new

wxButton( parent,

ID_B_EDIT_CANCEL

,

"Cancel"

, wxDefaultPosition, wxDefaultSize, 0 );

1915

item18->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 );

1917

item0->Add( item18, 0, wxALIGN_CENTRE|wxALL, 5 );

1921

parent->SetAutoLayout(

TRUE

);

1922

parent->SetSizer( item0 );

1925

item0->Fit( parent );

1926

item0->SetSizeHints( parent );

1935

wxBoxSizer *item0 =

new

wxBoxSizer( wxVERTICAL );

1937

wxStaticBox *item2 =

new

wxStaticBox( parent, -1,

wxT

(

"Typed Description"

) );

1938

wxStaticBoxSizer *item1 =

new

wxStaticBoxSizer( item2, wxVERTICAL );

1940

wxFlexGridSizer *item3 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

1941

item3->AddGrowableCol( 2 );

1943

wxStaticText *item4 =

new

wxStaticText( parent,

ID_ST_TYPE

,

wxT

(

"Type:"

), wxDefaultPosition, wxDefaultSize, 0 );

1944

item3->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 );

1946

item3->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );

1952

wxChoice *item5 =

new

wxChoice( parent,

ID_C_TYPE

, wxDefaultPosition, wxSize(150,-1), 1, strs5, 0 );

1953

item3->Add( item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1955

item3->Add( 10, 20, 0, wxALIGN_CENTER|wxALL, 5 );

1957

wxCheckBox *item6 =

new

wxCheckBox( parent,

ID_CB_PUTATIVE

,

wxT

(

"Is Putative?"

), wxDefaultPosition, wxDefaultSize, 0 );

1958

item3->Add( item6, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1960

item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1962

wxFlexGridSizer *item7 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

1963

item7->AddGrowableCol( 1 );

1965

wxStaticText *item8 =

new

wxStaticText( parent,

ID_ST_DESCR2

,

wxT

(

"Description:"

), wxDefaultPosition, wxDefaultSize, 0 );

1966

item7->Add( item8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 );

1970  wxT

(

"ComboItem"

),

1976

wxComboBox *item9 =

new

wxComboBox( parent,

ID_CMB_DESCR

,

wxT

(

""

), wxDefaultPosition, wxSize(200,-1), 5, strs9, wxCB_DROPDOWN );

1977

item7->Add( item9, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1979

item1->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1981

wxStaticLine *item10 =

new

wxStaticLine( parent,

ID_LINE

, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );

1982

item1->Add( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1984

wxFlexGridSizer *item11 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

1986

wxButton *item12 =

new

wxButton( parent,

ID_B_DESCR_OK

,

wxT

(

"OK"

), wxDefaultPosition, wxDefaultSize, 0 );

1987

item12->SetDefault();

1988

item11->Add( item12, 0, wxALIGN_CENTER|wxALL, 5 );

1990

wxButton *item13 =

new

wxButton( parent,

ID_B_DESCR_CANCEL

,

wxT

(

"Cancel"

), wxDefaultPosition, wxDefaultSize, 0 );

1991

item11->Add( item13, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1993

item1->Add( item11, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );

1995

item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

1999

parent->SetSizer( item0 );

2001

item0->SetSizeHints( parent );

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

wxSizer * SetupEvidenceDialog(wxWindow *parent, bool call_fit=TRUE, bool set_sizer=TRUE)

#define DECLARE_AND_FIND_WINDOW_RETURN_ON_ERR(var, id, type)

bool DoesPatternMatchHighlightedResidues(const Sequence &sequence, const Sequence::MoleculeHighlightMap &restrictTo, CRegexp &regexp, set< unsigned int > *highlightedSeqIndicesPtr)

unsigned int DoHighlightMotif(StructureSet *structureSet, const string &regexPattern, Messenger::MoleculeHighlightMap &restrictTo)

#define ID_B_DESCR_CANCEL

static const StructureObject * HighlightResidues(const StructureSet *set, const CBiostruc_annot_set &annot)

static const string STRUCTURE_EVIDENCE_COMMENT

#define ID_B_DEFINE_MOTIF

wxSizer * SetupCDDAnnotDialog(wxWindow *parent, bool call_fit=TRUE, bool set_sizer=TRUE)

#define DECLARE_AND_FIND_WINDOW_RETURN_FALSE_ON_ERR(var, id, type)

static bool IsFirstResidueOfABlock(const BlockMultipleAlignment::ConstBlockList &blocks, unsigned int masterIndex)

#define ID_B_HIGHLIGHT_MOTIF

static const string STD_ANNOT_TYPES_FILE

#define IS_STRUCTURE_EVIDENCE_BSANNOT(evidence)

wxSizer * SetupTypedDescriptionDialog(wxWindow *parent, bool call_fit=TRUE, bool set_sizer=TRUE)

const BlockMultipleAlignment * GetCurrentMultipleAlignment(void) const

void GetBlocks(ConstBlockList *blocks) const

const Sequence * GetMaster(void) const

std::vector< const UngappedAlignedBlock * > UngappedAlignedBlockList

const Sequence * GetSequenceOfRow(unsigned int row) const

void GetUngappedAlignedBlocks(UngappedAlignedBlockList *blocks) const

unsigned int NRows(void) const

bool HighlightAlignedColumnsOfMasterRange(unsigned int from, unsigned int to) const

bool IsAligned(unsigned int row, unsigned int seqIndex) const

std::vector< ncbi::CConstRef< Block > > ConstBlockList

CBiostruc_feature_set_descr –.

CCn3d_style_settings –.

CDDAnnotateDialog ** dialogHandle

void NewOrEditMotif(void)

void OnButton(wxCommandEvent &event)

void HighlightAnnotation(void)

std::list< ncbi::CRef< ncbi::objects::CSeq_interval > > IntervalList

void SetupGUIControls(int selectAnnot, int selectEvidence)

bool HighlightInterval(const ncbi::objects::CSeq_interval &interval)

void OnCloseWindow(wxCloseEvent &event)

void DeleteEvidence(void)

ncbi::CRef< ncbi::objects::CAlign_annot_set > annotSet

void HighlightMotif(void)

void GetCurrentHighlightedIntervals(IntervalList *intervals)

void DeleteAnnotation(void)

void OnSelection(wxCommandEvent &event)

void EditAnnotation(void)

void MoveAnnotation(bool moveUp)

void MoveEvidence(bool moveUp)

StructureSet * structureSet

void SetupGUIControls(void)

bool HasDataChanged(void) const

void OnButton(wxCommandEvent &event)

void OnChange(wxCommandEvent &event)

bool GetData(ncbi::objects::CFeature_evidence *evidence)

void OnCloseWindow(wxCloseEvent &event)

bool GetData(ncbi::objects::CAlign_annot *alignAnnot)

void SetupGUIControls(void)

void PopulatePredefinedSitesMap()

void OnChange(wxCommandEvent &event)

void OnTypeChoice(wxCommandEvent &event)

std::pair< wxString, wxArrayString > TTypeNamesPair

void OnButton(wxCommandEvent &event)

static TPredefinedSites predefinedSites

void OnCloseWindow(wxCloseEvent &event)

void AdjustComboboxForType(int type)

std::map< int, TTypeNamesPair > TPredefinedSites

TSeqPos GetLength(void) const

void GetHighlights(MoleculeHighlightMap *copyHighlights)

ncbi::objects::CBiostruc_annot_set * CreateBiostrucAnnotSetForHighlightsOnSingleObject(void) const

bool RemoveAllHighlights(bool postRedraws)

void AddHighlights(const Sequence *sequence, unsigned int seqIndexFrom, unsigned int seqIndexTo)

void ProcessRedraws(void)

std::map< const MoleculeIdentifier *, std::vector< bool > > MoleculeHighlightMap

bool MatchesSeqId(const ncbi::objects::CSeq_id &sid) const

const MoleculeIdentifier * identifier

void ShowFrameNumber(int frame)

void FillOutSeqId(ncbi::objects::CSeq_id *sid) const

const Molecule * molecule

const MoleculeIdentifier * identifier

unsigned int Length(void) const

std::map< const MoleculeIdentifier *, std::vector< bool > > MoleculeHighlightMap

void Show(const StructureBase *entity, bool isShown)

void MakeAllVisible(void)

bool GetParentOfType(const T **ptr, bool warnIfNotFound=true) const

const ChemicalGraph * graph

static const unsigned int eUserAnnotationData

AlignmentManager * alignmentManager

ShowHideManager * showHideManager

OpenGLRenderer * renderer

void SetDataChanged(unsigned int what) const

const_iterator end() const

const_iterator find(const key_type &key) const

iterator_bool insert(const value_type &val)

const_iterator end() const

Include a standard set of the NCBI C++ Toolkit most basic headers.

vector< string > TTypeNames

map< int, TTypeNamesPair > TStandardTypesData

bool Prosite2Regex(const std::string &prosite, std::string *regex, std::string *errString)

static const struct name_t names[]

static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)

static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)

unsigned int TSeqPos

Type for sequence locations and lengths.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

const TPrim & Get(void) const

TObjectType * GetPointer(void) THROWS_NONE

Get pointer,.

CTempString GetMatch(CTempString str, size_t offset=0, size_t idx=0, TMatch flags=fMatch_default, bool noreturn=false)

Get matching pattern and subpatterns.

int NumFound() const

Get number of patterns + subpatterns.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_SCOPE(ns)

Define a new scope.

NCBI_NS_STD::string::size_type SIZE_TYPE

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

@ fSplit_MergeDelimiters

Merge adjacent delimiters.

@ eNocase

Case insensitive compare.

const TFeatures & GetFeatures(void) const

Get the Features member data.

bool IsSetId(void) const

Check if a value has been assigned to Id data member.

const TId & GetId(void) const

Get the Id member data.

const TComment & GetComment(void) const

Get the variant data.

bool IsSetMotif(void) const

to validate mapping of sites Check if a value has been assigned to Motif data member.

const TDescription & GetDescription(void) const

Get the Description member data.

void SetType(TType value)

Assign a value to Type data member.

void SetDescription(const TDescription &value)

Assign a value to Description data member.

void SetMotif(const TMotif &value)

Assign a value to Motif data member.

bool IsSetType(void) const

for typing annotated features 0 .

void ResetMotifuse(void)

Reset Motifuse data member.

bool IsReference(void) const

Check if variant Reference is selected.

TType GetType(void) const

Get the Type member data.

TEvidence & SetEvidence(void)

Assign a value to Evidence data member.

void SetLocation(TLocation &value)

Assign a value to Location data member.

void ResetMotif(void)

Reset Motif data member.

void ResetType(void)

Reset Type data member.

const TBsannot & GetBsannot(void) const

Get the variant data.

const TReference & GetReference(void) const

Get the variant data.

void SetMotifuse(TMotifuse value)

Assign a value to Motifuse data member.

bool IsSetEvidence(void) const

evidence we can compute with Check if a value has been assigned to Evidence data member.

const TMotif & GetMotif(void) const

Get the Motif member data.

const TLocation & GetLocation(void) const

Get the Location member data.

const TEvidence & GetEvidence(void) const

Get the Evidence member data.

bool IsComment(void) const

Check if variant Comment is selected.

bool IsSetDescription(void) const

to hold descriptions/names like "Heme binding site" or "catalytic triad" etc., something that should ...

TIs_on GetIs_on(void) const

Get the Is_on member data.

const TNucleotide_backbone & GetNucleotide_backbone(void) const

Get the Nucleotide_backbone member data.

const TNucleotide_sidechains & GetNucleotide_sidechains(void) const

Get the Nucleotide_sidechains member data.

void SetHeterogens(THeterogens &value)

Assign a value to Heterogens data member.

const TProtein_backbone & GetProtein_backbone(void) const

Get the Protein_backbone member data.

TType GetType(void) const

Get the Type member data.

void SetSolvents(TSolvents &value)

Assign a value to Solvents data member.

void SetNucleotide_backbone(TNucleotide_backbone &value)

Assign a value to Nucleotide_backbone data member.

void SetProtein_backbone(TProtein_backbone &value)

Assign a value to Protein_backbone data member.

const TProtein_sidechains & GetProtein_sidechains(void) const

Get the Protein_sidechains member data.

@ eCn3d_backbone_type_off

@ eCn3d_backbone_type_trace

bool IsPmid(void) const

Check if variant Pmid is selected.

const TPmid & GetPmid(void) const

Get the variant data.

void SetTo(TTo value)

Assign a value to To data member.

Tdata & Set(void)

Assign a value to data member.

void SetId(TId &value)

Assign a value to Id data member.

TFrom GetFrom(void) const

Get the From member data.

void SetFrom(TFrom value)

Assign a value to From data member.

bool IsPacked_int(void) const

Check if variant Packed_int is selected.

TTo GetTo(void) const

Get the To member data.

bool IsInt(void) const

Check if variant Int is selected.

const TInt & GetInt(void) const

Get the variant data.

unsigned int

A callback function used to compare two keys in a database.

for(len=0;yy_str[len];++len)

Messenger * GlobalMessenger(void)

string GetTypeAsString(EBaseType et)

const struct ncbi::grid::netcache::search::fields::SIZE size

Magic spell ;-) needed for some weird compilers... very empiric.

#define TRUE

bool replacment for C indicating true.

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

#define row(bind, expected)

static DP_BlockInfo * blocks

C++ wrappers for the Perl-compatible regular expression (PCRE) library.


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