<< 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); \
189wxDialog(parent, -1, "CDD Annotations", wxPoint(400, 100), wxDefaultSize, wxDEFAULT_DIALOG_STYLE),
190dialogHandle(handle), structureSet(
set), annotSet(
set->GetCDDAnnotSet())
193 if(annotSet.Empty()) {
202topSizer->Fit(
this);
203topSizer->SetSizeHints(
this);
204SetClientSize(topSizer->GetMinSize());
207 if(!ncbi::cd_utils::CStdAnnotTypes::HasTypeData()) {
209 if(!ncbi::cd_utils::CStdAnnotTypes::LoadTypes(typeFile)) {
210wxMessageBox(wxString(
"Warning: error parsing standard annotation types from file\n") + wxString(typeFile.c_str()),
211 "Missing Annotation Type Definitions",
212wxOK | wxCENTRE | wxICON_WARNING,
this);
217SetupGUIControls(0, 0);
224 TRACEMSG(
"destroyed CDDAnnotateDialog");
234BlockMultipleAlignment::ConstBlockList::const_iterator
b, be =
blocks.end();
235 for(
b=
blocks.begin();
b!=be; ++
b) {
236 intfrom = (*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() &&
275intervals->push_back(interval);
282 switch(event.GetId()) {
336 if(event.GetEventObject() == annots)
369 intpos = annots->GetScrollPos(wxVERTICAL);
372CAlign_annot_set::Tdata::iterator
a, ae =
annotSet->Set().end();
373 for(
a=
annotSet->Set().begin();
a!=ae; ++
a) {
374descr =
"(no description)";
375 if((*a)->IsSetDescription() && (*a)->GetDescription().length() > 0)
376descr = (*a)->GetDescription().c_str();
380 if((*a)->GetType() > 0) {
381typeStr =
" ["+ typeStr +
" Site]";
382descr += wxString(typeStr.c_str());
386annots->Append(descr,
a->GetPointer());
389 if(selectAnnot < (
int) annots->GetCount())
390annots->SetSelection(selectAnnot);
391 else if(annots->GetCount() > 0)
392annots->SetSelection(0);
393 if(annots->GetCount() > 0)
394selectedAnnot =
reinterpret_cast<CAlign_annot*
>(annots->GetClientData(annots->GetSelection()));
395annots->SetFirstItem(pos);
398pos = evids->GetScrollPos(wxVERTICAL);
402CAlign_annot::TEvidence::iterator e, ee = selectedAnnot->
SetEvidence().end();
403 for(e=selectedAnnot->
SetEvidence().begin(); e!=ee; ++e) {
406 if((*e)->IsComment())
407evidTitle.Printf(
"Comment: %s", (*e)->GetComment().c_str());
408 else if((*e)->IsReference() && (*e)->GetReference().IsPmid())
409evidTitle.Printf(
"PMID: %i", (*e)->GetReference().GetPmid().Get());
411evidTitle.Printf(
"Structure: %s",
412(*e)->GetBsannot().GetFeatures().front()->GetDescr().front()->GetName().c_str());
414evidTitle =
"(unknown type)";
415evids->Append(evidTitle, e->GetPointer());
417 if(selectEvidence < (
int) evids->GetCount())
418evids->SetSelection(selectEvidence);
419 else if(evids->GetCount() > 0)
420evids->SetSelection(0);
421 if(evids->GetCount() > 0)
422selectedEvid =
reinterpret_cast<CFeature_evidence*
>(evids->GetClientData(evids->GetSelection()));
423evids->SetFirstItem(pos);
427bNewAnnot->Enable(!readOnly);
428bDelAnnot->Enable(selectedAnnot !=
NULL&& !readOnly);
429bEditAnnot->Enable(selectedAnnot !=
NULL&& !readOnly);
431bNewEditMotif->SetLabel(
"Edit Motif");
433bNewEditMotif->SetLabel(
"New Motif");
434bNewEditMotif->Enable(selectedAnnot !=
NULL&& !readOnly);
435bDelMotif->Enable(selectedAnnot !=
NULL&& !readOnly && selectedAnnot->
IsSetMotif());
436bHighlight->Enable(selectedAnnot !=
NULL);
437bHighlightMotif->Enable(selectedAnnot !=
NULL&& selectedAnnot->
IsSetMotif());
438bAnnotUp->Enable(annots->GetSelection() > 0 && !readOnly);
439bAnnotDown->Enable(annots->GetSelection() < ((
int) annots->GetCount()) - 1 && !readOnly);
440bNewEvid->Enable(selectedAnnot !=
NULL&& !readOnly);
441bDelEvid->Enable(selectedEvid !=
NULL&& !readOnly);
442bEditEvid->Enable(selectedEvid !=
NULL&& !readOnly);
443bShow->Enable(selectedEvid !=
NULL&&
446bEvidUp->Enable(evids->GetSelection() > 0 && !readOnly);
447bEvidDown->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 stringdescr = (annot->IsSetDescription()) ? annot->GetDescription() :
kEmptyStr;
468 if(!getDataResult || descr.size() == 0)
return;
471 if(intervals.size() == 1) {
472annot->SetLocation().SetInt(*(intervals.front()));
475packed->
Set() = intervals;
476annot->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 intconfirm = 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;
505CAlign_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 intmove = 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) {
543selectedAnnot->
SetLocation().SetInt(*(intervals.front()));
546packed->
Set() = intervals;
547selectedAnnot->
SetLocation().SetPacked_int(*packed);
554 intinitialType = wxNOT_FOUND, finalType = wxNOT_FOUND;
560 int result= dialog.ShowModal();
562 boolgetDataResult = dialog.
GetData(selectedAnnot);
568 if(initialType == wxNOT_FOUND) {
571selectedAnnot->
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 stringhighlightedResidues;
598 if(highlightedSeqIndicesPtr) highlightedSeqIndicesPtr->
clear();
600Sequence::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)
return0;
626 unsigned intnRowsMatched = 0;
632 for(
unsigned int i=0;
i<alignment->
NRows(); ++
i) {
635 if(!sequence || usedSequences.
find(sequence) != usedSequences.
end())
continue;
636usedSequences[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 boolisMotifValid =
true;
663 boolwasMotifSet = selectedAnnot->
IsSetMotif();
664 intstatus = wxID_CANCEL, nGroups = 0;
666 TSeqPosannotationLength = 0, patternLength = 0;
667wxString
msg, labelText;
668wxString originalMotif = (wasMotifSet) ? selectedAnnot->
GetMotif().c_str() :
"";
669wxString title = (wasMotifSet && originalMotif.length() > 0) ?
"Edit Motif":
"New Motif";
674 stringannotatedMasterResidues, masterSequence = master->
sequenceString;
679 if(to < masterSequence.length()) {
680 for(; from <= to; ++from) annotatedMasterResidues += masterSequence[from];
683CPacked_seqint::Tdata::iterator s,
684se = selectedAnnot->
SetLocation().SetPacked_int().Set().end();
685 for(s=selectedAnnot->
SetLocation().SetPacked_int().Set().begin(); s!=se; ++s) {
686annotationLength += (**s).GetLength();
687from = (**s).GetFrom();
689 if(to < masterSequence.length()) {
690 for(; from <= to; ++from) annotatedMasterResidues += masterSequence[from];
700dialog.SetTitle(title);
701dialog.
m_Pattern->SetValue(originalMotif);
702dialog.
m_Pattern->SetSelection(-1, -1);
703dialog.
m_Mode->SetStringSelection(
"Within");
704dialog.
m_Mode->Show(
false);
709 if(annotatedMasterResidues.length() > 0) {
713wxString defaultMotif(annotatedMasterResidues.c_str());
714dialog.
m_Pattern->SetValue(defaultMotif);
717labelText = dialog.
m_Text->GetLabelText();
718annotatedMasterResidues =
"\n[Annotated residues on master: "+ annotatedMasterResidues +
"]\n";
719labelText += wxString(annotatedMasterResidues.c_str());
720dialog.
m_Text->SetLabel(labelText);
724status = dialog.ShowModal();
726 if(status != wxID_OK)
729wxString newMotif = dialog.
m_Pattern->GetValue();
730 stringprositePattern(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());
741wxMessageBox(
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);
745wxMessageBox(
msg,
"Wrong Motif Length", wxOK | wxICON_WARNING | wxCENTRE,
this);
747}
else if(!
Prosite2Regex(prositePattern, ®exPattern, &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());
749wxMessageBox(
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());
768wxMessageBox(
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());
773wxMessageBox(
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");
841CPacked_seqint::Tdata::iterator s,
842se = selectedAnnot->
SetLocation().SetPacked_int().Set().end();
843 for(s=selectedAnnot->
SetLocation().SetPacked_int().Set().begin(); s!=se; ++s) {
849wxMessageBox(
"WARNING: this annotation specifies master residues outside the aligned blocks;" 850 " see the message log for details.",
"Annotation Error",
851wxOK | 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 intpatternLength;
872 stringprositePattern, regexPattern;
873prositePattern = 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());
882wxMessageBox(
msg,
"Invalid Motif Specification", wxOK | wxICON_WARNING | wxCENTRE,
this);
884}
else if(!
Prosite2Regex(prositePattern, ®exPattern, &nGroups)) {
885 msg.Printf(
"The motif '%s'\n\ndid not parse as valid ProSite syntax.", prositePattern.c_str());
886wxMessageBox(
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());
902wxMessageBox(
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");
919CAlign_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");
962newEvidence->SetComment(
"");
966 int result= dialog.ShowModal();
971selectedAnnot->
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 intconfirm = 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;
1007CAlign_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 intmmdbID = annot.
GetId().front()->GetMmdb_id().Get();
1066ObjectMap annotObjects;
1070 if(!alignment)
throw "no alignment";
1073 if(alignedBlocks.size() == 0)
throw "no aligned blocks";
1082ci.
from= alignedBlocks.front()->GetRangeOfRow(
row)->from;
1083ci.
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);
1095annot.
GetFeatures().front()->GetFeatures().size() > 0 &&
1096annot.
GetFeatures().front()->GetFeatures().front()->IsSetLocation() &&
1097annot.
GetFeatures().front()->GetFeatures().front()->GetLocation().IsSubgraph() &&
1098annot.
GetFeatures().front()->GetFeatures().front()->GetLocation().
1099GetSubgraph().IsResidues() &&
1100annot.
GetFeatures().front()->GetFeatures().front()->GetLocation().
1101GetSubgraph().GetResidues().IsInterval() &&
1102annot.
GetFeatures().front()->GetFeatures().front()->GetLocation().
1103GetSubgraph().GetResidues().GetInterval().
size() > 0)
1106ObjectMap::iterator o, oe = annotObjects.
end();
1107CResidue_pntrs::TInterval::const_iterator
i, ie =
1108annot.
GetFeatures().front()->GetFeatures().front()->GetLocation().
1109GetSubgraph().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) {
1116ChemicalGraph::MoleculeMap::const_iterator
1117m = 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()) {
1135globalStyleSettings.
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)
1164bestObject = 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");
1191url.Printf(
"https://www.ncbi.nlm.nih.gov/pubmed/%i", selectedEvidence->
GetReference().
GetPmid().
Get());
1204 if((*o)->mmdbID != bestObject->
mmdbID) {
1210ChemicalGraph::MoleculeMap::const_iterator m, me = (*o)->graph->molecules.end();
1211 for(m=(*o)->graph->molecules.begin(); m!=me; ++m)
1222 unsigned intdisplayList = bestObject->
graph->
molecules.find(1)->second->displayLists.front();
1226 if(*d == displayList) {
1236 "Structure Evidence", wxOK | wxCENTRE,
this);
1240 else if(selectedEvidence->
IsComment()) {
1241wxMessageBox(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");
1272CAlign_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));
1309wxDialog(parent, -1, "CDD Annotations", wxPoint(400, 100), wxDefaultSize, wxDEFAULT_DIALOG_STYLE),
1316topSizer->Fit(
this);
1317topSizer->SetSizeHints(
this);
1320 if(initial.IsComment()) {
1323rComment->SetValue(
true);
1324tComment->SetValue(initial.GetComment().c_str());
1325tComment->SetFocus();
1326}
else if(initial.IsReference() && initial.GetReference().IsPmid()) {
1329rPMID->SetValue(
true);
1331pmid.Printf(
"%i", initial.GetReference().GetPmid().Get());
1332tPMID->SetValue(pmid);
1337rSTRUCTURE->SetValue(
true);
1338tSTRUCTURE->SetValue(
1339initial.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()) {
1392tComment->Enable(rComment->GetValue());
1394tPMID->Enable(rPMID->GetValue());
1396tStructure->Enable(rStructure->GetValue());
1397bStructure->Enable(rStructure->GetValue());
1406 if(rComment->GetValue()) {
1408 if(tComment->GetValue().size() > 0) {
1409evidence->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)) {
1421evidence->SetReference().SetPmid().Set(pmid);
1424 ERRORMSG(
"CDDEvidenceDialog::GetData() - PMID must be a positive integer");
1429 else if(rSTRUCTURE->GetValue()) {
1432 if(!evidence->IsBsannot() ||
rerange) {
1436evidence->SetBsannot(*ref);
1443evidence->SetBsannot().SetDescr().clear();
1444evidence->SetBsannot().SetDescr().push_front(descr);
1447name->SetName(
WX_TO_STD(tSTRUCTURE->GetValue()));
1448evidence->SetBsannot().SetFeatures().front()->SetDescr().clear();
1449evidence->SetBsannot().SetFeatures().front()->SetDescr().push_front(name);
1453 ERRORMSG(
"CDDEvidenceDialog::GetData() - unknown evidence type");
1472wxDialog(parent, -1, title.c_str(), wxPoint(400, 100), wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
1475 boolisPutative =
false;
1476 boolisPredefDescr =
false;
1478 intpredefType, predefTypeIndex;
1485topSizer->Fit(
this);
1486topSizer->SetSizeHints(
this);
1493 if(predefinedSites.empty() && ncbi::cd_utils::CStdAnnotTypes::HasTypeData()) {
1494PopulatePredefinedSitesMap();
1498 if(!isTypeDataRead && predefinedSites.empty()) {
1499 stringmessage =
"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.";
1500wxMessageBox(message.c_str(),
"Predefined Types/Names Unavailable", wxICON_EXCLAMATION | wxCENTRE,
this);
1504cType->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()) {
1516descr = wxString(initial.GetDescription().c_str());
1520descr = descr.Mid(8);
1521descr.Trim(
false);
1523isPredefDescr = 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");
1533cType->SetSelection(
type);
1534AdjustComboboxForType(
type);
1535cbPutative->SetValue(isPutative);
1536 if(isPredefDescr) {
1537cmbDescr->SetSelection(predefTypeIndex);
1538}
else if(descr.length() > 0) {
1539cmbDescr->SetValue(descr);
1541cmbDescr->SetSelection(wxNOT_FOUND);
1543cmbDescr->SetFocus();
1553ncbi::cd_utils::TStandardTypesData::const_iterator rtCit = rawTypeData.begin();
1554ncbi::cd_utils::TStandardTypesData::const_iterator rtCend = rawTypeData.end();
1557 for(; rtCit != rtCend; ++rtCit) {
1558typeName = 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");
1567p.second.Add(vit->c_str());
1576 intsel = cmbDescr->GetSelection();
1577wxString existingDescr = cmbDescr->GetValue();
1582cmbDescr->Append(cit->second.second);
1587 if(sel == wxNOT_FOUND) {
1588cmbDescr->SetValue(existingDescr);
1590cmbDescr->SetSelection(wxNOT_FOUND);
1602 switch(event.GetId()) {
1632 static const stringws(
" \t\n\r");
1633 static const stringleading(
" \t\n\r.,;:!@#$%^&\\|/?}])>");
1634 static const stringtrailing(
" \t\n\r.,;:!@#$%^&\\|/?{[(<");
1637 if(!alignAnnot)
return result;
1643 boolisPredefDescr =
false;
1644 boolisPutative = cbPutative->GetValue();
1645 intpredefType, predefTypeIndex;
1646 int type= cType->GetSelection();
1647 stringdescr =
string(cmbDescr->GetValue().c_str());
1651 SIZE_TYPEfirstGoodChar = descr.find_first_not_of(leading);
1652 if(firstGoodChar !=
NPOS&& firstGoodChar > 0) {
1653descr = descr.substr(firstGoodChar);
1655 SIZE_TYPElastGoodChar = descr.find_last_not_of(trailing);
1656 if(lastGoodChar !=
NPOS&& lastGoodChar < descr.size() - 1) {
1657descr = descr.substr(0, lastGoodChar + 1);
1661vector<string> tokens;
1663 if(tokens.size() > 0) {
1665 for(
unsigned int i= 1;
i< tokens.size(); ++
i) {
1666descr +=
" "+ tokens[
i];
1675descr = descr.substr(8);
1683predefType = wxNOT_FOUND;
1684 if(ncbi::cd_utils::CStdAnnotTypes::IsPredefinedDescr(descr, predefType, predefTypeIndex,
true)) {
1685isPredefDescr =
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()) {
1690descr =
names[predefTypeIndex];
1691isPredefDescr =
true;
1700 if(isPredefDescr) {
1701 if(
type!= predefType) {
1705message.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",
1707cmbDescr->GetValue().c_str(), predefTypeStr.c_str(), typeChosen.c_str(), predefTypeStr.c_str());
1708 intreply = wxMessageBox(message,
"Inconsistent type", wxOK | wxCANCEL | wxCENTRE,
this);
1709 if(reply == wxOK) {
1717 if(descr.length() > 0) {
1720descr =
"putative "+ descr;
1722alignAnnot->SetDescription(descr);
1723alignAnnot->SetType(
type);
1742wxBoxSizer *item0 =
newwxBoxSizer( wxVERTICAL );
1744wxFlexGridSizer *item1 =
newwxFlexGridSizer( 1, 0, 0, 0 );
1746wxStaticBox *item3 =
newwxStaticBox( parent, -1,
wxT(
"Annotations") );
1747wxStaticBoxSizer *item2 =
newwxStaticBoxSizer( item3, wxVERTICAL );
1749wxString *strs4 = (wxString*)
NULL;
1750wxListBox *item4 =
newwxListBox( parent,
ID_L_ANNOT, wxDefaultPosition, wxSize(350,100), 0, strs4, wxLB_SINGLE|wxLB_HSCROLL|wxLB_NEEDED_SB|wxHSCROLL );
1751item2->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1753wxGridSizer *item5 =
newwxGridSizer( 3, 0, 0, 0 );
1755wxButton *item6 =
newwxButton( parent,
ID_B_NEW_ANNOT,
wxT(
"New"), wxDefaultPosition, wxDefaultSize, 0 );
1756item5->Add( item6, 0, wxALIGN_CENTER|wxALL, 5 );
1758wxButton *item7 =
newwxButton( parent,
ID_B_HIGHLIGHT,
wxT(
"Highlight"), wxDefaultPosition, wxDefaultSize, 0 );
1759item5->Add( item7, 0, wxALIGN_CENTER|wxALL, 5 );
1761wxButton *item8 =
newwxButton( parent,
ID_B_ANNOT_UP,
wxT(
"Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
1762item5->Add( item8, 0, wxALIGN_CENTER|wxALL, 5 );
1764wxButton *item9 =
newwxButton( parent,
ID_B_EDIT_ANNOT,
wxT(
"Edit"), wxDefaultPosition, wxDefaultSize, 0 );
1765item5->Add( item9, 0, wxALIGN_CENTER|wxALL, 5 );
1767wxButton *item10 =
newwxButton( parent,
ID_B_DEL_ANNOT,
wxT(
"Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1768item5->Add( item10, 0, wxALIGN_CENTER|wxALL, 5 );
1770wxButton *item11 =
newwxButton( parent,
ID_B_ANNOT_DOWN,
wxT(
"Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
1771item5->Add( item11, 0, wxALIGN_CENTER|wxALL, 5 );
1773wxButton *item12 =
newwxButton( parent,
ID_B_DEFINE_MOTIF,
wxT(
"Define Motif"), wxDefaultPosition, wxDefaultSize, 0 );
1774item5->Add( item12, 0, wxALIGN_CENTER|wxALL, 5 );
1776wxButton *item13 =
newwxButton( parent,
ID_B_HIGHLIGHT_MOTIF,
wxT(
"Highlight Motif"), wxDefaultPosition, wxDefaultSize, 0 );
1777item5->Add( item13, 0, wxALIGN_CENTER|wxALL, 5 );
1779wxButton *item14 =
newwxButton( parent,
ID_B_DEL_MOTIF,
wxT(
"Delete Motif"), wxDefaultPosition, wxDefaultSize, 0 );
1780item5->Add( item14, 0, wxALIGN_CENTER|wxALL, 5 );
1782item2->Add( item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1784item1->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 );
1786wxStaticBox *item16 =
newwxStaticBox( parent, -1,
wxT(
"Evidence") );
1787wxStaticBoxSizer *item15 =
newwxStaticBoxSizer( item16, wxVERTICAL );
1789wxString *strs17 = (wxString*)
NULL;
1790wxListBox *item17 =
newwxListBox( parent,
ID_L_EVID, wxDefaultPosition, wxSize(350,100), 0, strs17, wxLB_SINGLE );
1791item15->Add( item17, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1793wxGridSizer *item18 =
newwxGridSizer( 2, 0, 0, 0 );
1795wxButton *item19 =
newwxButton( parent,
ID_B_NEW_EVID,
wxT(
"New"), wxDefaultPosition, wxDefaultSize, 0 );
1796item18->Add( item19, 0, wxALIGN_CENTER|wxALL, 5 );
1798wxButton *item20 =
newwxButton( parent,
ID_B_SHOW,
wxT(
"Show"), wxDefaultPosition, wxDefaultSize, 0 );
1799item18->Add( item20, 0, wxALIGN_CENTER|wxALL, 5 );
1801wxButton *item21 =
newwxButton( parent,
ID_B_EVID_UP,
wxT(
"Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
1802item18->Add( item21, 0, wxALIGN_CENTER|wxALL, 5 );
1804wxButton *item22 =
newwxButton( parent,
ID_B_EDIT_EVID,
wxT(
"Edit"), wxDefaultPosition, wxDefaultSize, 0 );
1805item18->Add( item22, 0, wxALIGN_CENTER|wxALL, 5 );
1807wxButton *item23 =
newwxButton( parent,
ID_B_DEL_EVID,
wxT(
"Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1808item18->Add( item23, 0, wxALIGN_CENTER|wxALL, 5 );
1810wxButton *item24 =
newwxButton( parent,
ID_B_EVID_DOWN,
wxT(
"Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
1811item18->Add( item24, 0, wxALIGN_CENTER|wxALL, 5 );
1813item15->Add( item18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1815item1->Add( item15, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
1817item0->Add( item1, 0, wxALIGN_CENTER, 5 );
1821parent->SetSizer( item0 );
1823item0->SetSizeHints( parent );
1848wxBoxSizer *item0 =
newwxBoxSizer( wxVERTICAL );
1850wxStaticBox *item2 =
newwxStaticBox( parent, -1,
"Evidence Options");
1851wxStaticBoxSizer *item1 =
newwxStaticBoxSizer( item2, wxVERTICAL );
1853wxFlexGridSizer *item3 =
newwxFlexGridSizer( 1, 0, 0, 0 );
1854item3->AddGrowableCol( 2 );
1856wxRadioButton *item4 =
newwxRadioButton( parent,
ID_R_COMMENT,
"", wxDefaultPosition, wxDefaultSize, 0 );
1857item3->Add( item4, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
1859wxStaticText *item5 =
newwxStaticText( parent,
ID_ST_COMMENT,
"Comment:", wxDefaultPosition, wxDefaultSize, 0 );
1860item3->Add( item5, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
1862wxTextCtrl *item6 =
newwxTextCtrl( parent,
ID_T_COMMENT,
"", wxDefaultPosition, wxSize(150,-1), 0 );
1863item3->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1865item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
1867wxStaticLine *item7 =
newwxStaticLine( parent,
ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
1868item1->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1870wxFlexGridSizer *item8 =
newwxFlexGridSizer( 1, 0, 0, 0 );
1871item8->AddGrowableCol( 2 );
1873wxRadioButton *item9 =
newwxRadioButton( parent,
ID_R_PMID,
"", wxDefaultPosition, wxDefaultSize, 0 );
1874item8->Add( item9, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
1876wxStaticText *item10 =
newwxStaticText( parent,
ID_ST_PMID,
"Reference (PubMed ID):", wxDefaultPosition, wxDefaultSize, 0 );
1877item8->Add( item10, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
1879wxTextCtrl *item11 =
newwxTextCtrl( parent,
ID_T_PMID,
"", wxDefaultPosition, wxDefaultSize, 0 );
1880item8->Add( item11, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1882item1->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
1884wxStaticLine *item12 =
newwxStaticLine( parent,
ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
1885item1->Add( item12, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1887wxFlexGridSizer *item13 =
newwxFlexGridSizer( 1, 0, 0, 0 );
1888item13->AddGrowableCol( 2 );
1890wxRadioButton *item14 =
newwxRadioButton( parent,
ID_R_STRUCTURE,
"", wxDefaultPosition, wxDefaultSize, 0 );
1891item13->Add( item14, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
1893wxStaticText *item15 =
newwxStaticText( parent,
ID_ST_STRUCTURE,
"Structure:", wxDefaultPosition, wxDefaultSize, 0 );
1894item13->Add( item15, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
1896wxTextCtrl *item16 =
newwxTextCtrl( parent,
ID_T_STRUCTURE,
"", wxDefaultPosition, wxSize(80,-1), 0 );
1897item13->Add( item16, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1899item1->Add( item13, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
1901wxButton *item17 =
newwxButton( parent,
ID_B_RERANGE,
"Reset Residues to Current Highlights", wxDefaultPosition, wxDefaultSize, 0 );
1902item1->Add( item17, 0, wxALIGN_CENTRE|wxALL, 5 );
1904item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1906wxFlexGridSizer *item18 =
newwxFlexGridSizer( 1, 0, 0, 0 );
1908wxButton *item19 =
newwxButton( parent,
ID_B_EDIT_OK,
"OK", wxDefaultPosition, wxDefaultSize, 0 );
1909item19->SetDefault();
1910item18->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 );
1912item18->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );
1914wxButton *item20 =
newwxButton( parent,
ID_B_EDIT_CANCEL,
"Cancel", wxDefaultPosition, wxDefaultSize, 0 );
1915item18->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 );
1917item0->Add( item18, 0, wxALIGN_CENTRE|wxALL, 5 );
1921parent->SetAutoLayout(
TRUE);
1922parent->SetSizer( item0 );
1925item0->Fit( parent );
1926item0->SetSizeHints( parent );
1935wxBoxSizer *item0 =
newwxBoxSizer( wxVERTICAL );
1937wxStaticBox *item2 =
newwxStaticBox( parent, -1,
wxT(
"Typed Description") );
1938wxStaticBoxSizer *item1 =
newwxStaticBoxSizer( item2, wxVERTICAL );
1940wxFlexGridSizer *item3 =
newwxFlexGridSizer( 1, 0, 0, 0 );
1941item3->AddGrowableCol( 2 );
1943wxStaticText *item4 =
newwxStaticText( parent,
ID_ST_TYPE,
wxT(
"Type:"), wxDefaultPosition, wxDefaultSize, 0 );
1944item3->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 );
1946item3->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
1952wxChoice *item5 =
newwxChoice( parent,
ID_C_TYPE, wxDefaultPosition, wxSize(150,-1), 1, strs5, 0 );
1953item3->Add( item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1955item3->Add( 10, 20, 0, wxALIGN_CENTER|wxALL, 5 );
1957wxCheckBox *item6 =
newwxCheckBox( parent,
ID_CB_PUTATIVE,
wxT(
"Is Putative?"), wxDefaultPosition, wxDefaultSize, 0 );
1958item3->Add( item6, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1960item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1962wxFlexGridSizer *item7 =
newwxFlexGridSizer( 1, 0, 0, 0 );
1963item7->AddGrowableCol( 1 );
1965wxStaticText *item8 =
newwxStaticText( parent,
ID_ST_DESCR2,
wxT(
"Description:"), wxDefaultPosition, wxDefaultSize, 0 );
1966item7->Add( item8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 );
1970 wxT(
"ComboItem"),
1976wxComboBox *item9 =
newwxComboBox( parent,
ID_CMB_DESCR,
wxT(
""), wxDefaultPosition, wxSize(200,-1), 5, strs9, wxCB_DROPDOWN );
1977item7->Add( item9, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1979item1->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1981wxStaticLine *item10 =
newwxStaticLine( parent,
ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
1982item1->Add( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1984wxFlexGridSizer *item11 =
newwxFlexGridSizer( 1, 0, 0, 0 );
1986wxButton *item12 =
newwxButton( parent,
ID_B_DESCR_OK,
wxT(
"OK"), wxDefaultPosition, wxDefaultSize, 0 );
1987item12->SetDefault();
1988item11->Add( item12, 0, wxALIGN_CENTER|wxALL, 5 );
1990wxButton *item13 =
newwxButton( parent,
ID_B_DESCR_CANCEL,
wxT(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
1991item11->Add( item13, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1993item1->Add( item11, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
1995item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
1999parent->SetSizer( item0 );
2001item0->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 ®exp, set< unsigned int > *highlightedSeqIndicesPtr)
unsigned int DoHighlightMotif(StructureSet *structureSet, const string ®exPattern, 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