NCBI C++ ToolKit
dll_register.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: dll_register.cpp 47479 2023-05-02 13:24:02Z ucko $
2  * =========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * =========================================================================
25  *
26  * Authors: Andrey Yazhuk, Igor Filippov, Jie Chen
27  *
28  * File Description:
29  * Defines "Sequence Editing" package for GBENCH.
30  */
31 
32 #include <ncbi_pch.hpp>
33 #include <corelib/ncbiapp.hpp>
47 
52 
55 
57 #include <gui/utils/url_utils.hpp>
63 #include <gui/objutils/utils.hpp>
69 
70 
75 
80 
86 #include <gui/utils/app_popup.hpp>
92 
96 
150 #include "test_dialog_view.hpp"
256 
261 
263 #include "indexer_app_mode.hpp"
264 
267 
272 
273 #include "gui_core_helper_impl.hpp"
274 
277 
281 
284 
285 #ifdef _DEBUG
287 #endif
288 
289 #include <wx/msgdlg.h>
290 #include <wx/statline.h>
291 #include <wx/clipbrd.h>
293 #include <wx/filedlg.h>
294 #include <wx/display.h>
295 #include <wx/evtloop.h>
296 #include <wx/uri.h>
297 #include <wx/utils.h>
298 
300 
301 ///////////////////////////////////////////////////////////////////////////////
302 /// Declare the Package Object
304  : public IGuiPackage
305  , public IUICommandContributor
306  , public IMenuContributor
308 {
309 public:
310  CSeqEditPackage();
311  virtual string GetName() const { return "Sequence Editing"; }
312  virtual void GetVersion(size_t& verMajor, size_t& verMinor, size_t& verPatch) const
313  {
314  verMajor = 1;
315  verMinor = 0;
316  verPatch = 0;
317  }
318  virtual bool Init();
319  virtual void Shut() {}
320 
321  // IUICommandContributor
322  virtual vector<CUICommand*> GetCommands();
323  virtual wxEvtHandler* GetEventHandler();
324 
325  // IPackageWorkbenchConnector
326  virtual void SetWorkbench(IWorkbench* wb);
327 
328 protected:
329  // IMenuContributor
330  virtual const SwxMenuItemRec* GetMenuDef() const;
331 
332  void x_UpdateValAuxFile(const string& fname) const;
333 
335 };
336 
337 static const char* sMacroLibraries[] = {
338  "<std>/etc/macro_scripts/list_of_macros.mql",
339  "<std>/etc/macro_scripts/autofix_gb.mql",
340  "<std>/etc/macro_scripts/autofix_tsa.mql",
341  "<std>/etc/macro_scripts/autofix_wgs.mql",
342  NULL
343 };
344 
346 {
347  m_Workbench = NULL;
348 }
349 
350 
352 {
353  // Declare you extension here
354 
355  // Examples:
356  //CExtensionDeclaration("view_manager_service::view_factory",
357  // new CTextViewFactory());
358 
359  //CExtensionDeclaration("ui_data_source_type",
360  // new CGenBankUIDataSourceType());
361  //CExtensionDeclaration ("file_format_loader_manager",
362  // new CFASTAFormatLoadManager());
363 
364  //CExtensionDeclaration("data_mining_tool", new CEntrezSearchTool());
365 
366  init_w_edit();
367 
368 // CExtensionDeclaration("ui_algo_tool_manager", new CAutodefToolManager());
369 
370  // Edit tools
371 // CExtensionDeclaration("ui_algo_tool_manager", new CEditingBtnsTool());
372 // CExtensionDeclaration("ui_algo_tool_manager", new CSrcEditTool());
373 
374 #ifdef _DEBUG
375  CExtensionDeclaration("ui_algo_tool_manager", new CDebugMacroTool());
376 #endif
377 
378  if (RunningInsideNCBI())
379  {
380  CExtensionDeclaration("view_manager_service::view_factory", new CSequinDesktopViewFactory());
381  }
382 
383  CExtensionDeclaration ("file_format_loader_manager", new CQualTableLoadManager());
384 
385 // IFileLoadPanelClient
387 
388  vector<string> filenames;
389  auto i = 0;
390  while (sMacroLibraries[i]) {
391  wxString path = CSysPath::ResolvePathExisting(wxString::FromUTF8(sMacroLibraries[i]));
392  if (!path.IsEmpty()) {
393  filenames.push_back(string(path.ToUTF8()));
394  }
395  else {
396  NcbiMessageBox(string(sMacroLibraries[i]) + " was not found");
397  }
398  ++i;
399  }
400 
401  if (!filenames.empty()) {
402  macro::CMacroLib& macroLib = macro::CMacroLib::GetInstance();
403  macroLib.ClearLibrary();
404  bool status = macroLib.AppendToLibrary(filenames);
405  if (!status) {
406  NcbiMessageBox(macroLib.GetLastError());
407  }
408 
409  wxString path = CSysPath::ResolvePathExisting(wxT("<std>/etc/synonyms.txt"));
410  if (!path.IsEmpty()) {
411  macroLib.StoreSynonymList(ToStdString(path));
412  }
413  }
414 
415  if (!RunningInsideNCBI()) {
416  x_UpdateValAuxFile("lat_lon_country.txt");
417  x_UpdateValAuxFile("lat_lon_water.txt");
418  }
419 
420  // needed to pick up the latest EC number lists
421  CNcbiApplication::Instance()->SetEnvironment("NCBI_ECNUM_USE_DATA_DIR_FIRST", "TRUE");
422 
423  //! Please don't register commands twice. Either you register them directly
424  //! with x_RegisterCommands(), or you use the interface IUICommandContributor.
425  //! Please never do both!
426  //!
427  //x_RegisterCommands();
428 
431  return true;
432 }
433 
435 {
436  m_Workbench = wb;
437 }
438 
439 static bool s_UpdateLocalFile(const string& url, const string& file_name)
440 {
441  CHttpResponse response = g_HttpGet(CUrl(url));
442  if (response.GetStatusCode() == 200 && response.CanGetContentStream()) {
443  CNcbiIstream& istr = response.ContentStream();
444  if (istr.good()) {
445  CNcbiOfstream ostr(file_name.c_str());
446  NcbiStreamCopy(ostr, istr);
447  LOG_POST(Info << "Downloaded " + file_name + " to be used by the validator");
448  return true;
449  }
450  }
451  return false;
452 }
453 
454 void CSeqEditPackage::x_UpdateValAuxFile(const string& fname) const
455 {
456  const string url = "https://anonsvn.ncbi.nlm.nih.gov/v1/trunk/c%2B%2B/src/objects/seqfeat/" + fname;
457 
458  const wxChar* kTempFilesDir = wxT("<home>/TempFiles");
459  wxString dir_path = CSysPath::ResolvePath(kTempFilesDir);
460  {
461  string path(dir_path.ToUTF8());
462  CNcbiApplication::Instance()->SetEnvironment("NCBI_LAT_LON_DATA_PATH", path);
463  }
464 
465  wxFileName wxfname;
466  wxfname.SetPath(dir_path);
467  wxfname.SetFullName(fname);
468  string filePath(wxfname.GetFullPath().ToUTF8());
469 
470  if (!wxfname.FileExists()) {
471  if (!wxFileName::DirExists(dir_path) && !wxFileName::Mkdir(dir_path)) {
472  LOG_POST(Error << "Failed to create directory: '" << dir_path << "'");
473  return;
474  }
475 
476  if (!s_UpdateLocalFile(url, filePath)) {
477  LOG_POST(Error << "Failed to download " + fname);
478  }
479  }
480  else {
481  try {
482  Uint8 remote_fsize = CUrlUtils::GetRemoteFileSize(url);
483  Uint8 existing_fsize = wxfname.GetSize().ToULong();
484  long diff = (long)abs((int)(existing_fsize - remote_fsize));
485 
486 #ifdef NCBI_OS_MSWIN
487 
488  CNcbiIfstream istr(filePath.c_str());
489  istr.unsetf(ios::skipws);
490  long count_lines = count(istream_iterator<char>(istr), istream_iterator<char>(), '\n');
491 
492  if (diff > 0 && count_lines == diff) {
493  // they are the same, no need to update
494  }
495  else {
496  s_UpdateLocalFile(url, filePath);
497  }
498 #else
499  if (diff > 0) {
500  s_UpdateLocalFile(url, filePath);
501  }
502 #endif
503  }
504  catch (const CException& e) {
505  LOG_POST(Error << "Failed to update " + fname + ": " + e.GetMsg());
506  }
507  catch (const exception& e) {
508  LOG_POST(Error << "Failed to update " + fname + ": " + e.what());
509  }
510  }
511 }
512 
513 ///////////////////////////////////////////////////////////////////////////////
514 /// Declare Package Entry Point
515 extern "C" {
517  {
518  return new CSeqEditPackage();
519  }
520 }
521 
522 
523 class CSequenceEditingEventHandler : public wxEvtHandler, public CEventHandler
524 {
527 
528 public:
530  void IsObjectSelected(wxUpdateUIEvent& event);
531  void IsLocationSelected(wxUpdateUIEvent& event);
532  bool TestHupIdEnabled();
533  void IsHupIdEnabled(wxUpdateUIEvent& event);
534  void ItemAction(wxCommandEvent& event, CRef <CItem> item, const string& title);
536  void ShowAfter(wxWindow* dlg);
537 
538  // methods
539  void RemoveDescriptors(wxCommandEvent& evt);
540  void RemoveFeatures(wxCommandEvent& evt);
541  void RemoveUnindexedFeatures(wxCommandEvent& event);
542  void ApplyIndexerComments(wxCommandEvent& evt);
543  void RemoveSeqAnnotIds( wxCommandEvent& event );
544  void RemoveBankitComment( wxCommandEvent& event );
545  void RemoveDuplicateStructuredComments( wxCommandEvent& event );
546  void RemoveSequencesFromAlignments( wxCommandEvent& event );
547  void RemoveSequences( wxCommandEvent& event );
548  void RemoveSet( wxCommandEvent& event );
549  void RemoveSetsFromSet( wxCommandEvent& event );
550  void RevCompSequences( wxCommandEvent& event );
551  void BioseqFeatsRevComp( wxCommandEvent& event );
552  void BioseqOnlyRevComp( wxCommandEvent& event );
553  void UnculTaxTool( wxCommandEvent& event );
554  void MergeBiosources(wxCommandEvent& event);
555  void EditSequence( wxCommandEvent& event );
556  void AlignmentAssistant( wxCommandEvent& event );
557  void RemoveSeqAnnotAlign( wxCommandEvent& event );
558  void RemoveSeqAnnotGraph( wxCommandEvent& event );
559  void RemoveGenomeProjectsDB( wxCommandEvent& event );
560  void RemoveEmptyGenomeProjectsDB( wxCommandEvent& event );
561  void TaxFixCleanup( wxCommandEvent& event );
562  void SpecificHostCleanup( wxCommandEvent& event );
563  void FixNonReciprocalLinks( wxCommandEvent& event );
564  void DisableStrainForwarding( wxCommandEvent& event );
565  void EnableStrainForwarding(wxCommandEvent& event);
566  void EditPubs( wxCommandEvent& event );
567  void GlobalPubmedIdLookup(wxCommandEvent& event);
568  void FixCapitalizationAll( wxCommandEvent& event );
569  void FixCapitalizationAuthors( wxCommandEvent& event );
570  void FixCapitalizationTitles( wxCommandEvent& event );
571  void FixCapitalizationAffiliation( wxCommandEvent& event );
572  void FixCapitalizationCountry( wxCommandEvent& event );
573  void RemoveUnpublishedPublications( wxCommandEvent& event );
574  void RemoveInPressPublications( wxCommandEvent& event );
575  void RemovePublishedPublications( wxCommandEvent& event );
576  void RemoveCollidingPublications( wxCommandEvent& event );
577  void RemoveAllPublications( wxCommandEvent& event );
578  void RemoveAuthorConsortiums( wxCommandEvent& event );
579  void ReverseAuthorNames( wxCommandEvent& event );
580  void StripAuthorSuffixes( wxCommandEvent& event );
581  void TruncateAuthorMiddleInitials( wxCommandEvent& event );
582  void ConvertAuthorToConstortiumWhereLastName( wxCommandEvent& event );
583  void ConvertAuthorToConsortiumAll( wxCommandEvent& event );
584  void AddCitSubForUpdate( wxCommandEvent& event );
585  void FixUsaAndStates( wxCommandEvent& event );
586  void RetranslateCDS( wxCommandEvent& event );
587  void ResynchronizePartials( wxCommandEvent& event );
588  void AddTranslExcept( wxCommandEvent& event );
589  void RemoveAllStructuredComments( wxCommandEvent& event );
590  void RemoveEmptyStructuredComments( wxCommandEvent& event );
591  void ModifyStructuredComment( wxCommandEvent& event );
592  void SetGlobalRefGeneStatus( wxCommandEvent& event );
593  void ClearKeywords( wxCommandEvent& event );
594  void ClearNomenclature(wxCommandEvent& event);
595  void RemoveStructuredCommentKeyword( wxCommandEvent& event );
596  void AddStructuredCommentKeyword( wxCommandEvent& event );
597  void AddGenomeAssemblyStructuredComment( wxCommandEvent& event );
598  void AddAssemblyStructuredComment(wxCommandEvent& event);
599  void ReorderStructuredComment( wxCommandEvent& event );
600  void ConvertComment( wxCommandEvent& event );
601  void ParseComment( wxCommandEvent& event );
602  void IllegalQualsToNote( wxCommandEvent& event);
603  void RmIllegalQuals( wxCommandEvent& event);
604  void WrongQualsToNote( wxCommandEvent& event);
605  void ConvertBadInference(wxCommandEvent& event);
606  void RmWrongQuals( wxCommandEvent& event);
607  void LowercaseQuals( wxCommandEvent& event );
608  void AssignFeatureIds( wxCommandEvent& event );
609  void ClearFeatureIds( wxCommandEvent& event );
610  void ReassignFeatureIds( wxCommandEvent& event );
611  void UniqifyFeatureIds( wxCommandEvent& event );
612  void TrimJunkInPrimerSeqs( wxCommandEvent& event );
613  void FixiInPrimerSeqs( wxCommandEvent& event );
614 // J. Chen begin
615  void RemoveCddFeatDbxref(wxCommandEvent& event );
616  void PrefixAuthWithTax(wxCommandEvent& event );
617  void FocusSet( wxCommandEvent& event );
618  void FocusClear( wxCommandEvent& event );
619  void SetTransgSrcDesc( wxCommandEvent& event );
620  void SplitDblinkQuals(wxCommandEvent& evt);
621 // J. Chen end
622  void FixOrgModInstitution( wxCommandEvent& event );
623  void FixStructuredVouchers( wxCommandEvent& event );
624  void SwapPrimerSeqName( wxCommandEvent& event );
625  void MergePrimerSets( wxCommandEvent& event );
626  void SplitPrimerSets( wxCommandEvent& event );
627  void AppendModToOrg( wxCommandEvent& event );
628  void ParseCollectionDateMonthFirst( wxCommandEvent& event );
629  void ParseCollectionDateDayFirst( wxCommandEvent& event );
630  void CountryFixupCap( wxCommandEvent& event );
631  void CountryFixupNoCap( wxCommandEvent& event );
632  void VectorTrim( wxCommandEvent& event );
633  void SelectTarget( wxCommandEvent& event );
634  void SelectFeature( wxCommandEvent& event );
635  void AddCDS( wxCommandEvent& event );
636  void AddRNA( wxCommandEvent& event );
637  void AddOtherFeature( wxCommandEvent& event );
638  void AddFeatureBetween( wxCommandEvent& event );
639  void Validate( wxCommandEvent& event );
640  void SortUniqueCount( wxCommandEvent& event );
641  void SortUniqueCountTree(wxCommandEvent& event);
642  void Discrepancy(wxCommandEvent& event);
643  void Oncaller(wxCommandEvent& event);
644  void Submitter(wxCommandEvent& event);
645  void Mega(wxCommandEvent& event);
646  void DiscrepancyList(wxCommandEvent& event);
647  void RemoveAllFeatures(wxCommandEvent& event);
648  void RemoveDupFeats( wxCommandEvent& evt );
649  void RemoveDupFeatsWithOptions( wxCommandEvent& evt );
650  void ResolveIntersectingFeats( wxCommandEvent& evt );
651  void AddSequences ( wxCommandEvent& event );
652  void ApplyEditConvertRemove ( wxCommandEvent& event );
653  void ParseText ( wxCommandEvent& event );
654  void RemoveTextInsideStr( wxCommandEvent& event );
655  void ConvertFeatures ( wxCommandEvent& event );
656  void CdsToMatPeptide( wxCommandEvent& event );
657  void ConvertCdsToMiscFeat( wxCommandEvent& evt );
658  void ConvertCdsWithGapsToMiscFeat( wxCommandEvent& evt );
659  void ConvertCdsWithInternalStopToMiscFeat( wxCommandEvent& evt );
660  void ConvertCdsWithInternalStopToMiscFeatViral( wxCommandEvent& evt );
661  void ConvertCdsWithInternalStopToMiscFeatUnverified( wxCommandEvent& evt );
662  void TableReader ( wxCommandEvent& event );
663  void TableReaderClipboard ( wxCommandEvent& event );
664  void BulkEdit ( wxCommandEvent& event );
665  void MolInfoEdit ( wxCommandEvent& event );
666  void ExportTable ( wxCommandEvent& event );
667  void Autodef ( wxCommandEvent& event );
668  void PT_Cleanup ( wxCommandEvent& event );
669  void ParseStrainSerotypeFromNames ( wxCommandEvent& event);
670  void AddStrainSerotypeToNames ( wxCommandEvent& event);
671  void FixupOrganismNames ( wxCommandEvent& event);
672  void SplitQualifiersAtCommas ( wxCommandEvent& event);
673  void SplitStructuredCollections ( wxCommandEvent& event);
674  void TrimOrganismNames ( wxCommandEvent& event);
675  void RemoveUnverified( wxCommandEvent& event );
676  void RemoveUnreviewed(wxCommandEvent& event);
677  void AddNamedrRNA ( wxCommandEvent& event);
678  void AddControlRegion ( wxCommandEvent& event);
679  void AddMicrosatellite ( wxCommandEvent& event);
680  void CreateFeature ( wxCommandEvent& event);
681  void CreateRegulatory ( wxCommandEvent& evt);
682  void CreateDescriptor ( wxCommandEvent& event);
683  void CreateSpecificStructuredComment( wxCommandEvent& event );
684  void DeleteSpecificStructuredComment( wxCommandEvent& evt );
685  void EditFeature ( wxCommandEvent& evt);
686  void ExtendPartialsConstr( wxCommandEvent& evt);
687  void ExtendPartialsAll( wxCommandEvent& evt);
688  void AddDefLine ( wxCommandEvent& evt);
689  void PrefixDefLines ( wxCommandEvent& event);
690  void EditingButtons ( wxCommandEvent& event);
691  void MakeBadSpecificHostTable ( wxCommandEvent& event);
692  void CorrectRNAStrand ( wxCommandEvent& event);
693  void ApplyRNA_ITS ( wxCommandEvent& event);
694  void TrimNsRich( wxCommandEvent& event );
695  void TrimNsTerminal( wxCommandEvent& event );
696  void AddFluComments( wxCommandEvent& event );
697  void LabelRna( wxCommandEvent& event );
698  void RemProtTitles( wxCommandEvent& event );
699  void RemAllProtTitles( wxCommandEvent& event );
700  void BulkCdsEdit ( wxCommandEvent& event );
701  void BulkGeneEdit ( wxCommandEvent& event );
702  void BulkRnaEdit ( wxCommandEvent& event );
703  void BulkMiscFeatEdit(wxCommandEvent& event);
704  void CorrectGenes ( wxCommandEvent& event );
705  void SegregateSets ( wxCommandEvent& event );
706  void SequesterSets ( wxCommandEvent& event );
707  void DescriptorPropagateDown( wxCommandEvent& event );
708  void WithdrawSequences ( wxCommandEvent& event );
709  void AddSet ( wxCommandEvent& event );
710  void PropagateDBLink ( wxCommandEvent& event );
711  void ConvertSetType ( wxCommandEvent& event );
712  void ListMacroButtonNames ( wxCommandEvent& event );
713  void TestDialogView( wxCommandEvent& event );
714  void TestFormView( wxCommandEvent& event );
715  void PrepareSeqSubmit(wxCommandEvent& event);
717  void ChangeToGenomicDna();
719  void SaveSubmissionFile(wxCommandEvent& event);
720  void SaveASN1File(wxCommandEvent& event);
721  void MacroEditor( wxCommandEvent& event );
722  void AdjustForConsensusSpliceSites( wxCommandEvent& event );
723  void AdjustCDSForIntrons(wxCommandEvent& event);
724  void AdjustrRNAForIntrons(wxCommandEvent& event);
725  void AdjusttRNAForIntrons(wxCommandEvent& event);
726  void AdjustmRNAForIntrons(wxCommandEvent& event);
727  void CombineSelectedGenesIntoPseudogenes( wxCommandEvent& evt );
728  void GeneFromOtherFeat( wxCommandEvent& evt );
729  void CdsFromGeneMrnaExon( wxCommandEvent& evt );
730  void mRNAFromGeneCdsExon( wxCommandEvent& evt );
731  void tRNAFromGene( wxCommandEvent& evt );
732  void ExonFromCds( wxCommandEvent& evt );
733  void ExonFromMRNA( wxCommandEvent& evt );
734  void ExonFromTRNA( wxCommandEvent& evt );
735  void LatLonTool ( wxCommandEvent& event );
736  void CDSGeneRangeErrorSuppress( wxCommandEvent& event );
737  void CDSGeneRangeErrorRestore( wxCommandEvent& event );
738  void SuppressGenes(wxCommandEvent& evt);
739  void RemoveSegGaps( wxCommandEvent& event );
740  void RawSeqToDeltaByNs( wxCommandEvent& event );
741  void RawSeqToDeltaByLoc( wxCommandEvent& event );
742  void RawSeqToDeltaByAssemblyGapFeatures(wxCommandEvent& event);
743  void SplitCDSwithTooManyXs( wxCommandEvent& event );
744  void AdjustFeaturesForGaps( wxCommandEvent& event );
745  void DeltaSeqToRaw( wxCommandEvent& event );
746  void ExpandGaps(wxCommandEvent& event);
747  void ConvertSelectedGapsToKnown(wxCommandEvent& event);
748  void ConvertSelectedGapsToUnknown(wxCommandEvent& event);
749  void ConvertGapsBySize(wxCommandEvent& event);
750  void EditSelectedGaps(wxCommandEvent& event);
751  void CreateGapFeats(wxCommandEvent& event);
752  void AddLinkageToGaps(wxCommandEvent& event);
753  void ConvertFeatsToGaps(wxCommandEvent& event);
754  void CombineAdjacentGaps(wxCommandEvent& event);
755  void RmCultureNotes( wxCommandEvent& event );
756  void Update_Replaced_EC_numbers( wxCommandEvent& event );
757  void UpdateSingleSequence(wxCommandEvent& event);
758  void UpdateMultipleSequences(wxCommandEvent& event);
759  void ImportFeatureTable( wxCommandEvent& event );
760  void ImportFeatureTableClipboard( wxCommandEvent& event );
761  void ImportGFF3(wxCommandEvent& event);
762  void LoadSecondaryAccessions(wxCommandEvent& event);
763  void LoadSecondaryAccessionsHistoryTakeover(wxCommandEvent& event);
764  void AddGlobalCodeBreak( wxCommandEvent& event );
765  void GroupExplode( wxCommandEvent& event);
766  void FindASN1( wxCommandEvent& evt );
767  void FuseFeatures( wxCommandEvent& evt );
768  void FuseJoinsInLocs(wxCommandEvent& event);
769  void ExplodeRNAFeats(wxCommandEvent& event);
770  void ApplyStructuredCommentField( wxCommandEvent& evt );
771  void EditStructuredCommentPrefixSuffix( wxCommandEvent& evt );
772  void RemoveDbXrefsCDS( wxCommandEvent& evt );
773  void RemoveDbXrefsGenes( wxCommandEvent& evt );
774  void RemoveDbXrefsRNA( wxCommandEvent& evt );
775  void RemoveDbXrefsAllFeats( wxCommandEvent& evt );
776  void RemoveDbXrefsBioSource( wxCommandEvent& evt );
777  void RemoveDbXrefsBioSourceAndFeats( wxCommandEvent& evt );
778  void RemoveTaxonFeats( wxCommandEvent& event);
779  void RemoveTaxonFeatsAndBioSource( wxCommandEvent& event);
780  void AddKeywordGDS( wxCommandEvent& event );
781  void AddKeywordTPA_inferential( wxCommandEvent& event );
782  void AddKeywordTPA_experimental( wxCommandEvent& event );
783  void AddKeywordTPA_assembly( wxCommandEvent& event );
784  void AddKeywordWithConstraint( wxCommandEvent& event );
785  void EditSeqId( wxCommandEvent& event );
786  void RemoveLocalSeqIdsFromNuc(wxCommandEvent& event);
787  void RemoveLocalSeqIdsFromProt(wxCommandEvent& event);
788  void RemoveLocalSeqIdsFromAll(wxCommandEvent& event);
789  void RemoveGiSeqIdsFromAll(wxCommandEvent& event);
790  void RemoveGenbankSeqIdsFromProt(wxCommandEvent& event);
791  void RemoveGenbankSeqIdsFromAll(wxCommandEvent& event);
792  void RemoveSeqIdNamesFromProtFeats(wxCommandEvent& event);
793  void ConvertAccessionToLocalIdsAll(wxCommandEvent& event);
794  void ConvertAccessionToLocalIdsNuc(wxCommandEvent& event);
795  void ConvertAccessionToLocalIdsProt(wxCommandEvent& event);
796  void ConvertAccessionToLocalIdsName(wxCommandEvent& event);
797  void LocalToGeneralId(wxCommandEvent& event);
798  void GeneralToLocalId(wxCommandEvent& event);
799  void RemoveGeneralId( wxCommandEvent& event );
800  void RemoveUnnecessaryExceptions(wxCommandEvent& event);
801  void EditHistory( wxCommandEvent& event );
802  void ConvertToDelayedGenProdSetQuals( wxCommandEvent& event);
803  void ConvertRptUnitRangeToLoc( wxCommandEvent& event);
804  void ReorderSeqById( wxCommandEvent& event);
805  void LinkmRNACDS( wxCommandEvent& event );
806  void JustRemoveProteins( wxCommandEvent& event );
807  void RemoveProteinsAndRenormalizeNucProtSets( wxCommandEvent& event );
808  void RemoveOrphanedProteins( wxCommandEvent& event );
809  void GeneFeatFromXrefs( wxCommandEvent& event );
810  void GeneXrefsFromFeats( wxCommandEvent& event );
811  void RemoveAllGeneXrefs( wxCommandEvent& event );
812  void RemoveUnnecessaryGeneXrefs( wxCommandEvent& event );
813  void RemoveNonsuppressingGeneXrefs( wxCommandEvent& event );
814  void RemoveOrphanLocusGeneXrefs( wxCommandEvent& event );
815  void RemoveOrphanLocus_tagGeneXrefs( wxCommandEvent& event );
816  void RemoveGeneXrefs( wxCommandEvent& event );
817  void ExtendCDS( wxCommandEvent& event );
818  void TruncateCDS( wxCommandEvent& event );
819  void ExtendCDSToStop( wxCommandEvent& event );
820  void RecomputeIntervalsAndUpdateGenes(wxCommandEvent& event);
821  void RecomputeIntervals(wxCommandEvent& event);
822  void FixProductNamesDefault( wxCommandEvent& event );
823  void FixProductNamesOptions( wxCommandEvent& event );
824  void BulkApplyGenCode( wxCommandEvent& event );
825  void EditSeqEndsWithAlign( wxCommandEvent& event );
826  void EditSequenceEnds( wxCommandEvent& event );
827  void UpdateAlign( wxCommandEvent& event );
828  void CreateProteinId( wxCommandEvent& event );
829  void CreateLocusTagGene( wxCommandEvent& event );
830  void NormalizeGeneQuals(wxCommandEvent& event);
831  void GenusSpeciesFixup( wxCommandEvent& event );
832  void CountryConflict( wxCommandEvent& event );
833  void AddSecondary( wxCommandEvent& event );
834  void PackageFeaturesOnParts( wxCommandEvent& event );
835  void ShowFeatureTable ( wxCommandEvent& event );
836  void SaveDescriptors( wxCommandEvent& event );
837  void CreateSeqHistForTpaDetailed( wxCommandEvent& event );
838  void CreateSeqHistForTpa( wxCommandEvent& event );
839  void RemoveSeqHistAssembly( wxCommandEvent& event );
840  void CompareWithBiosample( wxCommandEvent& event );
841  void CompareWithBiosampleFirstOnly( wxCommandEvent& event );
842  void BarcodeTool( wxCommandEvent& event );
843  void ApplyFBOL(wxCommandEvent& event);
844  void RestoreLocalFile ( wxCommandEvent& event );
845  void FarPointerSeq( wxCommandEvent& event );
846  void ConvertBadCdsAndRnaToMiscFeat(wxCommandEvent& event);
847  void EditCdsFrame(wxCommandEvent& event);
848  void RestoreRNAediting(wxCommandEvent& event);
849  void ViewSortedProteins(wxCommandEvent& event);
850  void ConsolidateLikeModsWithSemicolon(wxCommandEvent& event);
851  void ConsolidateLikeModsWithoutSemicolon(wxCommandEvent& event);
852  void ConvertSecondProtNameToDesc(wxCommandEvent& event);
853  void ConvertDescToSecondProtName(wxCommandEvent& event);
854  void ConvertDescToFeatComment(wxCommandEvent& event);
855  void ConvertDescToFeatSource(wxCommandEvent& event);
856  void ConvertDescToFeatPub(wxCommandEvent& event);
857  void ConvertDescToFeatPubConstraint(wxCommandEvent& event);
858  void ConvertFeatToDescComment(wxCommandEvent& event);
859  void ConvertFeatToDescSource(wxCommandEvent& event);
860  void ConvertFeatToDescPub(wxCommandEvent& event);
861  void Duplicate(wxCommandEvent& event);
862  void ExportStructuredCommentsTable(wxCommandEvent& evt);
863  void LoadStructComments(wxCommandEvent& event);
864  void CorrectIntervalOrder( wxCommandEvent& event );
865  void SuspectProductRulesEditor(wxCommandEvent& event);
866  void CheckForMixedStrands(wxCommandEvent& event);
867  void EnableHupId(wxCommandEvent& event);
868  void IndexerTypeSelection(wxCommandEvent& event);
869  void FixForTransSplicing(wxCommandEvent& evt);
870  void RemoveDuplicateGoTerms(wxCommandEvent& evt);
871  void Help(wxCommandEvent& evt);
872  void UpdateTargetedLocusName(wxCommandEvent& evt);
873 
874 protected:
875  void x_OnSelectionEvent(CEvent* event);
876 
877 private:
880  wxString m_WorkDir;
886  vector<CRef<CSeq_loc> > m_CachedSelectedLocations;
888  bool m_IsAa;
889  bool m_IsSeq;
891  vector<CRef<CSeq_loc> > &x_GetSelectedLocations();
895  void SaveSettings(const string &regpath, wxWindow *dlg) const;
896  void LoadSettings(const string &regpath, wxWindow *dlg);
898 };
899 
901 {
903 }
904 
906 {
909  m_Workbench = wb;
910  m_attached = false;
911  m_disable_hup_check = false;
912  m_disable_id_check = false;
913  wxWindow* main_window = NULL;
914  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
915  if (wb_frame)
916  main_window = wb_frame->GetMainWindow();
917  CEditingBtnsPanel::GetInstance(main_window, m_Workbench, true);
918 }
919 
921 {
922  if (m_Workbench && m_attached)
923  {
925  if (service)
926  {
927  service->RemoveListener(this);
928  m_attached = false;
929  }
930  }
931 }
932 
934 {
935  m_SelObjects.clear();
937  if (service) {
938  service->GetActiveObjects(m_SelObjects);
939  if (m_SelObjects.empty())
940  {
942  }
944  }
945 }
946 
948 {
950  m_WorkDir.Clear();
953  if (!wb) return;
954  if (!m_attached)
955  {
956  m_SelObjects.clear();
958  if (service)
959  {
960  service->AddListener(this);
961  service->GetActiveObjects(m_SelObjects);
962  if (m_SelObjects.empty())
963  {
965  }
967  m_attached = true;
968  }
969  }
970 
972  if (objects.empty()) return;
974  const CSeq_submit* sub = dynamic_cast<const CSeq_submit*>((*it).object.GetPointer());
975  if (sub) {
976  m_SeqSubmit.Reset(sub);
977  }
978  if (!m_TopSeqEntry && it->object && it->scope) {
980  if (seh) {
981  m_TopSeqEntry = seh;
982  if (m_SeqSubmit) {
983  break;
984  }
985  }
986  }
987  }
988  if (!m_TopSeqEntry) return;
990  if (srv)
991  {
992  CRef<CGBWorkspace> ws = srv->GetGBWorkspace();
993  if (!ws) return;
994 
995  CGBDocument* doc = dynamic_cast<CGBDocument*>(ws->GetProjectFromScope(m_TopSeqEntry.GetScope()));
996  if (doc) {
998  m_WorkDir = doc->GetWorkDir();
999  }
1000  }
1001 
1002 }
1003 
1005 {
1007 }
1008 
1009 
1011 {
1012  m_CachedSelectedLocations.clear();
1013  m_IsSeq = false;
1014 
1015  if (!m_Workbench) {
1016  return;
1017  }
1018 
1020  if (objects.empty()) return;
1021  size_t count = 0;
1023  const CObject* ptr = it->object.GetPointer();
1024 
1025  const CSeq_feat* seqfeat = dynamic_cast<const CSeq_feat*>(ptr);
1026  const CSeq_loc* seqloc = dynamic_cast<const CSeq_loc*>(ptr);
1027  const CBioseq* bioseq = dynamic_cast<const CBioseq*>(ptr);
1028  const CSeqdesc* seqdesc = dynamic_cast<const CSeqdesc*>(ptr);
1029  const CPubdesc* pubdesc = dynamic_cast<const CPubdesc*>(ptr);
1030 
1031  const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>(ptr);
1032  const CBioseq_set* bioseqset = dynamic_cast<const CBioseq_set*>(ptr);
1033 
1034  const CSeq_align* align = dynamic_cast<const CSeq_align*>(ptr);
1035  const CSeq_id* seq_id = dynamic_cast<const CSeq_id*>(ptr);
1036 
1037  if (seqfeat) {
1038  if (seqfeat->IsSetLocation()) {
1039  CRef<CSeq_loc> loc(new CSeq_loc());
1040  loc->Assign(seqfeat->GetLocation());
1041  m_CachedSelectedLocations.push_back(loc);
1042  }
1043  m_IsSeq = false;
1044  } else if (seq_id && !CSeqUtils::IsVDBAccession(seq_id->GetSeqIdString())) {
1045  CBioseq_Handle bsh = it->scope->GetBioseqHandle(*seq_id);
1046  if (bsh) {
1047  CRef<CSeq_id> new_id(new CSeq_id());
1048  new_id->Assign(*seq_id);
1049  CRef<CSeq_loc> loc(new CSeq_loc(*new_id, 0, bsh.GetInst_Length() - 1));
1050  m_CachedSelectedLocations.push_back(loc);
1051  m_IsSeq = true;
1052  if (count == 0)
1053  m_IsAa = bsh.IsAa();
1054  }
1055  } else if (seqloc) {
1056 
1057  if (seqloc->IsWhole()) {
1058  CRef<CSeq_id> new_id(new CSeq_id());
1059  new_id->Assign(seqloc->GetWhole());
1060  CBioseq_Handle bsh = it->scope->GetBioseqHandle(*new_id);
1061  if (bsh) {
1062  CRef<CSeq_loc> loc(new CSeq_loc(*new_id, 0, bsh.GetInst_Length() - 1));
1063  m_CachedSelectedLocations.push_back(loc);
1064  }
1065  } else {
1066  CRef<CSeq_loc> loc(new CSeq_loc());
1067  loc->Assign(*seqloc);
1068  m_CachedSelectedLocations.push_back(loc);
1069  }
1070  CBioseq_Handle bsh = it->scope->GetBioseqHandle(*seqloc);
1071  if (bsh)
1072  {
1073  m_IsSeq = true;
1074  if (count == 0)
1075  m_IsAa = bsh.IsAa();
1076  }
1077  count++;
1078  } else if (bioseq) {
1079  CRef<CSeq_loc> loc(new CSeq_loc());
1080  loc->SetInt().SetId().Assign(*(bioseq->GetId().front()));
1081  loc->SetInt().SetFrom(0);
1082  loc->SetInt().SetTo(bioseq->GetLength() - 1);
1083  m_CachedSelectedLocations.push_back(loc);
1084  m_IsSeq = true;
1085  if (count == 0)
1086  m_IsAa = bioseq->IsAa();
1087  } else if (seqdesc) {
1088  CSeq_entry_Handle seh = edit::GetSeqEntryForSeqdesc(it->scope, *seqdesc);
1089  if (!seh) {
1090  CScope::TTSE_Handles tses;
1092  if (!tses.empty())
1093  seh = tses.front();
1094  }
1095 
1096  CBioseq_CI bi(seh);
1097  while (bi) {
1098  CRef<CSeq_loc> loc(new CSeq_loc());
1099  loc->SetInt().SetId().Assign(*(bi->GetId().front().GetSeqId()));
1100  loc->SetInt().SetFrom(0);
1101  loc->SetInt().SetTo(bi->GetInst_Length() - 1);
1102  m_CachedSelectedLocations.push_back(loc);
1103  ++bi;
1104  }
1105  m_IsSeq = false;
1106  } else if (pubdesc) {
1107  CSeq_entry_Handle seh = GetSeqEntryForPubdesc(it->scope, *pubdesc);
1108  CBioseq_CI bi(seh);
1109  while (bi) {
1110  CRef<CSeq_loc> loc(new CSeq_loc());
1111  loc->SetInt().SetId().Assign(*(bi->GetId().front().GetSeqId()));
1112  loc->SetInt().SetFrom(0);
1113  loc->SetInt().SetTo(bi->GetInst_Length() - 1);
1114  m_CachedSelectedLocations.push_back(loc);
1115  ++bi;
1116  }
1117  m_IsSeq = false;
1118  } else if (annot) {
1119  if (annot->IsSetData() &&
1120  annot->GetData().IsFtable() &&
1121  !annot->GetData().GetFtable().empty() &&
1122  annot->GetData().GetFtable().front()->IsSetLocation()) {
1123 
1124  CRef<CSeq_loc> loc(new CSeq_loc());
1125  loc->Assign(annot->GetData().GetFtable().front()->GetLocation());
1126  m_CachedSelectedLocations.push_back(loc);
1127  }
1128  m_IsSeq = false;
1129  } else if (bioseqset) {
1130  if (bioseqset->IsSetClass() && bioseqset->GetClass() == CBioseq_set::eClass_nuc_prot)
1131  {
1132  const CBioseq& bseq = bioseqset->GetNucFromNucProtSet();
1133  CRef<CSeq_loc> loc(new CSeq_loc());
1134  loc->SetInt().SetId().Assign(*(bseq.GetId().front()));
1135  loc->SetInt().SetFrom(0);
1136  loc->SetInt().SetTo(bseq.GetLength() - 1);
1137  m_CachedSelectedLocations.push_back(loc);
1138  }
1139  else
1140  {
1141  CSeq_entry* seq = bioseqset->GetParentEntry();
1142  if (seq)
1143  {
1144  m_CachedSelectedLocations.clear();
1145  }
1146  }
1147  m_IsSeq = false;
1148  } else if (align) {
1149  CSeq_align::TDim entry_row = x_FindRelevantAlignRow(*align, dynamic_cast<const CSeq_id*>(objects.back().object.GetPointer()));
1150  CRef<CSeq_loc> loc = align->CreateRowSeq_loc(entry_row);
1151  m_CachedSelectedLocations.push_back(loc);
1152  m_IsSeq = true;
1153  if (count == 0)
1154  m_IsAa = it->scope->GetBioseqHandle(*loc).IsAa();
1155  }
1156 
1157  }
1158  if (count > 1)
1159  {
1160  m_IsSeq = false;
1161  }
1162  if (!m_TopSeqEntry && !m_CachedSelectedLocations.empty()) {
1163  CBioseq_Handle bsh = objects.front().scope->GetBioseqHandle(*(m_CachedSelectedLocations.front()->GetId()));
1164  if (bsh)
1166  }
1167 }
1168 
1170 {
1171  // the relevant row corresponds to the subject sequence, which is the second one by default
1172  CSeq_align::TDim row = 1;
1173  if (align.GetSegs().IsSpliced()) {
1174  // looking for genomic sequence, which is always 1 in spliced-segs
1175  row = 1;
1176  }
1177  if (id)
1178  {
1179  CSeq_align::TDim num_rows = align.CheckNumRows();
1180  for (CSeq_align::TDim i = 0; i < num_rows; i++)
1181  {
1182  const CSeq_id &row_id = align.GetSeq_id(i);
1183  if (row_id.Match(*id))
1184  {
1185  row = i;
1186  break;
1187  }
1188  }
1189  }
1190  return row;
1191 }
1192 
1194 {
1196  event.Enable(m_TopSeqEntry && m_CmdProccessor);
1197 }
1198 
1200 {
1202  {
1203  CRef<CSeq_id> id(new CSeq_id("MF358689", CSeq_id::fParse_Default));
1204  CBioseq_Handle bsh;
1205  try
1206  {
1207  bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*id);
1208  }
1209  catch (const exception&)
1210  {
1211  wxMessageBox(wxT("Error while attempting to connect to the ID server, restarting gbench is recommended"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
1212  m_disable_hup_check = true;
1213  }
1214  if (bsh)
1215  return true;
1216  }
1217  return false;
1218 }
1219 
1221 {
1224  {
1225  event.Enable(true);
1226  event.Check(TestHupIdEnabled());
1227  return;
1228  }
1229  event.Check(false);
1230  event.Enable(false);
1231 }
1232 
1234 {
1235  vector<CRef<CSeq_loc> >& locs = x_GetSelectedLocations();
1236 
1237  if (!RunningInsideNCBI() && (m_TopSeqEntry || !locs.empty()))
1238  {
1239  evt.Enable(true);
1240  return;
1241  }
1242 
1243  if (!m_IsSeq)
1244  {
1245  evt.Enable(false);
1246  return;
1247  }
1248 
1249 
1250  bool rval = false;
1251  bool ok_for_something = false;
1253  ITERATE(vector<CRef<CSeq_loc> >, lit, locs) {
1254  if (x_IsLocationOkForFeatCmd(subtype, *lit)) {
1255  rval = true;
1256  ok_for_something |= true;
1257  break;
1258  }
1260  ok_for_something |= true;
1261  }
1263  ok_for_something |= true;
1264  }
1265 
1266  }
1267  evt.Enable(rval);
1268 
1269  if (!ok_for_something && m_TopSeqEntry && !m_disable_id_check)
1270  {
1271  CRef<CSeq_id> id(new CSeq_id("U12345", CSeq_id::fParse_Default));
1272  CBioseq_Handle bsh;
1273  try
1274  {
1275  bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*id);
1276  }
1277  catch (const exception&)
1278  {
1279  wxMessageBox(wxT("Unable to connect to the ID server, restarting gbench is recommended"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
1280  m_disable_id_check = true;
1281  }
1282  }
1283 }
1284 
1285 
1286 
1287 // Implementation
1288 vector<CUICommand*> CSeqEditPackage::GetCommands()
1289 {
1290  vector<CUICommand*> commands;
1291  commands.push_back(new CUICommand(eCmdRemoveDescriptors, "Remove Descriptors", "Remove Descriptors from Selected Object", "RDSO"));
1292  commands.push_back(new CUICommand(eCmdRemoveFeatures, "Remove Features", "Remove Features from Selected Object", "RFSO"));
1293  commands.push_back(new CUICommand(eCmdFixForTransSplicing, "Fix For Trans-splicing", "Fix For Trans-splicing", "FFTS"));
1294  commands.push_back(new CUICommand(eCmdRemoveUnindexedFeatures, "Remove Unindexed Features", "Remove Unindexed Features", "RUIF"));
1295  commands.push_back(new CUICommand(eCmdApplyIndexerComments, "Apply Indexer Comments", "Apply Indexer Comments", "AICS"));
1296  commands.push_back(new CUICommand(eCmdRemoveSeqAnnotIds, "Remove Seq-annot IDs", "Remove Seq-annot IDs from Selected Object", "RSAID"));
1297  commands.push_back(new CUICommand(eCmdRemoveCddFeatDbxref, "Remove All CDD Features and DBxrefs", "Remove All CDD Features and Dbxrefs", "RACFAD"));
1298  commands.push_back(new CUICommand(eCmdRemoveBankitComment, "Remove Bankit Comments", "Remove Bankit Comments from Selected Object", "RBC"));
1299  commands.push_back(new CUICommand(eCmdRemoveDuplicateStructuredComments, "Remove Duplicate Structured Comments", "Remove Duplicate Structured Comments from Selected Object", "RDSC"));
1300  commands.push_back(new CUICommand(eCmdRemoveSequencesFromAlignments, "Remove Sequences from Alignments", "Remove Sequences From Alignments from Selected Object", "RSFASO"));
1301  commands.push_back(new CUICommand(eCmdRemoveSequences, "Remove Sequences from Record", "Remove Sequences from Selected Object", "RSSO"));
1302  commands.push_back(new CUICommand(eCmdRemoveSequences_ext, "Remove Sequences", "Remove Sequences from Selected Object", "RSSO"));
1303  commands.push_back(new CUICommand(eCmdJustRemoveProteins, "Just Remove Proteins", "Just Remove Proteins", "JRP"));
1304  commands.push_back(new CUICommand(eCmdRemoveProteinsAndRenormalizeNucProtSets, "And Renormalize Nuc-Prot Sets", "And Renormalize Nuc-Prot Sets", "RPRNPS"));
1305  commands.push_back(new CUICommand(eCmdRemoveOrphanedProteins, "Orphaned Proteins", "Orphaned Proteins", "ROP"));
1306  commands.push_back(new CUICommand(eCmdRemoveSet,"RemoveSet", "RemoveSet","RSET"));
1307  commands.push_back(new CUICommand(eCmdRemoveSetsFromSet,"Remove Sets in Set", "Remove Sets in Set", "RSIS"));
1308  commands.push_back(new CUICommand(eCmdRevCompSequences, "Bioseq RevComp by ID", "Reverse Complement Sequences from Selected Object", "RVCS"));
1309  commands.push_back(new CUICommand(eCmdRevCompSequences_ext, "Reverse Complement Sequences by Sequence ID", "Reverse Complement Sequences from Selected Object", "RVCS"));
1310  commands.push_back(new CUICommand(eCmdBioseqFeatsRevComp, "BioseqFeatsRevComp", "Reverse Complement Sequences and Features", "RVCSF"));
1311  commands.push_back(new CUICommand(eCmdBioseqOnlyRevComp,"BioseqOnlyRevComp","Reverse Complement Sequences and Graphs", "RVCSG"));
1312  commands.push_back(new CUICommand(eCmdUnculTaxTool,"Uncultured Tax Tool", "Uncultured Tax Tool", "UCTT"));
1313  commands.push_back(new CUICommand(eCmdMergeBiosources, "Merge Multiple BioSources On Sequence", "Merge Multiple BioSources On Sequence", "MMBS"));
1314  commands.push_back(new CUICommand(eCmdCompareWithBiosample, "All Records", "Compare with Biosample", "CWBS"));
1315  commands.push_back(new CUICommand(eCmdCompareWithBiosampleFirstOnly, "First Record Only", "Compare with Biosample", "CWBSFO"));
1316  commands.push_back(new CUICommand(eCmdConsolidateLikeModsWithSemicolon, "With semicolons", "With semicolons", "CLMS"));
1317  commands.push_back(new CUICommand(eCmdConsolidateLikeModsWithoutSemicolon, "Without semicolons", "Without semicolons", "CLMWS"));
1318  commands.push_back(new CUICommand(eCmdBarcodeTool, "BARCODE Discrepancy Tool", "BARCODE Discrepancy Tool", "BDISTL"));
1319  commands.push_back(new CUICommand(eCmdApplyFBOL, "Apply FBOL Dbxrefs", "Apply FBOL Dbxrefs", "AFBOL"));
1320  commands.push_back(new CUICommand(eCmdEditSequence, "Edit Sequence", "Edit Sequence", "EDSEQ"));
1321  commands.push_back(new CUICommand(eCmdAlignmentAssistant, "Alignment Assistant", "Alignment Assistant", "ALAS"));
1322  commands.push_back(new CUICommand(eCmdRemoveAlignments, "Remove Alignments", "Remove Alignments from Selected Object", "RASO"));
1323  commands.push_back(new CUICommand(eCmdRemoveGraphs, "Remove Graphs", "Remove Graphs from Selected Object", "RGSO"));
1324  commands.push_back(new CUICommand(eCmdRemoveGenomeProjectId, "Remove All Genome Project IDs", "Remove All Genome Project Ids from Selected Object", "RGPIDSO"));
1325  commands.push_back(new CUICommand(eCmdRemoveEmptyGenomeProjectId, "Remove Empty Genome Project IDs", "Remove Empty Genome Project Ids from Selected Object", "REGPIDSO"));
1326  commands.push_back(new CUICommand(eCmdTaxFixCleanup, "Tax_fix/Cleanup", "Fix Taxonomy and Perform Basic and Extended Cleanup", "TFCU"));
1327  commands.push_back(new CUICommand(eCmdTaxFixCleanup_ext, "Lookup Taxonomy and Cleanup Record", "Lookup Taxonomy and Cleanup Record", "TFCU"));
1328  commands.push_back(new CUICommand(eCmdSpecificHostCleanup, "Specific Host Cleanup", "Specific Host Cleanup", "SHCU"));
1329  commands.push_back(new CUICommand(eCmdExtendedCleanup, "SeriousSeqEntryCleanup", "Perform Basic and Extended Cleanup", "SSEC"));
1330  commands.push_back(new CUICommand(eCmdFixNonReciprocalLinks, "Fix Non-Reciprocal Links", "Fix Non-Reciprocal Feature ID Links", "FNRL"));
1331  commands.push_back(new CUICommand(eCmdDisableStrainForwarding, "Globally Disable Strain Forwarding", "Globally Disable Strain Forwarding", "GDSF"));
1332  commands.push_back(new CUICommand(eCmdEnableStrainForwarding, "Globally Enable Strain Forwarding", "Globally Disable Strain Forwarding", "GESF"));
1333  commands.push_back(new CUICommand(eCmdEditPubs, "Edit Publications", "Edit Publications", "EP"));
1334  commands.push_back(new CUICommand(eCmdGlobalPubmedIdLookup, "Global PubMedId Lookup", "Global PubMedId Lookup", "GPMIDL"));
1335  commands.push_back(new CUICommand(eCmdFixCapitalizationAll, "Fix All Capitalization", "Fix All Capitalization for Selected Object", "FACSO"));
1336  commands.push_back(new CUICommand(eCmdFixCapitalizationAuthors, "Fix Capitalization in Authors", "Fix Capitalization in Authors for Selected Object", "FCASO"));
1337  commands.push_back(new CUICommand(eCmdFixCapitalizationTitles, "Fix Capitalization in Titles", "Fix Capitalization in Titles for Selected Object", "FCTSO"));
1338  commands.push_back(new CUICommand(eCmdFixCapitalizationAffiliation, "Fix Capitalization in Affiliations", "Fix Capitalization in Affiliations for Selected Object", "FCAfSO"));
1339  commands.push_back(new CUICommand(eCmdFixCapitalizationCountry, "Fix Capitalization in Countries", "Fix Capitalization in Countries for Selected Object", "FCCSO"));
1340  commands.push_back(new CUICommand(eCmdRemoveUnpublishedPublications, "Remove Unpublished Publications", "Remove Unpublished Publications from Selected Object", "RUPSO"));
1341  commands.push_back(new CUICommand(eCmdRemoveInPressPublications, "Remove In Press Publications", "Remove In Press Publications from Selected Object", "RIPSO"));
1342  commands.push_back(new CUICommand(eCmdRemovePublishedPublications, "Remove Published Publications", "Remove Published Publications from Selected Object", "RPPSO"));
1343  commands.push_back(new CUICommand(eCmdRemoveCollidingPublications, "Remove Colliding Publications", "Remove Colliding Publications from Selected Object", "RCPSO"));
1344  commands.push_back(new CUICommand(eCmdRemoveAllPublications, "Remove All Publications", "Remove All Publications from Selected Object", "RAPSO"));
1345  commands.push_back(new CUICommand(eCmdRemoveAuthorConsortiums, "Remove Author Consortiums", "Remove Author Consortiums from Selected Object", "RACSO"));
1346  commands.push_back(new CUICommand(eCmdReverseAuthorNames, "Reverse Author Names", "Reverse Author Names for Selected Object", "RANSO"));
1347  commands.push_back(new CUICommand(eCmdStripAuthorSuffixes, "Strip Author Suffixes", "Strip Author Suffixes from Selected Object", "SASSO"));
1348  commands.push_back(new CUICommand(eCmdTruncateAuthorMiddleInitials, "Truncate Author Middle Initials", "Truncate Author Middle Initials from Selected Object", "TAMISO"));
1349  commands.push_back(new CUICommand(eCmdConvertAuthorToConstortiumWhereLastName, "Convert Author to Consortium where Last Name Contains Consortium", "Convert Author To Consortium Where Last Name Contains Consortium For Selected Object", "CATCWLSO"));
1350  commands.push_back(new CUICommand(eCmdConvertAuthorToConsortiumAll, "Convert All Authors to Consortium", "Convert All Authors To Consortium For Selected Object", "CAATCSO"));
1351  commands.push_back(new CUICommand(eCmdAddCitSubForUpdate, "Add Cit-sub for Update", "Add Cit-sub For Update for Selected Object", "ACSFUSO"));
1352  commands.push_back(new CUICommand(eCmdFixUsaAndStates, "Fix USA and States", "Fix USA and States for Selected Object", "FUSSO"));
1353  commands.push_back(new CUICommand(eCmdRetranslateCDSObeyStop, "Obey Stop Codon", "Retranslate CDS, obey stop codon", "RCDSOSC"));
1354  commands.push_back(new CUICommand(eCmdRetranslateCDSIgnoreStopExceptEnd, "Ignore Stop Codon Except at End of Complete CDS", "Retranslate CDS, Ignore Stop Codon Except at End of Complete CDS", "RCDSISCEAE"));
1355  commands.push_back(new CUICommand(eCmdRetranslateCDSIgnoreStopExceptEnd_ext, "Retranslate Coding Regions", "Retranslate CDS, Ignore Stop Codon Except at End of Complete CDS", "RCDSISCEAE"));
1356  commands.push_back(new CUICommand(eCmdRetranslateCDSChooseFrame, "Choose Frame with No Stop Codon", "Retranslate CDS, Choose Frame With No Stop Codon", "RCDSCF"));
1357  commands.push_back(new CUICommand(eCmdEditCdsFrame, "Edit Coding Region Frame", "Edit Coding Region Frame", "ECRF"));
1358  commands.push_back(new CUICommand(eCmdRestoreRNAediting, "Restore RNA Editing of CDS", "Restore RNA Editing", "RRNAE"));
1359  commands.push_back(new CUICommand(eCmdResynchronizePartialsCDS, "Resynchronize CDS Partials", "Resynchronize CDS Partials", "RCDSP"));
1360  commands.push_back(new CUICommand(eCmdAddTranslExcept, "Add Translational Exceptions with Comment", "Add Translational Exceptions with Comment", "ATEWC"));
1361  commands.push_back(new CUICommand(eCmdRemoveAllStructuredComments,"Remove All Structured Comments","Remove All Structured Comments from Selected Object","RASCSO"));
1362  commands.push_back(new CUICommand(eCmdRemoveEmptyStructuredComments,"Remove Empty Structured Comments","Remove Empty Structured Comments from Selected Object","RESCSO"));
1363  commands.push_back(new CUICommand(eCmdModifyStructuredComment,"Remove Structured Comment Field","Remove Structured Comment Field from Selected Object","RSCFSO"));
1364  commands.push_back(new CUICommand(eCmdSetGlobalRefGeneStatus, "Set Global RefGene Status", "Set Global RefGene Status", "SGRGS"));
1365  commands.push_back(new CUICommand(eCmdClearKeywords, "Clear Keywords", "Clear Keywords", "CLKW"));
1366  commands.push_back(new CUICommand(eCmdClearNomenclature, "Clear Nomenclature", "Clear Nomenclature", "CLNMC"));
1367  commands.push_back(new CUICommand(eCmdConvertToDelayedGenProdSetQuals,"Convert to Delayed Gen-Prod-Set Qualifiers", "Convert to Delayed Gen-Prod-Set Qualifiers", "CDGPSQ"));
1368  commands.push_back(new CUICommand(eCmdConvertRptUnitRangeToLoc, "Convert Repeat-region Rpt-unit-range to Location", "Convert repeat-region rpt-unit-range to location", "CRRL"));
1369  commands.push_back(new CUICommand(eCmdRemoveStructuredCommentKeyword,"Remove Structured Comment Keyword","Remove Structured Comment Keyword from Selected Object","RSCKSO"));
1370  commands.push_back(new CUICommand(eCmdAddStructuredCommentKeyword ,"Add Structured Comment Keyword","Add Structured Comment Keyword to Selected Object","ASCKSO"));
1371  commands.push_back(new CUICommand(eCmdAddKeywordGDS,"GDS", "Add Keyword GDS", "AKG"));
1372  commands.push_back(new CUICommand(eCmdAddKeywordTPA_inferential,"TPA:inferential","Add Keyword TPA:inferential", "AKTI"));
1373  commands.push_back(new CUICommand(eCmdAddKeywordTPA_experimental,"TPA:experimental","Add Keyword TPA:experimental","AKTE"));
1374  commands.push_back(new CUICommand(eCmdAddKeywordTPA_assembly,"TPA:assembly","Add Keyword TPA:assembly","AKTA"));
1375  commands.push_back(new CUICommand(eCmdAddKeywordWithConstraint, "With Constraint", "Add Keyword With Constraint", "AKWC"));
1376  commands.push_back(new CUICommand(eCmdAddGenomeAssemblyStructuredComment, "Add Genome Assembly Structured Comment", "Add Genome Assembly Structured Comment", "AGASC"));
1377  commands.push_back(new CUICommand(eCmdAddAssemblyStructuredComment, "Add Assembly Structured Comment", "Add Assembly Structured Comment", "AASC"));
1378  commands.push_back(new CUICommand(eCmdReorderStructuredComment,"Reorder Structured Comment","Reorder Structured Comment in Selected Object","RSCSO"));
1379  commands.push_back(new CUICommand(eCmdConvertComment,"Convert Structured Comment","Convert Structured Comment in Selected Object","CSCSO"));
1380  commands.push_back(new CUICommand(eCmdParseComment,"Parse Structured Comment","Parse Structured Comment in Selected Object","PSCSO"));
1381  commands.push_back(new CUICommand(eCmdExportStructuredCommentsTable, "Export Structured Comment Table", "Export Structured Comment Table", "ESCT"));
1382  commands.push_back(new CUICommand(eCmdLoadStructComments, "Load Structured Comments from Table", "Load Structured Comments from Table", "LSCT"));
1383  commands.push_back(new CUICommand(eCmdIllegalQualsToNote, "Convert Illegal Qualifiers to Note", "Convert Illegal Qualifiers to Note", "CIQN"));
1384  commands.push_back(new CUICommand(eCmdRmIllegalQuals,"Remove Illegal Qualifiers", "Remove Illegal Qualifiers", "RMIQ"));
1385  commands.push_back(new CUICommand(eCmdWrongQualsToNote,"Convert Wrong Qualifiers to Note", "Convert Wrong Qualifiers to Note", "CWQN"));
1386  commands.push_back(new CUICommand(eCmdConvertBadInference, "Convert Bad Inference Qualifiers to Notes", "Convert Bad Inference Qualifiers to Notes", "CBIN"));
1387  commands.push_back(new CUICommand(eCmdRmWrongQuals,"Remove Wrong Qualifiers", "Remove Wrong Qualifiers", "RMWQ"));
1388  commands.push_back(new CUICommand(eCmdRemoveDbXrefsCDS,"From CDSs", "Remove DbXrefs from CDSs","RMDBXR"));
1389  commands.push_back(new CUICommand(eCmdRemoveDbXrefsGenes,"From Genes", "Remove DbXrefs from Genes","RMDBXR"));
1390  commands.push_back(new CUICommand(eCmdRemoveDbXrefsRNA,"From RNAs", "Remove DbXrefs from RNAs","RMDBXR"));
1391  commands.push_back(new CUICommand(eCmdRemoveDbXrefsAllFeats,"From All Features", "Remove DbXrefs from All Features","RMDBXR"));
1392  commands.push_back(new CUICommand(eCmdRemoveDbXrefsBioSource,"From All BioSources","Remove DbXrefs from All BioSources", "RMDBXR"));
1393  commands.push_back(new CUICommand(eCmdRemoveDbXrefsBioSourceAndFeats, "From All Features and BioSources", "Remove DbXrefs from All Features and BioSources", "RMDBXR"));
1394  commands.push_back(new CUICommand(eCmdRemoveTaxonFeats, "From Features", "Remove Taxons From Features", "RMTFF"));
1395  commands.push_back(new CUICommand(eCmdRemoveTaxonFeatsAndBioSource, "From Features And BioSources", "Remove Taxons From Features And BioSources", "RMTFFBS"));
1396  commands.push_back(new CUICommand(eCmdGroupExplode, "Group Explode", "Group Explode", "GREX"));
1397  commands.push_back(new CUICommand(eCmdFindASN1, "Find ASN.1", "Find ASN.1", "FA1"));
1398  commands.push_back(new CUICommand(eCmdFuseFeatures, "Fuse Features", "Fuse Features", "FUFE"));
1399  commands.push_back(new CUICommand(eCmdFuseJoinsInLocs, "Fuse Joins in Locations", "Fuse Joins in Locations", "FJIL"));
1400  commands.push_back(new CUICommand(eCmdExplodeRNAFeats, "Explode RNA Features", "Explode RNA Features", "ERNAF"));
1401  commands.push_back(new CUICommand(eCmdAssignFeatureIds,"Assign Feature IDs", "Assign Feature IDs for Selected Object","AFIDSO"));
1402  commands.push_back(new CUICommand(eCmdClearFeatureIds,"Clear Feature IDs and Xrefs", "Clear Feature IDs for Selected Object","CFIDSO"));
1403  commands.push_back(new CUICommand(eCmdReassignFeatureIds,"Reassign Feature IDs", "Reassign Feature IDs for Selected Object","RFIDSO"));
1404  commands.push_back(new CUICommand(eCmdUniqifyFeatureIds,"Uniqify Feature IDs", "Uniqify Feature IDs for Selected Object","UFIDSO"));
1405  commands.push_back(new CUICommand(eCmdTrimJunkInPrimerSeqs,"Trim Junk in Primer Sequences","Trim Junk In Primer Seqs for Selected Object","TJIPSSO"));
1406  commands.push_back(new CUICommand(eCmdFixiInPrimerSeqs,"Fix i in Primer Sequences","Fix i in Primer Seqs for Selected Object","FIIPSSO"));
1407  commands.push_back(new CUICommand(eCmdPrefixAuthWithTax, "Prefix Authority with Organism", "Prefix Authority with Organism", "PAWO"));
1408  commands.push_back(new CUICommand(eCmdFocusSet, "Set", "BioSource is_focus is set", "SFSET"));
1409  commands.push_back(new CUICommand(eCmdFocusClear, "Clear", "BioSource is_focus is clear", "SFCLE"));
1410  commands.push_back(new CUICommand(eCmdSetTransgSrcDesc, "Set Transgenic on Source Descriptor", "Set Transgenic on Source Desc when Source Feat present", "STOSD"));
1411  commands.push_back(new CUICommand(eCmdSplitDblinkQuals, "Split DBLink Qualifiers at Commas", "Split DBLink Quals at Commas", "SDQAC"));
1412  commands.push_back(new CUICommand(eCmdFixOrgModInstitution,"Fix OrgMod Institution Code","Fix OrgMod Institution Code for Selected Object","FOMICSO"));
1413  commands.push_back(new CUICommand(eCmdFixStructuredVouchers, "Fix Structured Vouchers", "Fix Structured Vouchers", "FSTV"));
1414  commands.push_back(new CUICommand(eCmdSwapPrimerSeqName,"Swap Primer Sequence and Name","Swap Primer Seq and Name for Selected Object","SPSNSO"));
1415  commands.push_back(new CUICommand(eCmdMergePrimerSets,"Merge Primer Sets","Merge Primer Sets for Selected Object","MPSSO"));
1416  commands.push_back(new CUICommand(eCmdSplitPrimerSets,"Split Primer Sets by Position","Split Primer Sets by Position for Selected Object","SPSBPSO"));
1417  commands.push_back(new CUICommand(eCmdAppendModToOrg,"Append Modifier to Organism","Append Mod To Org for Selected Object","AMTOSO"));
1418  commands.push_back(new CUICommand(eCmdParseCollectionDateMonthFirst,"Parse Collection Date Month First","Parse Collection Date Month First for Selected Object","PCDMFSO"));
1419  commands.push_back(new CUICommand(eCmdParseCollectionDateDayFirst,"Parse Collection Date Day First","Parse Collection Date Day First for Selected Object","PCDDFSO"));
1420  commands.push_back(new CUICommand(eCmdCountryFixupCap,"Country Fixup Fix Capitalization after Colon","Country Fixup Fix Capitalization After Colon","CFFCAC"));
1421  commands.push_back(new CUICommand(eCmdCountryFixupNoCap,"Country Fixup Do Not Fix Capitalization after Colon","Country Fixup Do Not Fix Capitalization After Colon","CFDNFCAC"));
1422  commands.push_back(new CUICommand(eCmdVectorTrim, "Vector Search and Trim Tool", "Vector Search and Trim Tool", "VSTT"));
1423  commands.push_back(new CUICommand(eCmdSelectTarget, "Select Target", "Select Target", "ST"));
1424  commands.push_back(new CUICommand(eCmdSelectTarget_ext, "Select Specific Sequence by Sequence ID", "Select Specific Sequence by Sequence ID", "ST"));
1425  commands.push_back(new CUICommand(eCmdSelectFeature, "Select Features", "Select Features", "SF"));
1426  commands.push_back(new CUICommand(eCmdApplyCDS, "Add CDS", "Add CDS", "AC"));
1427  commands.push_back(new CUICommand(eCmdApplyAddRNA, "Add RNA", "Add RNA", "AR"));
1428  commands.push_back(new CUICommand(eCmdApplyAddOther, "Add Other Feature", "Add other Feature", "AOF"));
1429  commands.push_back(new CUICommand(eCmdApplyAddOther_ext, "Add Other Feature (Non CDS, RNA)", "Add other Feature", "AOF"));
1430  commands.push_back(new CUICommand(eCmdAddFeatureBetween, "Add Feature Between", "Add Feature Between", "AFB"));
1431  commands.push_back(new CUICommand(eCmdValidate, "Validate", "Validate", "V"));
1432  commands.push_back(new CUICommand(eCmdValidate_ext, "Validation Report", "Validate", "V"));
1433  commands.push_back(new CUICommand(eCmdValidateNoAlignments, "Validate No Alignments", "Validate no Alignments", "VNA"));
1434  commands.push_back(new CUICommand(eCmdValidateCheckInferences, "Validate Check Inferences", "Validate Check Inferences", "VCI"));
1435 // commands.back()->AddAccelerator(wxACCEL_NORMAL, 'v');
1436  commands.push_back(new CUICommand(eCmdSortUniqueCountText, "SUC (Sort Unique Count)", "Sort Unique Count", "SUC"));
1437  commands.push_back(new CUICommand(eCmdSortUniqueCountTree, "cSUC (Clickable SUC)", "Clickable Sort Unique Count", "SUC"));
1438  commands.push_back(new CUICommand(eCmdSortUniqueCountTree_ext, "FlatFile Summary", "Clickable Sort Unique Count", "SUC"));
1439  commands.push_back(new CUICommand(eCmdDiscrepancy, "Discrepancy Report", "Discrepancy Report", "DR"));
1440  commands.push_back(new CUICommand(eCmdOncaller, "Oncaller Report", "Oncaller Report", "OR"));
1441  commands.push_back(new CUICommand(eCmdSubmitter_ext, "Submitter Report", "Submitter Report", "SR"));
1442  commands.push_back(new CUICommand(eCmdMega, "Mega Report", "Mega Report", "MR"));
1443  commands.push_back(new CUICommand(eCmdDiscrepancyList, "List Discrepancy Tests", "List Discrepancy Tests", "LDT"));
1444  commands.push_back(new CUICommand(eCmdAutodefDefaultOptions, "Autodef", "Autodef Default Options", "ADO"));
1445  commands.push_back(new CUICommand(eCmdAutodefOptions, "Autodef Select Options", "Autodef Select Options", "ADSO"));
1446  commands.push_back(new CUICommand(eCmdAutodefMisc, "Autodef Misc Feats", "Autodef Misc Feats", "ADMF"));
1447  commands.push_back(new CUICommand(eCmdAutodefId, "Autodef ID", "Autodef ID", "ADID"));
1448  commands.push_back(new CUICommand(eCmdAutodefNoMods, "Autodef No Modifiers", "Autodef No Modifiers", "ADNM"));
1449  commands.push_back(new CUICommand(eCmdAutodefPopset, "Add Popset Titles", "Add Popset Titles", "ADPT"));
1450  commands.push_back(new CUICommand(eCmdAutodefRefresh, "Refresh DefLine with Previous Options", "Refresh Definition Line", "RDEFL"));
1451  commands.push_back(new CUICommand(eCmdInstantiateProteinTitles, "PT_Cleanup", "PT_Cleanup Protein Titles", "PTCU"));
1452  commands.push_back(new CUICommand(eCmdRemoveAllFeatures, "Remove All Features", "Remove All Features", "RAF"));
1453  commands.push_back(new CUICommand(eCmdRemoveDupFeats, "All Feature Types", "Remove Duplicate Features", "RDF"));
1454  commands.push_back(new CUICommand(eCmdRemoveDupFeats_ext, "Remove Duplicate Features", "Remove Duplicate Features", "RDF"));
1455  commands.push_back(new CUICommand(eCmdRemoveDupFeatsWithOptions, "Features with Options", "Remove Duplicate Feats With Options", "RDFWO"));
1456  commands.push_back(new CUICommand(eCmdRemoveDupFeatsWithOptions_ext, "Remove Duplicate Features with Options", "Remove Duplicate Feats With Options", "RDFWO"));
1457  commands.push_back(new CUICommand(eCmdResolveIntersectingFeats, "Resolve Intersecting Feature Locations", "Resolve Intersecting Feature Locations", "RIFL"));
1458  commands.push_back(new CUICommand(eCmdAddSequences, "Add Sequences", "Add Sequences", "AS"));
1459  commands.push_back(new CUICommand(eCmdApplySourceQual, "Apply Source Qualifier", "Apply Source Qual", "ASQ"));
1460  commands.push_back(new CUICommand(eCmdEditSourceQual, "Edit Source Qualifier", "Edit Source Qual", "ESQ"));
1461  commands.push_back(new CUICommand(eCmdConvertSourceQual, "Convert Source Qualifier", "Convert Source Qual", "CSQ"));
1462  commands.push_back(new CUICommand(eCmdSwapSourceQual, "Swap Source Qualifiers", "Swap Source Qual", "SSQ"));
1463  commands.push_back(new CUICommand(eCmdRemoveSourceQual, "Remove Source Qualifier", "Remove Source Qual", "RSQ"));
1464  commands.push_back(new CUICommand(eCmdApplyRNAQual, "Apply RNA Qualifier", "Apply RNA Qual", "ARQ"));
1465  commands.push_back(new CUICommand(eCmdEditRNAQual, "Edit RNA Qualifier", "Edit RNA Qual", "ERQ"));
1466  commands.push_back(new CUICommand(eCmdConvertRNAQual, "Convert RNA Qualifier", "Convert RNA Qual", "CRQ"));
1467  commands.push_back(new CUICommand(eCmdSwapRNAQual, "Swap RNA Qualifiers", "Swap RNA Qual", "SRQ"));
1468  commands.push_back(new CUICommand(eCmdRemoveRNAQual, "Remove RNA Qualifier", "Remove RNA Qual", "RRQ"));
1469  commands.push_back(new CUICommand(eCmdApplyCGPQual, "Apply CDS-Gene-Prot-mRNA Qualifier", "Apply CDS-Gene-Prot-mRNA Qual", "ACGPQ"));
1470  commands.push_back(new CUICommand(eCmdEditCGPQual, "Edit CDS-Gene-Prot-mRNA Qualifier", "Edit CDS-Gene-Prot-mRNA Qual", "ECGPQ"));
1471  commands.push_back(new CUICommand(eCmdConvertCGPQual, "Convert CDS-Gene-Prot-mRNA Qualifier", "Convert CDS-Gene-Prot-mRNA Qual", "CCGPQ"));
1472  commands.push_back(new CUICommand(eCmdSwapCGPQual, "Swap CDS-Gene-Prot-mRNA Qualifiers", "Swap CDS-Gene-Prot-mRNA Qual", "SCGPQ"));
1473  commands.push_back(new CUICommand(eCmdRemoveCGPQual, "Remove CDS-Gene-Prot-mRNA Qualifier", "Remove CDS-Gene-Prot-mRNA Qual", "RCGPQ"));
1474  commands.push_back(new CUICommand(eCmdApplyFeatQual, "Apply Feature Qualifier", "Apply Feature Qual", "AFQ"));
1475  commands.push_back(new CUICommand(eCmdEditFeatQual, "Edit Feature Qualifier", "Edit Feature Qual", "EFQ"));
1476  commands.push_back(new CUICommand(eCmdConvertFeatQual, "Convert Feature Qualifier", "Convert Feature Qual", "CFQ"));
1477  commands.push_back(new CUICommand(eCmdConvertSecondProtNameToDesc, "Second Protein Name to Description", "Second Protein Name to Description", "CSPND"));
1478  commands.push_back(new CUICommand(eCmdConvertDescToSecondProtName, "Protein Description to Second Name", "Protein Description to Second Name", "PDSN"));
1479  commands.push_back(new CUICommand(eCmdConvertDescToFeatComment, "Comment", "Convert Desc to Feat Comment", "CDFC"));
1480  commands.push_back(new CUICommand(eCmdConvertDescToFeatSource, "Source", "Concert Desc to Feat Source", "CDFS"));
1481  commands.push_back(new CUICommand(eCmdConvertDescToFeatPub, "All", "Convert Desc to Feat Pub", "CDFP"));
1482  commands.push_back(new CUICommand(eCmdConvertDescToFeatPubConstraint, "By Constraint", "Convert Desc to Feat Pub", "CDFPC"));
1483  commands.push_back(new CUICommand(eCmdConvertFeatToDescComment, "Comment", "Convert Feat to Desc Comment", "CFDC"));
1484  commands.push_back(new CUICommand(eCmdConvertFeatToDescSource, "Source", "Convert Feat to Desc Source", "CFDS"));
1485  commands.push_back(new CUICommand(eCmdConvertFeatToDescPub, "Publication", "Convert Feat to Desc Pub", "CFDP"));
1486  commands.push_back(new CUICommand(eCmdSwapFeatQual, "Swap Feature Qualifiers", "Swap Feature Qual", "SFQ"));
1487  commands.push_back(new CUICommand(eCmdRemoveFeatQual, "Remove Feature Qualifier", "Remove Feature Qual", "RFQ"));
1488  commands.push_back(new CUICommand(eCmdRemoveTextOutsideString, "Remove Text Outside String", "Remove Text Outside String", "RTOS"));
1489  commands.push_back(new CUICommand(eCmdParseText, "Parse Text", "Parse Text", "PT"));
1490  commands.push_back(new CUICommand(eCmdParseTextFromDefline, "Parse Text", "Parse Text", "PTDL"));
1491  commands.push_back(new CUICommand(eCmdParseLocalToSrc, "Parse Local ID to Source", "Parse Local ID to Src", "PLIDTS"));
1492  commands.push_back(new CUICommand(eCmdRemoveTextInsideStr, "Remove Text Inside String", "Remove Text Inside String", "RTIS"));
1493  commands.push_back(new CUICommand(eCmdLowercaseQuals, "Lowercase Qualifiers", "Lowercase Qualifiers", "LQ"));
1494  commands.push_back(new CUICommand(eCmdConvertFeatures, "Convert Features", "Convert Features", "CF"));
1495  commands.push_back(new CUICommand(eCmdCdsToMatPeptide, "Convert CDS to Mat-peptide", "Convert CDS to mat-peptide", "CDSTMP"));
1496  commands.push_back(new CUICommand(eCmdConvertCdsToMiscFeat, "Convert CDS to Misc-feature or Pseudogene", "Convert CDS to misc-feat or Pseudogene", "CCDSMF"));
1497  commands.push_back(new CUICommand(eCmdConvertCdsWithInternalStopToMiscFeat, "To Misc-feature", "Convert CDS with Internal Stop Codon to Misc_feat", "CCDSWIMF"));
1498  commands.push_back(new CUICommand(eCmdConvertCdsWithInternalStopToMiscFeatViral, "To Misc-feature (Viral)", "Convert CDS with Internal Stop Codon to Misc_feat (Viral)", "CCDSWIMFV"));
1499  commands.push_back(new CUICommand(eCmdConvertCdsWithInternalStopToMiscFeatUnverified, "To Misc-feature with Unverified Comment", "Convert CDS with Internal Stop Codon to Misc_feat with Unverified Comment", "CCDSWIMFU"));
1500  commands.push_back(new CUICommand(eCmdConvertCdsWithGapsToMiscFeat, "Convert CDS with Internal Gaps to misc-feat", "Convert CDS with Internal Gaps to misc-feat", "CCDSWGMF"));
1501  commands.push_back(new CUICommand(eCmdTableReader, "Table Reader", "Table Reader", "TR"));
1502  commands.push_back(new CUICommand(eCmdTableReader_ext, "Use Table Reader", "Table Reader", "TR"));
1503  commands.push_back(new CUICommand(eCmdTableReaderClipboard, "Table Reader from Clipboard", "Table Reader from Clipboard", "TRFC"));
1504  commands.push_back(new CUICommand(eCmdBulkSourceEdit, "Bulk Source Edit", "Bulk Source Edit", "BE"));
1505  commands.push_back(new CUICommand(eCmdBulkCdsEdit, "Bulk CDS Edit", "Bulk CDS Edit", "BCDSE"));
1506  commands.push_back(new CUICommand(eCmdBulkGeneEdit, "Bulk Gene Edit", "Bulk Gene Edit", "BGENEE"));
1507  commands.push_back(new CUICommand(eCmdBulkRnaEdit, "Bulk RNA Edit", "Bulk RNA Edit", "BRNAE"));
1508  commands.push_back(new CUICommand(eCmdBulkMiscFeatEdit, "Bulk Misc Feat Edit", "Bulk Misc Feat Edit", "BMISCFE"));
1509  commands.push_back(new CUICommand(eCmdCorrectGenes, "Correct Genes for CDSs or mRNAs", "Correct Genes for CDSs or mRNAs", "CGFCOM"));
1510  commands.push_back(new CUICommand(eCmdSegregateSets, "Segregate Sets", "Segregate Sets", "SEGSET"));
1511  commands.push_back(new CUICommand(eCmdSequesterSets, "Sequester Sets", "Sequester Sets", "SEQSET"));
1512  commands.push_back(new CUICommand(eCmdDescriptorPropagateDown, "Propagate Descriptors", "Propagate Descriptors", "PRDS"));
1513  commands.push_back(new CUICommand(eCmdReorderSeqById, "Reorder by ID", "Reorder by ID", "RBID"));
1514  commands.push_back(new CUICommand(eCmdCombineSelectedGenesIntoPseudogenes,"Combine Selected Genes into Pseudogenes", "Combine selected genes into pseudogenes","CSGPG"));
1515  commands.push_back(new CUICommand(eCmdWithdrawSequences, "Withdraw Sequences", "Withdraw Sequences", "WSEQ"));
1516  commands.push_back(new CUICommand(eCmdAddSet, "Add Set", "Add Set", "AS"));
1517  commands.push_back(new CUICommand(eCmdPropagateDBLink, "Propagate DBLink Descriptors", "Propagate DBLink Descriptors", "PDBLD"));
1518  commands.push_back(new CUICommand(eCmdChangeSetClass, "Convert Set Type", "Convert Set Type", "CST"));
1519  commands.push_back(new CUICommand(eCmdMolInfoEdit, "MolInfo Edit", "MolInfo Edit", "MIE"));
1520  commands.push_back(new CUICommand(eCmdExportTable,"Export Table", "Export Table", "ETBL"));
1521  commands.push_back(new CUICommand(eCmdParseStrainSerotypeFromNames, "Parse Strain, Serotype from Names", "Parse Strain, Serotype from Names", "PSSFN"));
1522  commands.push_back(new CUICommand(eCmdAddStrainSerotypeToNames, "Add Strain, Serotype to Names", "Add Strain Serotype to Names", "ASSTN"));
1523  commands.push_back(new CUICommand(eCmdFixupOrganismNames, "Fixup Organism Names", "Fixup Organism Names", "FON"));
1524  commands.push_back(new CUICommand(eCmdSplitQualifiersAtCommas, "Split Qualifiers at Commas", "Split Quals at Commas", "SQAC"));
1525  commands.push_back(new CUICommand(eCmdSplitStructuredCollections, "Split Structured Collections", "Split Structured Collections", "SSC"));
1526  commands.push_back(new CUICommand(eCmdTrimOrganismNames, "Trim Organism Names", "Trim Organism Names", "TON"));
1527  commands.push_back(new CUICommand(eCmdRemoveUnverified, "Remove Unverified", "Remove Unverified from Selected Object", "RUNVER"));
1528  commands.push_back(new CUICommand(eCmdRemoveUnreviewed, "Remove Unreviewed", "Remove Unreviewed from selected Object", "RUNREV"));
1529  commands.push_back(new CUICommand(eCmdAddNamedrRNA12S, "12S", "Add Named rRNA 12S", "ANR12S"));
1530  commands.push_back(new CUICommand(eCmdAddNamedrRNA16S, "16S", "Add Named rRNA 16S", "ANR16S"));
1531  commands.push_back(new CUICommand(eCmdAddNamedrRNA23S, "23S", "Add Named rRNA 23S", "ANR23S"));
1532  commands.push_back(new CUICommand(eCmdAddNamedrRNA18S, "18S", "Add Named rRNA 18S", "ANR18S"));
1533  commands.push_back(new CUICommand(eCmdAddNamedrRNA28S, "28S", "Add Named rRNA 28S", "ANR28S"));
1534  commands.push_back(new CUICommand(eCmdAddNamedrRNA26S, "26S", "Add Named rRNA 26S", "ANR26S"));
1535  commands.push_back(new CUICommand(eCmdAddNamedrRNASmall, "Small", "Add Named rRNA Small", "ANRSmall"));
1536  commands.push_back(new CUICommand(eCmdAddNamedrRNALarge, "Large", "Add Named rRNA Large", "ANRLarge"));
1537  commands.push_back(new CUICommand(eCmdAddControlRegion, "Control Region", "Add Control Region", "ACR"));
1538  commands.push_back(new CUICommand(eCmdAddMicrosatellite, "Microsatellite", "Add Microsatellite", "AM"));
1539  commands.push_back(new CUICommand(eCmdEditFeatEv, "Evidence", "Edit Feature Evidence", "EFE"));
1540  commands.push_back(new CUICommand(eCmdEditFeatLoc, "Location", "Edit Feature Location", "EFL"));
1541  commands.push_back(new CUICommand(eCmdEditFeatLoc_ext, "Edit Feature Location", "Edit Feature Location", "EFL"));
1542  commands.push_back(new CUICommand(eCmdEditFeatStrand, "Strand", "Edit Feature Location Strand", "EFLS"));
1543  commands.push_back(new CUICommand(eCmdEditFeatStrand_ext, "Edit Feature Strand", "Edit Feature Location Strand", "EFLS"));
1544  commands.push_back(new CUICommand(eCmdEditFeatRevInt, "Reverse Location Interval Order", "Reverse Location Interval Order", "RLIO"));
1545  commands.push_back(new CUICommand(eCmdEditFeatPseudo,"Pseudo", "Edit Feature Pseudo", "EFP"));
1546  commands.push_back(new CUICommand(eCmdEditFeatException, "Exceptions", "Edit Feature Exception", "EFE"));
1547  commands.push_back(new CUICommand(eCmdEditFeatExperiment, "Experiment", "Edit Feature Experiment", "EFEX"));
1548  commands.push_back(new CUICommand(eCmdEditFeatInference, "Inference", "Edit Feature Inference", "EFINF"));
1549  commands.push_back(new CUICommand(eCmdExtendPartialsConstr, "With Constraint", "Extend Partials With Constraint", "EPWC"));
1550  commands.push_back(new CUICommand(eCmdExtendPartialsAll, "All to Ends", "Extend Partials All to Ends", "EPAE"));
1551  commands.push_back(new CUICommand(eCmdGeneFromOtherFeat,"Gene Features from Other Features","Gene Features From Other Features","GFFOF"));
1552  commands.push_back(new CUICommand(eCmdGeneFeatFromXrefs, "Gene Features from Xrefs", "Gene Features From Xrefs", "GFFX"));
1553  commands.push_back(new CUICommand(eCmdGeneXrefsFromFeats, "Gene Xrefs from Features", "Gene Xrefs from Features", "GXFF"));
1554  commands.push_back(new CUICommand(eCmdRemoveAllGeneXrefs, "All Gene Xrefs", "All Gene Xrefs", "RAGX"));
1555  commands.push_back(new CUICommand(eCmdRemoveUnnecessaryGeneXrefs, "Unnecessary Gene Xrefs", "Unnecessary Gene Xrefs", "RUGX"));
1556  commands.push_back(new CUICommand(eCmdRemoveNonsuppressingGeneXrefs, "Non-Suppressing Gene Xrefs","Non-Suppressing Gene Xrefs","RNSGX")); ///?????
1557  commands.push_back(new CUICommand(eCmdRemoveOrphanLocusGeneXrefs, "Gene Xrefs with Orphan Gene Locus","Gene Xrefs with Orphan Gene Locus","ROLGX"));
1558  commands.push_back(new CUICommand(eCmdRemoveOrphanLocus_tagGeneXrefs, "Gene Xrefs with Orphan Locus-tag", "Gene Xrefs with Orphan Locus-tag", "ROLTGX"));
1559  commands.push_back(new CUICommand(eCmdRemoveGeneXrefs, "Choose Types and Constraint", "Choose Types and Constraint", "RGXTC"));
1560  commands.push_back(new CUICommand(eCmdRemoveDuplicateGOTerms, "Remove Duplicate GO Terms", "Remove Duplicate GeneOntology Terms", "RDGOT"));
1561  commands.push_back(new CUICommand(eCmdExtendCDS, "Extend Coding Region Ends", "Extend Coding Region Ends", "ECDSE"));
1562  commands.push_back(new CUICommand(eCmdTruncateCDS, "Truncate Proteins and CDSs at Stops", "Truncate Proteins and CDSs at Stops", "TPCDSS"));
1563  commands.push_back(new CUICommand(eCmdExtendCDSToStop, "Extend Proteins to Stops", "Extend Proteins to Stops", "EPROTS"));
1564  commands.push_back(new CUICommand(eCmdRecomputeIntervalsAndUpdateGenes, "And Update Genes", "And Update Genes", "RIUPG"));
1565  commands.push_back(new CUICommand(eCmdRecomputeIntervals, "Do Not Update Genes" , "Do Not Update Genes", "RINUPG"));
1566  commands.push_back(new CUICommand(eCmdCdsFromGeneMrnaExon, "CDS Features from Gene, mRNA or Exon", "CDS Features from Gene, mRNA, or exon", "CDSFME"));
1567  commands.push_back(new CUICommand(eCmdmRNAFromGeneCdsExon, "mRNA Features from Gene, CDS, or exon", "mRNA Features from Gene, CDS, or exon", "MRNAFGCE"));
1568  commands.push_back(new CUICommand(eCmdtRNAFromGene, "tRNA/rRNA features from Gene", "tRNA/rRNA features from Gene",""));
1569  commands.push_back(new CUICommand(eCmdExonFromCds,"CDS Intervals", "Exon Features from CDS Intervals", "EFCDS"));
1570  commands.push_back(new CUICommand(eCmdExonFromMRNA,"mRNA Intervals", "Exon features from mRNA intervals", "EFMRNA"));
1571  commands.push_back(new CUICommand(eCmdExonFromTRNA,"tRNA Intervals", "Exon features from tRNA intervals", "EFTRNA"));
1572  commands.push_back(new CUICommand(eCmdFixProductNamesDefault, "Default","Fix Product Names Default", "FPND"));
1573  commands.push_back(new CUICommand(eCmdFixProductNamesOptions, "With Options","Fix Product Names With Options", "FPNWO"));
1574  commands.push_back(new CUICommand(eCmdBulkApplyGenCode, "Batch Apply Genetic Code", "Batch Apply Genetic Code", "BAGC"));
1575  commands.push_back(new CUICommand(eCmdEditSeqEndsWithAlign,"Edit Sequence Ends with Alignment","Edit Sequence Ends with Alignment", "ESEWA"));
1576  commands.push_back(new CUICommand(eCmdEditSequenceEnds,"Edit Sequence Ends","Edit Sequence Ends", "ESE"));
1577  commands.push_back(new CUICommand(eCmdUpdateAlign, "Update Sequence Alignment", "Update SeqAlign", "UPSA"));
1578  commands.push_back(new CUICommand(eCmdSaveDescriptors, "Save Descriptors", "Save Descriptors", "SD"));
1579  commands.push_back(new CUICommand(eCmdCreateSeqHistForTpaDetailed, "Create Seq-hist for TPA Detailed", "Create Seq-hist for TPA detailed", "CSHTPAD"));
1580  commands.push_back(new CUICommand(eCmdCreateSeqHistForTpa, "Create Seq-hist for TPA", "Create Seq-hist for TPA", "CSHTPA"));
1581  commands.push_back(new CUICommand(eCmdRemoveSeqHistAssembly, "Remove Seq-Hist Assembly", "Remove Seq-Hist Assembly", "RSHA"));
1582  commands.push_back(new CUICommand(eCmdFarPointerSeq, "Far Pointer Sequences", "Far Pointer Sequences", "FPSEQ"));
1583  commands.push_back(new CUICommand(eCmdConvertBadCdsAndRnaToMiscFeat, "Convert Bad Coding Regions and RNA features to misc-feat", "Convert Bad Coding Regions and RNA features to misc-feat", "CBCDSRNA"));
1584  commands.push_back(new CUICommand(eCmdCreateProteinId, "Create Protein IDs", "Create Protein IDs", "CPID"));
1585  commands.push_back(new CUICommand(eCmdCreateLocusTagGene, "Create Locus-tag Genes", "Create locus-tag genes", "CLTG"));
1586  commands.push_back(new CUICommand(eCmdNormalizeGeneQuals, "Normalize Gene Quals", "Copy gene qualifiers in xrefs on coding regions to parent genes", "NGQ"));
1587  commands.push_back(new CUICommand(eCmdGenusSpeciesFixup, "Genus-Species Fixup", "Genus-Species Fixup", "GSFU"));
1588  commands.push_back(new CUICommand(eCmdCountryConflict, "Lat-Lon Country Conflict Tool", "Lat-Lon Country Conflict Tool", "LLCCT"));
1589  commands.push_back(new CUICommand(eCmdDuplicate, "Duplicate", "Duplicate", "DUP"));
1590  commands.push_back(new CUICommand(eCmdCorrectIntervalOrder, "Correct Seq-loc Interval Order", "Correct Seq-loc Interval Order", "CLIO"));
1591  commands.push_back(new CUICommand(eCmdAddSecondary, "Add Secondary", "Add Secondary", "ADDS"));
1592  commands.push_back(new CUICommand(eCmdPackageFeaturesOnParts, "Package Features on Parts", "Package Features on Parts", "PFOP"));
1593  commands.push_back(new CUICommand(eCmdMakeBadSpecificHostTable, "Make Bad Specific-Host Table", "Make Bad Specific-Host Table", "MBSHT"));
1594  commands.push_back(new CUICommand(eCmdCorrectRNAStrand, "Correct RNA strandedness (Use SMART)", "Correct RNA strandedness", "CRSUS"));
1595  commands.push_back(new CUICommand(eCmdTrimNsRich, "Trim N-rich Sequence Ends", "Trim N-rich Sequence Ends", "TNR"));
1596  commands.push_back(new CUICommand(eCmdTrimNsTerminal, "Trim Terminal Ns", "Trim Terminal Ns", "TTN"));
1597  commands.push_back(new CUICommand(eCmdAddFluComments, "Add Flu Comments", "Add Flu Comments", "AFC"));
1598  commands.push_back(new CUICommand(eCmdLabelRna, "Label RNA", "Label RNA", "LRNA"));
1599  commands.push_back(new CUICommand(eCmdRemProtTitles, "All but RefSeq", "All but ReqSeq", "ABRS"));
1600  commands.push_back(new CUICommand(eCmdRemAllProtTitles, "All", "All", ""));
1601  commands.push_back(new CUICommand(eCmdApplyRNA_ITS, "Apply rRNA_ITS", "Apply rRNA_ITS", "ARNAITS"));
1602  commands.push_back(new CUICommand(eCmdEditingButtons, "Toolbar", "Sequin Special Editing Buttons", "SSEB"));
1603  commands.push_back(new CUICommand(eCmdMakeToolBarWindow, "Make ToolBar Window", "Make ToolBar Window", "MTBW"));
1604  commands.push_back(new CUICommand(eCmdEnableHupId, "Enable HUP-ID Loader", "Enable HUP-ID Loader", "", "", "", "", wxITEM_CHECK));
1605  commands.push_back(new CUICommand(eCmdIndexerTypeSelection, "Indexer Type", "Indexer Type", ""));
1606  commands.push_back(new CUICommand(eCmdTestDialogView, "Open Test DialogView", "Test DialogView", kEmptyStr));
1607  commands.push_back(new CUICommand(eCmdTestFormView, "Open Test FormView", "Test FormView", kEmptyStr));
1608  commands.push_back(new CUICommand(eCmdMacroEditor, "Macro Editor", "Macro Editor", "MACROE"));
1609  commands.push_back(new CUICommand(eCmdSuspectProductRulesEditor, "Suspect Product Rule Editor", "Suspect Product Rule Editor", "SPRE"));
1610  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesStrict, "Strict", "Adjust Consensus Splice Sites Strict", "ACSS"));
1611  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesStrict_ext, "Adjust CDS for Consensus Splice Sites (strict)", "Adjust Consensus Splice Sites Strict", "ACSS"));
1612  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesRelaxed, "Relaxed", "Adjust Consensus Splice Sites Relaxed", "ACSR"));
1613  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesRelaxed_ext, "Adjust CDS for Consensus Splice Sites (relaxed)", "Adjust Consensus Splice Sites Relaxed", "ACSR"));
1614  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesConsensusEnds, "5' and 3' ends only", "Adjust Consensus Splice Sites Consensus Ends", "ACSENDS"));
1615  commands.push_back(new CUICommand(eCmdAdjustCDSForIntrons, "CDS", "Adjust CDS For Introns", "ACDSI"));
1616  commands.push_back(new CUICommand(eCmdAdjustrRNAForIntrons, "rRNA", "Adjust rRNA For Introns", "ARRNAI"));
1617  commands.push_back(new CUICommand(eCmdAdjusttRNAForIntrons, "tRNA", "Adjust tRNA For Introns", "ATRNAI"));
1618  commands.push_back(new CUICommand(eCmdAdjustmRNAForIntrons, "mRNA", "Adjust mRNA For Introns", "AMRNAI"));
1619  commands.push_back(new CUICommand(eCmdLatLonTool, "Lat-Lon Tool", "Lat-Lon Tool", "LLT"));
1620  commands.push_back(new CUICommand(eCmdCDSGeneRangeErrorSuppress, "Suppress", "CDS Gene Range Error Suppress", "CDSGRES"));
1621  commands.push_back(new CUICommand(eCmdCDSGeneRangeErrorRestore, "Restore", "CDS Gene Range Error Restore", "CDSGRER"));
1622  commands.push_back(new CUICommand(eCmdSuppressGenes, "Suppress Genes on Features", "Suppress Genes on Features", "SUPGF"));
1623  commands.push_back(new CUICommand(eCmdRemoveSegGaps, "Remove Seg Gaps", "Remove Seg Gaps", "RSEGGAPS"));
1624  commands.push_back(new CUICommand(eCmdRawSeqToDeltaByNs, "By Ns", "Raw Sequence To Delta By Ns", "RSDN"));
1625  commands.push_back(new CUICommand(eCmdRawSeqToDeltaByNs_ext, "Add Assembly Gaps to Sequence", "Add Assembly Gaps to Sequence" , "RSDN"));
1626  commands.push_back(new CUICommand(eCmdRawSeqToDeltaByLoc, "By Location", "By Location", "RSDL"));
1627  commands.push_back(new CUICommand(eCmdRawSeqToDeltaByAssemblyGapFeatures, "By Assembly_Gap Features", "By Assembly_Gap Features", ""));
1628  commands.push_back(new CUICommand(eCmdAdjustFeaturesForGaps, "Adjust Features for Gaps", "Adjust Features for Gaps", "AFFG"));
1629  commands.push_back(new CUICommand(eCmdDeltaSeqToRaw, "Delta Seq to Raw", "Delta Seq To Raw", "DSTR"));
1630  commands.push_back(new CUICommand(eCmdDeltaSeqToRaw_ext, "Remove Gap Features", "Remove Gap Features", "DSTR"));
1631  commands.push_back(new CUICommand(eCmdExpandGaps, "Expand Known Gaps to Include Flanking Ns", "Expand Known Gaps to Include Flanking Ns", "EKGFN"));
1632  commands.push_back(new CUICommand(eCmdConvertSelectedGapsToKnown, "To Known Length", "To Known Length", "CSGTK"));
1633  commands.push_back(new CUICommand(eCmdConvertSelectedGapsToUnknown, "To Unknown Length", "To Unknown Length", "CSGTU"));
1634  commands.push_back(new CUICommand(eCmdConvertGapsBySize, "Convert Known to Unknown (by Size)", "Convert Known to Unknown (by Size)", "CKTUS"));
1635  commands.push_back(new CUICommand(eCmdEditSelectedGaps, "Change Length of Selected Known Length Gaps", "Change Length of Selected Known Length Gaps", "CLSKG"));
1636  commands.push_back(new CUICommand(eCmdAddLinkageToGaps, "Add Linkage to All Gaps", "Add Linkage to All Gaps", "ALAG"));
1637  commands.push_back(new CUICommand(eCmdAddLinkageToGaps_ext, "Add Linkage Evidence to All Gaps", "Add Linkage to All Gaps", "ALAG"));
1638  commands.push_back(new CUICommand(eCmdCombineAdjacentGaps, "Combine Adjacent Gaps", "Combine Adjacent Gaps", "CAGAP"));
1639  commands.push_back(new CUICommand(eCmdSplitCDSwithTooManyXs, "Split CDS features with more than 50% N's", "Split CDS features with more than 50% N's", "SCDSN"));
1640  commands.push_back(new CUICommand(eCmdRmCultureNotes, "Remove Uncultured Notes", "Remove Uncultured Notes", "RUNN"));
1641  commands.push_back(new CUICommand(eCmdEditSeqId, "Edit Sequence IDs", "Edit Sequence IDs", "ESID"));
1642  commands.push_back(new CUICommand(eCmdRemoveLocalSeqIdsFromNuc, "From Nucleotides", "Remove Local Seq-id from Nucleotides", "RLIDN"));
1643  commands.push_back(new CUICommand(eCmdRemoveLocalSeqIdsFromProt, "From Proteins", "Remove Local Seq-id from Proteins", "RLIDP"));
1644  commands.push_back(new CUICommand(eCmdRemoveLocalSeqIdsFromAll, "From All Bioseqs", "Remove Local Seq-id from All Bioseqs", "RLIDA"));
1645  commands.push_back(new CUICommand(eCmdRemoveGiSeqIdsFromAll, "GI IDs from Bioseqs", "GI IDs from Bioseqs", "RGIB"));
1646  commands.push_back(new CUICommand(eCmdRemoveGenbankSeqIdsFromProt, "From Proteins", "From Proteins", "RGBP"));
1647  commands.push_back(new CUICommand(eCmdRemoveGenbankSeqIdsFromAll, "From All Bioseqs", "From All Bioseqs", "RGBA"));
1648  commands.push_back(new CUICommand(eCmdRemoveSeqIdNamesFromProtFeats, "Seq-ID Name From Prot Feats", "Seq-ID Name From Prot Feats", "RSINP"));
1649  commands.push_back(new CUICommand(eCmdConvertAccessionToLocalIdsAll, "For All Sequences", "For All Sequences", "CACCLA"));
1650  commands.push_back(new CUICommand(eCmdConvertAccessionToLocalIdsNuc, "For Nucleotide Sequences", "For Nucleotide Sequences", "CACCLN"));
1651  commands.push_back(new CUICommand(eCmdConvertAccessionToLocalIdsProt, "For Protein Sequences", "For Protein Sequences", "CACCLP"));
1652  commands.push_back(new CUICommand(eCmdConvertAccessionToLocalIdsName, "GenBank.name to LocalID", "GenBank.name to LocalID", "CNAML"));
1653  commands.push_back(new CUICommand(eCmdLocalToGeneralId, "LocalIDs to GeneralIDs", "Local Seq-id to General Seq-id", "LIDGID"));
1654  commands.push_back(new CUICommand(eCmdGeneralToLocalId, "GeneralIDs to LocalIDs", "GeneralIDs to LocalIDs", "GIDTOL"));
1655  commands.push_back(new CUICommand(eCmdRemoveGeneralId, "General IDs", "General IDs", "RGID"));
1656  commands.push_back(new CUICommand(eCmdRemoveUnnecessaryExceptions, "Remove Unnecessary Exceptions", "Remove Unnecessary Exceptions", "RUNE"));
1657  commands.push_back(new CUICommand(eCmdEditHistory, "Edit History", "Edit History", "EH"));
1658  commands.push_back(new CUICommand(eCmdUpdate_Replaced_EC_numbers,"Update Replaced EC Numbers", "Update Replaced EC Numbers", "URECN"));
1659  commands.push_back(new CUICommand(eCmdUpdateSequence, "Single Sequence", "Update Single Sequence", "USSSEQ"));
1660  commands.push_back(new CUICommand(eCmdUpdateSequence_ext, "Update Sequence", "Update Single Sequence", "USSSEQ"));
1661  commands.push_back(new CUICommand(eCmdUpdateSequenceClipboard, "Single Sequence (Clipboard)", "Update Single Sequence from Clipboard", "USSCLIP"));
1662  commands.push_back(new CUICommand(eCmdUpdateSequenceAccession, "Download Accession", "Update Single Sequence Accession", "USSACC"));
1663  commands.push_back(new CUICommand(eCmdUpdateMultiSequences, "Multiple Sequences", "Update Multiple Sequences from File", "UMSSFILE"));
1664  commands.push_back(new CUICommand(eCmdUpdateMultiSeqClipboard, "Multiple Sequences (Clipboard)", "Update Multiple Sequences from Clipboard", "UMSSCLIP"));
1665  commands.push_back(new CUICommand(eCmdImportFeatureTable, "Import Feature Table", "Import Feature Table", "IMPFTBL"));
1666  commands.push_back(new CUICommand(eCmdImportFeatureTable_ext, "5 Column Feature Table", "Import Feature Table", "IMPFTBL"));
1667  commands.push_back(new CUICommand(eCmdImportFeatureTableClipboard, "Import Feature Table from Clipboard", "Import Feature Table from Clipboard", "IMPFTBLC"));
1668  commands.push_back(new CUICommand(eCmdImportGFF3, "Import GFF3 File", "Import GFF3 File", "IMGFF"));
1669  commands.push_back(new CUICommand(eCmdImportGFF3_ext, "GFF3 File", "Import GFF3 File", "IMGFF"));
1670  commands.push_back(new CUICommand(eCmdLoadSecondaryAccessions, "Extra Accessions", "Extra Accessions", "LSAEA"));
1671  commands.push_back(new CUICommand(eCmdLoadSecondaryAccessionsHistoryTakeover, "History Takeover", "History Takeover", "LSAHT"));
1672  commands.push_back(new CUICommand(eCmdAddGlobalCodeBreak, "Add Global Code Break", "Add Global Code Break", "AGCB"));
1673  commands.push_back(new CUICommand(eCmdApplyStructuredCommentField, "Apply Structured Comment Field", "Apply Structured Comment Field", "ASTRCMNTFLD"));
1674  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixHIVData, "HIVData", "Replace Structured Comment to HIVData", "RSTRCMNT1"));
1675  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixFluData, "FluData", "Replace Structured Comment to FluData", "RSTRCMNT2"));
1676  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIGSData, "MIGSData", "Replace Structured Comment to MIGSData", "RSTRCMNT3"));
1677  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIMSData, "MIMSData", "Replace Structured Comment to MIMSData", "RSTRCMNT4"));
1678  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIENSData, "MIENSData", "Replace Structured Comment to MIENSData", "RSTRCMNT5"));
1679  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIMARKS3_0, "MIMARKS:3.0", "Replace Structured Comment to MIMARKS:3.0", "RSTRCMNT6"));
1680  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIGS3_0, "MIGS:3.0", "Replace Structured Comment to MIGS:3.0", "RSTRCMNT7"));
1681  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIMS3_0, "MIMS:3.0", "Replace Structured Comment to MIMS:3.0", "RSTRCMNT8"));
1682  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixAssemblyData, "AssemblyData", "Replace Structured Comment to AssemblyData", "RSTRCMNT9"));
1683  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixGenAssData, "GenomeAssemblyData", "Replace Structured Comment to GAssemblyData", "RSTRCMNT10"));
1684  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixiBol, "iBOL", "Replace Structured Comment to iBOL", "RSTRCMNT11"));
1685  commands.push_back(new CUICommand(eCmdLinkSelectedmRNACDS, "Link Selected CDS and mRNA Pair", "Link Selected CDS and mRNA Pair", "LSCDSMRNAP"));
1686  commands.push_back(new CUICommand(eCmdLinkmRNACDSOverlap, "By Overlap", "Link CDS and mRNA by Overlap", "LCDSMRNAO"));
1687  commands.push_back(new CUICommand(eCmdLinkmRNACDSProduct, "By Product", "Link CDS and mRNA by Product", "LCDSMRNAP"));
1688  commands.push_back(new CUICommand(eCmdLinkmRNACDSLabel, "By Label", "Link CDS and mRNA by Label", "LCDSMRNALAB"));
1689  commands.push_back(new CUICommand(eCmdLinkmRNACDSLabelLocation, "By Label and Location", "Link CDS and mRNA by Label and Location", "LCDSMRNALABLOC"));
1690  commands.push_back(new CUICommand(eCmdLinkmRNACDSProteinID, "By Protein-ID Qualifier", "Link CDS and mRNA by protein-id qualifier", "LCDSMRNAPRQUAL"));
1691  commands.push_back(new CUICommand(eCmdLinkmRNACDSTranscriptID, "By Transcript-ID Qualifier", "Link CDS and mRNA by transcript-id qualifier", "LCDSMRNATRQUAL"));
1692  commands.push_back(new CUICommand(eCmdLinkmRNACDSUnidirectional, "From Unidirectional Xrefs", "Link CDS and mRNA from unidirectional Xrefs", "LSCDSMRNAUNID"));
1693  commands.push_back(new CUICommand(eCmdShowLinkedmRNACDS, "Show Linked CDS or mRNA Feature", "Show Linked CDS or mRNA Feature", "SLINKCDSMRNA"));
1694  commands.push_back(new CUICommand(eCmdShowFeatureTable, "Show Feature Table", "Show Feature Table", "SFEATTBL"));
1695  commands.push_back(new CUICommand(eCmdShowFeatureTable_ext, "Feature Table", "Show Feature Table", "SFEATTBL"));
1696  commands.push_back(new CUICommand(eCmdRestoreFromFile, "Restore from File", "Restore from Local File", "RFFILE"));
1697  commands.push_back(new CUICommand(eCmdRestoreAndConvertSeqSubmit, "Restore and Convert SeqSubmit", "Restore and Convert SeqSubmit", "RCVFFILE"));
1698  commands.push_back(new CUICommand(eCmdViewSortedProteins, "View Sorted Proteins (FASTA)", "View Sorted Proteins (FASTA)", "VSPF"));
1699  commands.push_back(new CUICommand(eCmdCheckForMixedStrands, "Check for Mixed Strands", "Check for Mixed Strands", "CMSTRAND"));
1700  commands.push_back(new CUICommand(eCmdPrepareSeqSubmit, "Genome Submission Wizard", "Prepare a Submission", "PREPASUB"));
1701  commands.push_back(new CUICommand(eCmdSaveSubmissionFile, "Save Submission File", "Save Submission File", "SSUBF"));
1702  commands.push_back(new CUICommand(eCmdSaveASN1File, "Save ASN.1 File", "Save ASN.1 File", "SVASN"));
1703  commands.push_back(new CUICommand(eCmdHelpReports_ext, "Help", "Help Reports", "HELPR"));
1704  commands.push_back(new CUICommand(eCmdHelpImport_ext, "Help", "Help Import", "HELPI"));
1705  commands.push_back(new CUICommand(eCmdHelpSequences_ext, "Help", "Help Sequences", "HELPS"));
1706  commands.push_back(new CUICommand(eCmdHelpFeatures_ext, "Help", "Help Features", "HELPF"));
1707  commands.push_back(new CUICommand(eCmdHelpComments_ext, "Help", "Help Comments", "HELPC"));
1708  commands.push_back(new CUICommand(eCmdHelpEditingTools_ext, "Help", "Help Editing Tools", "HELPET"));
1709  commands.push_back(new CUICommand(eCmdUpdateTLSName, "Update Targeted Locus Name", "Update Targeted Locus Name", "UPTLSNAME"));
1710 
1711 
1713 
1714  commands.push_back(new CUICommand(eCmdAddDefLine, "Add Definition Line", "Add Definition Line", "ADL"));
1715  commands.push_back(new CUICommand(eCmdPrefixOrgToDefLine, "Organism", "Prefix Defline With Organism", "PDLORG"));
1716  commands.push_back(new CUICommand(eCmdPrefixStrainToDefLine, "Strain", "Prefix Defline With Strain", "PDLSTR"));
1717  commands.push_back(new CUICommand(eCmdPrefixCloneToDefLine, "Clone", "Prefix Defline With Clone", "PDLCLO"));
1718  commands.push_back(new CUICommand(eCmdPrefixIsolateToDefLine, "Isolate", "Prefix Defline With Isolate", "PDLISO"));
1719  commands.push_back(new CUICommand(eCmdPrefixHaplotToDefLine, "Haplotype", "Prefix Defline With Haplotype", "PDLH"));
1720  commands.push_back(new CUICommand(eCmdPrefixCultivarToDefLine, "Cultivar", "Prefix Defline With Cultivar", "PDLCULT"));
1721  commands.push_back(new CUICommand(eCmdPrefixListToDefLine, "List", "Prefix Defline From List", "PDLLIST"));
1722 
1723  // annotate descriptors commands
1724  commands.push_back(new CUICommand(eCmdCreateDescTPAAssembly, "TPA Assembly", "TPA Assembly", "TPAA"));
1725  commands.push_back(new CUICommand(eCmdCreateDescStructuredComment, "Structured Comment", "Structured Comment", "SCD"));
1726  commands.push_back(new CUICommand(eCmdCreateDescRefGeneTracking, "RefGene Tracking", "RefGene Tracking", "RGT"));
1727  commands.push_back(new CUICommand(eCmdCreateDescDBLink, "DBLink", "DBLink", "DBLD"));
1728  commands.push_back(new CUICommand(eCmdCreateDescUnverified, "Unverified", "Unverified", "UVD"));
1729  commands.push_back(new CUICommand(eCmdCreateDescUnreviewed, "Unreviewed", "Unreviewed", "UNREV"));
1730  commands.push_back(new CUICommand(eCmdCreateDescAuthorizedAccess, "Authorized Access", "Authorized Access", "AAD"));
1731  commands.push_back(new CUICommand(eCmdCreateDescGenomeAssemblyComment, "Genome Assembly", "Genome Assembly", "GAD"));
1732  commands.push_back(new CUICommand(eCmdCreateDescGenBankBlock, "GenBank Block", "GenBank Block", "GBBD"));
1733  commands.push_back(new CUICommand(eCmdCreateDescComment, "Comment", "Comment", "CD"));
1734  commands.push_back(new CUICommand(eCmdCreateDescComment_ext, "Add Free Text Comment", "Comment", "CD"));
1735  commands.push_back(new CUICommand(eCmdCreateDescTitle, "Title", "Title", "TD"));
1736  commands.push_back(new CUICommand(eCmdCreateDescMolinfo, "Molecule Description", "Molinfo", "MIDD"));
1737  commands.push_back(new CUICommand(eCmdCreateDescSource, "Biological Source", "BioSource", "BSD"));
1738  commands.push_back(new CUICommand(eCmdCreateDescPub, "Publication Descriptor", "Publication", "PD"));
1739  commands.push_back(new CUICommand(eCmdCreateDescPub_ext, "Add Publication", "Publication", "PD"));
1740  commands.push_back(new CUICommand(eCmdSubmitter, "Submitter Report", "Submitter Report", "SDR"));
1741 
1742  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixMIMS, "Add", "MIMS Comment", "AMIMC"));
1743  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixMIGS, "Add", "MIGS Comment", "AMIGC"));
1744  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixMIMARKS, "Add", "MIMARKS Comment", "AMIMARC"));
1745  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixMIENSData, "Add", "MIENS Comment", "AMIENC"));
1746  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixGenAnnData, "Add", "Genome Annotation Comment", "AGANNC"));
1747  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixGenAssData, "Add", "Genome Assembly Comment", "AGASSC"));
1748  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixMIMS, "Remove", "MIMS Comment", "RMIMC"));
1749  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixMIGS, "Remove", "MIGS Comment", "RMIGC"));
1750  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixMIMARKS, "Remove", "MIMARKS Comment", "RMIMARC"));
1751  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixMIENSData, "Remove", "MIENS Comment", "RMIENC"));
1752  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixGenAnnData, "Remove", "Genome Annotation Comment", "RGANNC"));
1753  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixGenAssData, "Remove", "Genome Assembly Comment", "RGASSC"));
1754 
1755  return commands;
1756 }
1757 
1758 BEGIN_EVENT_TABLE(CSequenceEditingEventHandler, wxEvtHandler)
2280 
2281 
2282 // Please do not make overlapping UPDATE_UI_RANGEs. Every time there is an overlapping range here a cute kitten dies in horror!!!
2284 
2286 
2288 
2291 
2294  CSelectionServiceEvent::eClientAttached, CSelectionServiceEvent::eSelectionChanged,
2295  &CSequenceEditingEventHandler::x_OnSelectionEvent)
2296 END_EVENT_MAP()
2297 
2298 static
2299 WX_DEFINE_MENU(kEditingMenu)
2300  WX_SUBMENU("&Edit")
2303  WX_SUBMENU_INT("Update Sequences")
2309  WX_END_SUBMENU()
2312  WX_END_SUBMENU()
2313  WX_MENU_SEPARATOR_L("Contribs")
2314  WX_SUBMENU_INT("Sea&rch")
2315  WX_SUBMENU_INT("&Validate")
2319  WX_END_SUBMENU()
2322  WX_END_SUBMENU()
2323 
2324  WX_SUBMENU_EXT("Submission")
2327  WX_SUBMENU_EXT("Reports")
2335  WX_END_SUBMENU()
2336  WX_SUBMENU_EXT("Import")
2342  WX_END_SUBMENU()
2343  WX_SUBMENU_EXT("Sequences")
2356  WX_END_SUBMENU()
2357  WX_SUBMENU_EXT("Add Features")
2358  WX_SUBMENU_EXT("gene/mRNA/CDS")
2367  WX_END_SUBMENU()
2368  WX_SUBMENU_EXT("Structural RNAs")
2375  WX_END_SUBMENU()
2376  WX_SUBMENU_EXT("Regulatory")
2383  WX_END_SUBMENU()
2384  WX_SUBMENU_EXT("Protein Features")
2389  WX_END_SUBMENU()
2390  WX_SUBMENU_EXT("Other Features")
2405  WX_END_SUBMENU()
2408  WX_END_SUBMENU()
2410  WX_SUBMENU_EXT("Comments")
2412  WX_SUBMENU_EXT("MIMS Comment")
2415  WX_END_SUBMENU()
2416  WX_SUBMENU_EXT("MIGS Comment")
2419  WX_END_SUBMENU()
2420  WX_SUBMENU_EXT("MIMARKS Comment")
2423  WX_END_SUBMENU()
2424  WX_SUBMENU_EXT("MIENS Comment")
2427  WX_END_SUBMENU()
2428  WX_SUBMENU_EXT("GenomeAnnotation Comment")
2431  WX_END_SUBMENU()
2432  WX_SUBMENU_EXT("GenomeDataAssembly Comment")
2435  WX_END_SUBMENU()
2438  WX_END_SUBMENU()
2439  WX_SUBMENU_EXT("Editing Tools")
2455  WX_END_SUBMENU()
2456  WX_END_SUBMENU()
2457 
2458  WX_SUBMENU_INT("Advan&ced Editing")
2459  WX_SUBMENU_INT("Def Line")
2460  WX_SUBMENU_INT("Automatic Def Line")
2468  WX_END_SUBMENU()
2470  WX_SUBMENU_INT("Prefix Def Line With")
2478  WX_END_SUBMENU()
2480  WX_END_SUBMENU()
2490  WX_SUBMENU_INT("Source Focus")
2493  WX_END_SUBMENU()
2501  WX_SUBMENU_INT("PCR Fixes")
2507  WX_END_SUBMENU()
2508  WX_SUBMENU_INT("Influenza Virus Names")
2512  WX_END_SUBMENU()
2519  WX_SUBMENU_INT("Compare with Biosample")
2522  WX_END_SUBMENU()
2524  WX_SUBMENU_INT("Parse Organism Modifiers")
2526  WX_END_SUBMENU()
2527  WX_SUBMENU_INT("Consolidate Like Modifiers")
2530  WX_END_SUBMENU()
2531  WX_END_SUBMENU()
2532  WX_SUBMENU_INT("&Apply")
2535  WX_SUBMENU_INT("Add Named rRNA")
2544  WX_END_SUBMENU()
2548  WX_SUBMENU_INT("Add Common Feature")
2551  WX_END_SUBMENU()
2566  WX_SUBMENU_INT("Add Keyword")
2573  WX_END_SUBMENU()
2574  WX_SUBMENU_INT("Load Secondary Accessions from File")
2577  WX_END_SUBMENU()
2579  WX_END_SUBMENU()
2580  WX_SUBMENU_INT("&Remove")
2594  WX_SUBMENU_INT("Remove Text")
2597  WX_END_SUBMENU()
2598  WX_SUBMENU_INT("Remove Duplicate")
2602  WX_END_SUBMENU()
2609  WX_SUBMENU_INT("Remove Titles")
2610  WX_SUBMENU_INT("Protein")
2613  WX_END_SUBMENU()
2614  WX_END_SUBMENU()
2619  WX_SUBMENU_INT("Remove Xrefs")
2620  WX_SUBMENU_INT("Db_xrefs")
2627  WX_END_SUBMENU()
2628  WX_SUBMENU_INT("Taxon Xrefs")
2631  WX_END_SUBMENU()
2632  WX_SUBMENU_INT("Gene Xrefs")
2639  WX_END_SUBMENU()
2640  WX_END_SUBMENU()
2643  WX_SUBMENU_INT("Remove Proteins")
2647  WX_END_SUBMENU()
2648  WX_SUBMENU_INT("Remove IDs, SeqIDs, GI_IDs, LOCUS")
2649  WX_SUBMENU_INT("Local")
2653  WX_END_SUBMENU()
2654  WX_SUBMENU_INT("GenBank")
2657  WX_END_SUBMENU()
2661  WX_END_SUBMENU()
2663  WX_END_SUBMENU()
2667  WX_SUBMENU_INT("Convert CDS with Internal Stop Codon")
2671  WX_END_SUBMENU()
2686  WX_SUBMENU_INT("Convert IDs, Accessions, or GenBank.names")
2689  WX_SUBMENU_INT("Accession to LocalIDs")
2694  WX_END_SUBMENU()
2695  WX_END_SUBMENU()
2696  WX_SUBMENU_INT("Convert Second Protein Name and Description")
2699  WX_END_SUBMENU()
2700  WX_SUBMENU_INT("Convert Descriptors and Features")
2701  WX_SUBMENU_INT("Descriptor to Feature")
2704  WX_SUBMENU_INT("Publication")
2707  WX_END_SUBMENU()
2708  WX_END_SUBMENU()
2709  WX_SUBMENU_INT("Convert Full Length Feature to Descriptor")
2713  WX_END_SUBMENU()
2714  WX_END_SUBMENU()
2715  WX_END_SUBMENU()
2716  WX_SUBMENU_INT("&Edit")
2724  WX_SUBMENU_INT("Edit Feature")
2735  WX_END_SUBMENU()
2736  WX_SUBMENU_INT("Bulk Edit")
2742  WX_END_SUBMENU()
2743  WX_SUBMENU_INT("Extend Partial Features")
2746  WX_END_SUBMENU()
2758  WX_END_SUBMENU()
2759  WX_SUBMENU_INT("Authors and Publications")
2762  WX_SUBMENU_INT("Fix Capitalization")
2768  WX_END_SUBMENU()
2769  WX_SUBMENU_INT("Remove Publications")
2775  WX_END_SUBMENU()
2780  WX_SUBMENU_INT("Convert Author to Consortium")
2783  WX_END_SUBMENU()
2786  WX_END_SUBMENU()
2787  WX_SUBMENU_INT("CDS, Protein, and RNA")
2788  WX_SUBMENU_INT("Retranslate Coding Regions")
2792  WX_END_SUBMENU()
2796  WX_SUBMENU_INT("Adjust CDS for Consensus Splice Sites")
2800  WX_END_SUBMENU()
2801  WX_SUBMENU_INT("Adjust Features for Introns")
2806  WX_END_SUBMENU()
2810  WX_SUBMENU_INT("Recompute Suggested Intervals")
2813  WX_END_SUBMENU()
2814  WX_SUBMENU_INT("Fix Product Name Capitalization")
2817  WX_END_SUBMENU()
2820  WX_END_SUBMENU()
2821  WX_SUBMENU_INT("Structured Comments")
2823  WX_SUBMENU_INT("Edit Structured Comment Prefix-Suffix")
2835  WX_END_SUBMENU()
2849  WX_END_SUBMENU()
2850  WX_SUBMENU_INT("Cleanup and Fixup")
2857  WX_END_SUBMENU()
2858  WX_SUBMENU_INT("Display")
2864  WX_END_SUBMENU()
2865  WX_SUBMENU_INT("Desktop")
2881  WX_SUBMENU_INT("Utilities")
2885  WX_END_SUBMENU()
2886  WX_SUBMENU_INT("Indexer")
2888  WX_END_SUBMENU()
2889  WX_END_SUBMENU()
2890  WX_SUBMENU_INT("Link")
2891  WX_SUBMENU_INT("Feature IDs")
2897  WX_END_SUBMENU()
2898  WX_SUBMENU_INT("Create CDS-mRNA Links")
2906  WX_END_SUBMENU()
2909  WX_END_SUBMENU()
2910  WX_SUBMENU_INT("Projects")
2921  WX_END_SUBMENU()
2922  WX_SUBMENU_INT("Make Features and Fuse")
2933  WX_SUBMENU_INT("Exon features from")
2937  WX_END_SUBMENU()
2938  WX_END_SUBMENU()
2939  WX_SUBMENU_INT("Normalize, Map, Package")
2940  WX_SUBMENU_INT("CDSGeneRangeError")
2943  WX_END_SUBMENU()
2946  WX_END_SUBMENU()
2947  WX_SUBMENU_INT("Gap Sequences")
2948  WX_SUBMENU_INT("Raw Sequence To Delta")
2952  WX_END_SUBMENU()
2955  WX_SUBMENU_INT("Convert Selected Gaps")
2958  WX_END_SUBMENU()
2966  WX_END_SUBMENU()
2976 #ifdef _DEBUG
2980 #endif
2981  WX_SUBMENU_INT("Select")
2983  WX_END_SUBMENU()
2984  WX_SUBMENU_INT("Locus-tags")
2988  WX_END_SUBMENU()
2991  WX_END_SUBMENU()
2992  WX_SUBMENU_INT("&Annotate")
2993  WX_SUBMENU_INT("Genes and Named Regions")
3010  WX_END_SUBMENU()
3011  WX_SUBMENU_INT("Coding Regions and Transcripts")
3019  WX_END_SUBMENU()
3020  WX_SUBMENU_INT("Structural RNAs")
3026  WX_END_SUBMENU()
3027  WX_SUBMENU_INT("Bibliographic and Comments")
3030  WX_END_SUBMENU()
3031  WX_SUBMENU_INT("Sites and Bonds")
3039  WX_END_SUBMENU()
3040  WX_SUBMENU_INT("Remaining Features")
3059  WX_END_SUBMENU()
3060  WX_SUBMENU_INT("Batch Feature Apply")
3068  WX_END_SUBMENU()
3069  WX_SUBMENU_INT("Batch Feature Edit")
3074  WX_END_SUBMENU()
3075  WX_SUBMENU_INT("Publications")
3078  WX_END_SUBMENU()
3079  WX_SUBMENU_INT("Descriptors")
3093  WX_END_SUBMENU()
3095  WX_END_SUBMENU()
3096 WX_END_MENU()
3097 
3098 const SwxMenuItemRec* CSeqEditPackage::GetMenuDef() const
3099 {
3100  return kEditingMenu;
3101 }
3102 
3103 
3104 
3105 
3106 void CSequenceEditingEventHandler::RemoveDescriptors(wxCommandEvent& evt)
3107 {
3108  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3109  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3111  if (dlg.ShowModal() == wxID_OK)
3112  {
3113  CRef<CCmdComposite> cmd = dlg.GetCommand();
3114  if (cmd) m_CmdProccessor->Execute(cmd);
3115  dlg.Close();
3116  }
3117 }
3118 
3120 {
3121  if (!m_Workbench) return;
3122  wxWindow* main_window = NULL;
3123  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
3124  if (wb_frame)
3125  main_window = wb_frame->GetMainWindow();
3126  CRemoveFeaturesDlg *dlg = new CRemoveFeaturesDlg(main_window, m_Workbench);
3127  dlg->Show(true);
3128 }
3129 
3131 {
3132  if (!m_Workbench) return;
3133  wxWindow* main_window = NULL;
3134  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
3135  if (wb_frame)
3136  main_window = wb_frame->GetMainWindow();
3137  CApplyIndexerComments *dlg = new CApplyIndexerComments(main_window, m_Workbench);
3138  dlg->Show(true);
3139 }
3140 
3141 
3142 
3144 {
3145  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3146  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3148 }
3149 
3151 {
3152  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3153  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3154  CRemoveSeqAnnot worker;
3155  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Seq-Annot Ids",CSeq_annot::C_Data::e_Ids))
3156  event.Skip();
3157 }
3158 
3160 {
3161  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3162  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3163  CRemoveBankitComment worker;
3164  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Bankit Comment"))
3165  event.Skip();
3166 }
3167 
3168 
3170 {
3171  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3172  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3174  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Duplicate Structured Comment"))
3175  event.Skip();
3176 }
3177 
3179 {
3180  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3181  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3182 
3184  if (dlg.ShowModal() == wxID_OK)
3185  {
3187  if (cmd) m_CmdProccessor->Execute(cmd);
3188  dlg.Close();
3189  }
3190 }
3191 
3193 {
3194  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3195  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3196 
3197  wxWindow* main_window = NULL;
3198  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
3199  if (wb_frame)
3200  main_window = wb_frame->GetMainWindow();
3201 
3202  CRemoveSequencesDlg dlg(main_window, m_TopSeqEntry);
3203  if (dlg.ShowModal() == wxID_OK) {
3205  if (cmd) {
3207  }
3208  }
3209 }
3210 
3212 {
3213  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3214  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3215 
3216  CRemoveSeqAnnot worker;
3217  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Alignments",CSeq_annot::C_Data::e_Align))
3218  event.Skip();
3219 }
3220 
3222 {
3223  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3224  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3225 
3226  CRemoveSeqAnnot worker;
3227  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Graphs",CSeq_annot::C_Data::e_Graph))
3228  event.Skip();
3229 }
3230 
3232 {
3233  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3234  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3235 
3236  CRemoveGenomeProjectsDB worker;
3237  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove GenomeProjectsDB"))
3238  event.Skip();
3239 }
3240 
3242 {
3243  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3244  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3245 
3247  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Empty GenomeProjectsDB"))
3248  event.Skip();
3249 }
3250 
3251 
3253 {
3254  CRef<CCmdComposite> cmd = CleanupCommand (m_TopSeqEntry, true, (evt.GetId() == eCmdTaxFixCleanup || evt.GetId() == eCmdTaxFixCleanup_ext));
3255  if (cmd) {
3257  }
3258 }
3259 
3260 
3262 {
3264  if (cmd) {
3266  }
3267 }
3268 
3269 
3270 // Requested in GB-7591
3272 {
3275  copy->Assign(*entry);
3276 
3278  CScope scope2(*objmgr);
3279  scope2.AddDefaults();
3280  CSeq_entry_Handle new_seh = scope2.AddTopLevelSeqEntry(*copy);
3281 
3282  CCleanup::RepairXrefs(new_seh);
3283 
3284  CRef<CCmdComposite> cmd(new CCmdComposite("Cleanup"));
3286  cmd->AddCommand(*clean);
3287  if (cmd) {
3289  }
3290 }
3291 
3292 
3294 {
3295  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3296  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3297 
3299  if (cmd) {
3301  }
3302 }
3303 
3304 
3306 {
3307  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3308  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3309 
3311  if (cmd) {
3313  }
3314 }
3315 
3316 
3317 void CSequenceEditingEventHandler::EditPubs( wxCommandEvent& evt )
3318 {
3319  CEditPubDlg * dlg = new CEditPubDlg(NULL, m_Workbench);
3320 
3321  dlg->Show(true);
3322 }
3323 
3324 
3326 {
3327  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3328  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3329 
3330  CFixAllCap worker;
3332  if (cmd) {
3334  }
3335 }
3336 
3338 {
3339  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3340  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3341 
3342  CFixAuthorCap worker;
3344  if (cmd) {
3346  }
3347 }
3348 
3350 {
3351  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3352  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3353 
3354  CFixTitleCap worker;
3356  if (cmd) {
3358  }
3359 }
3360 
3362 {
3363  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3364  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3365 
3366  CFixAffilCap worker;
3368  if (cmd) {
3370  }
3371 }
3372 
3374 {
3375  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3376  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3377 
3378  CFixCountryCap worker;
3380  if (cmd) {
3382  }
3383 }
3384 
3386 {
3387  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3388  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3389 
3390  CRemoveUnpublishedPubs worker;
3392  if (cmd) {
3394  }
3395 }
3396 
3398 {
3399  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3400  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3401 
3402  CRemoveInPressPubs worker;
3404  if (cmd) {
3406  }
3407 }
3408 
3410 {
3411  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3412  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3413 
3414  CRemovePublishedPubs worker;
3416  if (cmd) {
3418  }
3419 }
3420 
3422 {
3423  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3424  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3425 
3426  CRemoveCollidingPubs worker;
3428  if (cmd) {
3430  }
3431 }
3432 
3433 
3435 {
3436  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3437  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3438 
3439  CRemoveAllPubs worker;
3441  if (cmd) {
3443  }
3444 }
3445 
3447 {
3448  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3449  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3450 
3451  CRemoveAuthorConsortium worker;
3453  if (cmd) {
3455  }
3456 }
3457 
3459 {
3460  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3461  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3462 
3463  CReverseAuthorNames worker;
3465  if (cmd) {
3467  }
3468 }
3469 
3471 {
3472  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3473  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3474 
3475  CStripAuthorSuffix worker;
3477  if (cmd) {
3479  }
3480 }
3481 
3483 {
3484  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3485  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3486 
3487  CFixAuthorInitials worker;
3489  if (cmd) {
3491  }
3492 }
3493 
3495 {
3496  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3497  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3498 
3500  worker.SetConstraint("consortium");
3502  if (cmd) {
3504  }
3505 }
3506 
3508 {
3509  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3510  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3511 
3514  if (cmd) {
3516  }
3517 }
3518 
3520 {
3521  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3522  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3523 
3524  CAddCitSubForUpdate worker;
3525  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Cit-sub for update"))
3526  event.Skip();
3527 }
3528 
3530 {
3531  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3532  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3533 
3534  CFixUSA worker;
3536  if (cmd) {
3538  }
3539 }
3540 
3542 {
3543  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3544  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3545 
3546  CRef<CMiscSeqTableColumn> col(new CMiscSeqTableColumn("CDS comment"));
3547  vector<CConstRef<CObject> > objs = col->GetObjects(m_TopSeqEntry, "", CRef<edit::CStringConstraint>(NULL));
3548  if (objs.size() == 0) {
3549  wxMessageBox(wxT("No coding regions found!"), wxT("Error"),
3550  wxOK | wxICON_ERROR, NULL);
3551  return;
3552  }
3553 
3554  bool any_change = false;
3555  CRef<CCmdComposite> cmd(new CCmdComposite("Resynch partials"));
3556  ITERATE(vector<CConstRef<CObject> >, it, objs) {
3557  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
3558  CRef<CSeq_feat> new_feat(new CSeq_feat());
3559  new_feat->Assign(*f);
3562  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(fh, *new_feat)));
3563  any_change = true;
3564  }
3565 
3567  if (synch) {
3568  cmd->AddCommand(*synch);
3569  any_change = true;
3570  }
3571  }
3572 
3573  if (any_change) {
3575  } else {
3576  wxMessageBox(wxT("No effect!"), wxT("Error"),
3577  wxOK | wxICON_ERROR, NULL);
3578  }
3579 
3580 }
3581 
3582 
3584 {
3585  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3586  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3587 
3588  CRetranslateCDS worker;
3589  switch (evt.GetId())
3590  {
3593  worker.apply( m_TopSeqEntry, m_CmdProccessor, "Retranslate coding regions", CRetranslateCDS::eRetranslateCDSIgnoreStopExceptEnd); break;
3594  case eCmdRetranslateCDSObeyStop : worker.apply( m_TopSeqEntry, m_CmdProccessor, "Retranslate coding regions", CRetranslateCDS::eRetranslateCDSObeyStop); break;
3596  default : break;
3597  }
3598 
3599 }
3600 
3601 
3603 {
3605  dlg->Show(true);
3606 }
3607 
3608 
3610 {
3611  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3612  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3613 
3615  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove All Structured Comments"))
3616  event.Skip();
3617 }
3618 
3620 {
3621  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3622  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3623 
3625  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Empty Structured Comments"))
3626  event.Skip();
3627 }
3628 
3630 {
3631  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3632  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3633 
3634  CModifyStructuredComment worker;
3635  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Structured Comment Field"))
3636  event.Skip();
3637 }
3638 
3640 {
3641  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3642  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3643 
3645  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Structured Comment Keyword"))
3646  event.Skip();
3647 }
3648 
3650 {
3651  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3652  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3653 
3655  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Structured Comment Keyword"))
3656  event.Skip();
3657 }
3658 
3659 void CSequenceEditingEventHandler::AddKeywordGDS( wxCommandEvent& event )
3660 {
3661  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3662  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3663 
3664  CAddConstKeyword worker;
3665  worker.SetKeyword("GDS");
3666  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Keyword GDS"))
3667  event.Skip();
3668 }
3669 
3671 {
3672  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3673  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3674 
3675  CAddConstKeyword worker;
3676  worker.SetKeyword("TPA:inferential");
3677  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Keyword TPA:inferential"))
3678  event.Skip();
3679 }
3680 
3682 {
3683  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3684  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3685 
3686  CAddConstKeyword worker;
3687  worker.SetKeyword("TPA:experimental");
3688  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Keyword TPA:experimental"))
3689  event.Skip();
3690 }
3691 
3693 {
3694  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3695  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3696 
3697  CAddConstKeyword worker;
3698  worker.SetKeyword("TPA:assembly");
3699  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Keyword TPA:assembly"))
3700  event.Skip();
3701 }
3702 
3704 {
3707  CAECRFrame * dlg = new CAECRFrame(NULL, m_Workbench);
3708  dlg->SetInitParameters(aecr_action_type, aecr_field_type, ncbi::kGenbankBlockKeyword);
3709  CallAfter(&CSequenceEditingEventHandler::ShowAfter, dlg);
3710 }
3711 
3713 {
3715  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3716 
3717  CRef<CSeqdesc> seqdesc(new CSeqdesc());
3718  seqdesc->SetUser().Assign(*edit::CGenomeAssemblyComment::MakeEmptyUserObject());
3719 
3721  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
3722  if (!orig_locs.empty())
3723  {
3724  CBioseq_Handle bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*orig_locs.front());
3725  seh = bsh.GetSeq_entry_Handle();
3726  }
3727 
3728  CIRef<IEditObject> editor(new CEditObjectSeq_desc(*seqdesc, seh, m_TopSeqEntry.GetScope(), true));
3729  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
3730  edit_dlg->SetUndoManager(m_CmdProccessor);
3731  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
3732  edit_dlg->SetEditorWindow(editorWindow);
3733  edit_dlg->SetEditor(editor);
3734  edit_dlg->SetWorkDir(m_WorkDir);
3735  edit_dlg->Show(true);
3736 }
3737 
3738 
3740 {
3741  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3742  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3743 
3745  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Reorder Structured Comment"))
3746  event.Skip();
3747 }
3748 
3750 {
3751  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3752  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3753 
3754  CConvertComment worker;
3755  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Convert Comment to Structured Comment", "::"," "))
3756  event.Skip();
3757 }
3758 
3759 void CSequenceEditingEventHandler::ParseComment( wxCommandEvent& event )
3760 {
3761  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3762  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3763 
3764  CConvertComment worker;
3765  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Parse Comment to Structured Comment", "=",";"))
3766  event.Skip();
3767 }
3768 
3770 {
3771  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3772  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3773 
3774  CAssignFeatureId worker;
3775  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Assign Feature Ids"))
3776  event.Skip();
3777 }
3778 
3780 {
3781  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3782  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3783 
3784  CClearFeatureId worker;
3785  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Clear Feature Ids"))
3786  event.Skip();
3787 }
3788 
3790 {
3791  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3792  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3793 
3794  CReassignFeatureId worker;
3795  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Reassign Feature Ids"))
3796  event.Skip();
3797 }
3798 
3800 {
3801  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3802  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3803 
3804  CUniqifyFeatureId worker;
3805  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Uniqify Feature Ids"))
3806  event.Skip();
3807 }
3808 
3810 {
3811  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3812  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3813 
3814  CPCRPrimerTrimJunk worker;
3816  if (cmd) {
3818  }
3819 }
3820 
3822 {
3823  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3824  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3825 
3826  CPCRPrimerFixI worker;
3828  if (cmd) {
3830  }
3831 }
3832 
3833 void CSequenceEditingEventHandler :: ItemAction(wxCommandEvent& event, CRef <CItem> item, const string& title)
3834 {
3836  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3837  if (!(item.GetPointer()) || !(item->apply(m_TopSeqEntry, m_CmdProccessor, title)) )
3838  event.Skip();
3839 };
3840 
3842 {
3843  ItemAction(event, CRef <CItem> (new CRmvCddFeatDbxref), "Remove All CDD Features and Dbxrefs");
3844 };
3845 
3847 {
3848  ItemAction(event, CRef <CItem> (new CPrefixAuthority), "Prefix Authority with Organism");
3849 };
3850 
3851 void CSequenceEditingEventHandler :: FocusSet(wxCommandEvent& event )
3852 {
3853  ItemAction(event, CRef <CItem> (new CSrcFocusSet()), "Set");
3854 };
3855 
3857 {
3858  ItemAction(event, CRef <CItem> (new CSrcFocusClear()), "Clear");
3859 };
3860 
3862 {
3863  ItemAction(event, CRef <CItem> (new CSetTransgSrcDesc()), "Set Transgenic on Source Desc");
3864 };
3865 
3867 {
3868  ItemAction(event, CRef <CItem> (new CSplitDblinkQuals()), "Split DBLink Quals at Commas");
3869 };
3870 
3872 {
3873  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3874  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3875 
3876  CFixOrgModInst worker;
3878  if (cmd) {
3880  }
3881 }
3882 
3884 {
3885  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3886  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3887 
3888  CSwapPrimerNameSeq worker;
3890  if (cmd) {
3892  }
3893 }
3894 
3896 {
3897  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3898  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3899 
3900  CMergePrimerSets worker;
3902  if (cmd) {
3904  }
3905 }
3906 
3908 {
3909  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3910  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3911 
3912  CSplitPrimerSets worker;
3914  if (cmd) {
3916  }
3917 }
3918 
3920 {
3921  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3922  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3923 
3925  if (dlg.ShowModal() == wxID_OK)
3926  {
3928  if (cmd) m_CmdProccessor->Execute(cmd);
3929  dlg.Close();
3930  }
3931 }
3932 
3934 {
3935  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3936  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3937 
3940  if (cmd) {
3942  }
3943 }
3944 
3946 {
3947  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3948  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3949 
3952  if (cmd) {
3954  }
3955 }
3956 
3958 {
3959  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3960  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3961 
3962  CCountryFixup worker;
3964  if (cmd) {
3966  }
3967 }
3968 
3970 {
3971  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3972  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3973 
3974  CCountryFixup worker;
3976  if (cmd) {
3978  }
3979 }
3980 
3981 void CSequenceEditingEventHandler::VectorTrim( wxCommandEvent& event )
3982 {
3983  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3984  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3985 
3986  wxWindow* main_window = NULL;
3987  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
3988  if (wb_frame)
3989  main_window = wb_frame->GetMainWindow();
3990 
3991  CVectorTrimDlg* dlg = new CVectorTrimDlg(main_window, m_TopSeqEntry, m_CmdProccessor);
3992  dlg->Show();
3993 }
3994 
3995 void CSequenceEditingEventHandler::SelectTarget( wxCommandEvent& event )
3996 {
3998  dlg->Show();
3999 }
4000 
4001 void CSequenceEditingEventHandler::AddCDS( wxCommandEvent& event )
4002 {
4003  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4004  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4005 
4007  m_Workbench);
4009  dlg->Show(true);
4010 /* if (dlg.ShowModal() == wxID_OK)
4011  {
4012  CRef<CCmdComposite> cmd = dlg.GetCommand();
4013  if (cmd) {
4014  m_CmdProccessor->Execute(cmd);
4015  } else {
4016  string errmsg = dlg.GetErrorMessage();
4017  if (!NStr::IsBlank(errmsg)) {
4018  wxString error = ToWxString(errmsg);
4019  wxMessageBox(error, wxT("Error"),
4020  wxOK | wxICON_ERROR, NULL);
4021  }
4022  }
4023  dlg.Close();
4024  }
4025 */
4026 }
4027 
4028 
4029 void CSequenceEditingEventHandler::AddRNA( wxCommandEvent& event )
4030 {
4031  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4032  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4033 
4035  m_Workbench);
4037  dlg->Show(true);
4038  /* if (dlg.ShowModal() == wxID_OK)
4039  {
4040  CRef<CCmdComposite> cmd = dlg.GetCommand();
4041  if (cmd) {
4042  m_CmdProccessor->Execute(cmd);
4043  } else {
4044  string errmsg = dlg.GetErrorMessage();
4045  if (!NStr::IsBlank(errmsg)) {
4046  wxString error = ToWxString(errmsg);
4047  wxMessageBox(error, wxT("Error"),
4048  wxOK | wxICON_ERROR, NULL);
4049  }
4050  }
4051  dlg.Close();
4052  }*/
4053 }
4054 
4055 
4057 {
4058  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4059  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4060 
4061  CBulkFeatureAddDlgStd *dlg = new CBulkFeatureAddDlgStd(wxTheApp->GetTopWindow(), m_TopSeqEntry,
4062  m_Workbench);
4064  dlg->Show(true);
4065 }
4066 
4067 
4068 void CSequenceEditingEventHandler::Validate( wxCommandEvent& evt )
4069 {
4070  CRef<CUser_object> params(new CUser_object());
4071  switch (evt.GetId())
4072  {
4073  case eCmdValidate:
4074  case eCmdValidate_ext:
4077  break;
4081  break;
4085  break;
4086  default:
4087  break;
4088  }
4089 
4090  wxWindow* main_window = NULL;
4091  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
4092  if (wb_frame)
4093  main_window = wb_frame->GetMainWindow();
4094 
4095  CValidateFrame::GetInstance(main_window, m_Workbench, params);
4096 }
4097 
4098 
4100 {
4101  wxWindow* main_window = NULL;
4102  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
4103  if (wb_frame)
4104  main_window = wb_frame->GetMainWindow();
4105  IRefreshCntrl * suc_refresh = new CSUCRefreshCntrl(m_Workbench);
4106  CGenericReportDlg* report = new CGenericReportDlg(main_window, m_Workbench, wxID_ANY, _("SUC"));
4107  report->SetRefresh(suc_refresh);
4108  report->RefreshData();
4109  report->Show(true);
4110 }
4111 
4113 {
4114  wxWindow* main_window = NULL;
4115  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
4116  if (wb_frame)
4117  main_window = wb_frame->GetMainWindow();
4118 
4120  dlg->Show(true);
4121 }
4122 
4123 
4125 {
4127  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4128 
4130 }
4131 
4132 
4134 {
4136  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4137 
4139 }
4140 
4141 
4143 {
4145  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4146 
4148 }
4149 
4150 
4152 {
4154  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4155 
4157 }
4158 
4159 
4161 {
4163  dlg->Show(true);
4164 }
4165 
4166 
4167 void CSequenceEditingEventHandler::TestDialogView(wxCommandEvent& /*event*/)
4168 {
4169  if (!m_TopSeqEntry) return;
4170 
4174 }
4175 
4176 void CSequenceEditingEventHandler::TestFormView( wxCommandEvent& /*event*/ )
4177 {
4178  if (!m_TopSeqEntry) return;
4179 
4183 }
4184 
4185 void CSequenceEditingEventHandler::AddSequences( wxCommandEvent& event )
4186 {
4187  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4188  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4189 
4190  CAddSequences worker;
4192 }
4193 
4194 
4196 {
4199  switch (evt.GetId()) {
4200  case eCmdApplySourceQual:
4201  aecr_action_type = CAECRFrame::eActionType_Apply;
4202  aecr_field_type = CAECRFrame::eFieldType_Source;
4203  break;
4204  case eCmdEditSourceQual:
4205  aecr_action_type = CAECRFrame::eActionType_Edit;
4206  aecr_field_type = CAECRFrame::eFieldType_Source;
4207  break;
4208  case eCmdConvertSourceQual:
4209  aecr_action_type = CAECRFrame::eActionType_Convert;
4210  aecr_field_type = CAECRFrame::eFieldType_Source;
4211  break;
4212  case eCmdSwapSourceQual:
4213  aecr_action_type = CAECRFrame::eActionType_Swap;
4214  aecr_field_type = CAECRFrame::eFieldType_Source;
4215  break;
4216  case eCmdRemoveSourceQual:
4217  aecr_action_type = CAECRFrame::eActionType_Remove;
4218  aecr_field_type = CAECRFrame::eFieldType_Source;
4219  break;
4220  case eCmdApplyRNAQual:
4221  aecr_action_type = CAECRFrame::eActionType_Apply;
4222  aecr_field_type = CAECRFrame::eFieldType_RNA;
4223  break;
4224  case eCmdEditRNAQual:
4225  aecr_action_type = CAECRFrame::eActionType_Edit;
4226  aecr_field_type = CAECRFrame::eFieldType_RNA;
4227  break;
4228  case eCmdConvertRNAQual:
4229  aecr_action_type = CAECRFrame::eActionType_Convert;
4230  aecr_field_type = CAECRFrame::eFieldType_RNA;
4231  break;
4232  case eCmdSwapRNAQual:
4233  aecr_action_type = CAECRFrame::eActionType_Swap;
4234  aecr_field_type = CAECRFrame::eFieldType_RNA;
4235  break;
4236  case eCmdRemoveRNAQual:
4237  aecr_action_type = CAECRFrame::eActionType_Remove;
4238  aecr_field_type = CAECRFrame::eFieldType_RNA;
4239  break;
4240  case eCmdApplyCGPQual:
4241  aecr_action_type = CAECRFrame::eActionType_Apply;
4242  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4243  break;
4244  case eCmdEditCGPQual:
4245  aecr_action_type = CAECRFrame::eActionType_Edit;
4246  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4247  break;
4248  case eCmdConvertCGPQual:
4249  aecr_action_type = CAECRFrame::eActionType_Convert;
4250  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4251  break;
4252  case eCmdSwapCGPQual:
4253  aecr_action_type = CAECRFrame::eActionType_Swap;
4254  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4255  break;
4256  case eCmdRemoveCGPQual:
4257  aecr_action_type = CAECRFrame::eActionType_Remove;
4258  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4259  break;
4260  case eCmdApplyFeatQual:
4261  aecr_action_type = CAECRFrame::eActionType_Apply;
4262  aecr_field_type = CAECRFrame::eFieldType_Feature;
4263  break;
4264  case eCmdEditFeatQual:
4265  aecr_action_type = CAECRFrame::eActionType_Edit;
4266  aecr_field_type = CAECRFrame::eFieldType_Feature;
4267  break;
4268  case eCmdConvertFeatQual:
4269  aecr_action_type = CAECRFrame::eActionType_Convert;
4270  aecr_field_type = CAECRFrame::eFieldType_Feature;
4271  break;
4272  case eCmdSwapFeatQual:
4273  aecr_action_type = CAECRFrame::eActionType_Swap;
4274  aecr_field_type = CAECRFrame::eFieldType_Feature;
4275  break;
4276  case eCmdRemoveFeatQual:
4277  aecr_action_type = CAECRFrame::eActionType_Remove;
4278  aecr_field_type = CAECRFrame::eFieldType_Feature;
4279  break;
4281  aecr_action_type = CAECRFrame::eActionType_RemoveTextOutside;
4282  aecr_field_type = CAECRFrame::eFieldType_Misc;
4283  break;
4284  default:
4285  return;
4286  break;
4287  }
4288  wxMenu* menu = dynamic_cast<wxMenu*>(evt.GetEventObject());
4289  wxString title;
4290  if (menu)
4291  title = menu->GetLabelText(evt.GetId());
4292  CAECRFrame * dlg = new CAECRFrame(NULL, m_Workbench);
4293  dlg->SetInitParameters(aecr_action_type, aecr_field_type, kEmptyStr, title);
4294  CallAfter(&CSequenceEditingEventHandler::ShowAfter, dlg);
4295 }
4296 
4298 {
4299  dlg->Show();
4300 }
4301 
4303 {
4305  switch (evt.GetId()) {
4306  case eCmdEditFeatLoc:
4307  case eCmdEditFeatLoc_ext:
4309  break;
4310  case eCmdEditFeatEv:
4312  break;
4313  case eCmdEditFeatStrand:
4316  break;
4317  case eCmdEditFeatRevInt:
4319  break;
4320  case eCmdEditFeatPseudo:
4322  break;
4323  case eCmdEditFeatException:
4325  break;
4328  break;
4329  case eCmdEditFeatInference:
4331  break;
4332  default:
4333  break;
4334  }
4335  dlg->Show(true);
4336 }
4337 
4338 
4339 void CSequenceEditingEventHandler::ParseText( wxCommandEvent& evt )
4340 {
4342  if (evt.GetId() == eCmdParseTextFromDefline) {
4343  dlg->SetFromFieldType(CParseTextDlg::eFieldType_Misc); // CFieldNamePanel
4345  }
4346 
4347  dlg->Show(true);
4348 }
4349 
4351 {
4353  dlg->Show(true);
4354 }
4355 
4357 {
4359  dlg->Show(true);
4360 }
4361 
4362 static const char* kFrameWidth = "Frame Width";
4363 static const char* kFrameHeight = "Frame Height";
4364 static const char* kFramePosX = "Frame Position X";
4365 static const char* kFramePosY = "Frame Position Y";
4366 
4367 
4368 void CSequenceEditingEventHandler::SaveSettings(const string &regpath, wxWindow *dlg) const
4369 {
4370  if (regpath.empty() || !dlg)
4371  return;
4372 
4374  CRegistryWriteView view = gui_reg.GetWriteView(regpath);
4375 
4376  view.Set(kFrameWidth, dlg->GetScreenRect().GetWidth());
4377  view.Set(kFrameHeight, dlg->GetScreenRect().GetHeight());
4378  view.Set(kFramePosX, dlg->GetScreenPosition().x);
4379  view.Set(kFramePosY, dlg->GetScreenPosition().y);
4380 }
4381 
4382 
4383 void CSequenceEditingEventHandler::LoadSettings(const string &regpath, wxWindow *dlg)
4384 {
4385  if (regpath.empty() || !dlg)
4386  return;
4387 
4389  CRegistryReadView view = gui_reg.GetReadView(regpath);
4390 
4391  int width = view.GetInt(kFrameWidth, -1);
4392  int height = view.GetInt(kFrameHeight, -1);
4393  if (width >= 0 && height >= 0)
4394  dlg->SetSize(wxSize(width,height));
4395 
4396  int pos_x = view.GetInt(kFramePosX, -1);
4397  int pos_y = view.GetInt(kFramePosY, -1);
4398 
4399  if (pos_x >= 0 && pos_y >= 0)
4400  {
4401  int max_x = 0;
4402  for (auto i = 0; i < wxDisplay::GetCount(); i++) // also see gui/widgets/wx/wx_utils.cpp:CorrectWindowRect() for alternative window position validation
4403  {
4404  wxDisplay display(i);
4405  max_x += display.GetGeometry().GetWidth();
4406  }
4407  if (pos_x + width > max_x) pos_x = wxGetDisplaySize().GetWidth()-width-5;
4408  if (pos_y + height > wxGetDisplaySize().GetHeight()) pos_y = wxGetDisplaySize().GetHeight()-height-5;
4409 
4410  dlg->SetPosition(wxPoint(pos_x,pos_y));
4411  }
4412  wxTopLevelWindow* top_win = dynamic_cast<wxTopLevelWindow*>(dlg);
4413  if (top_win)
4414  {
4415  wxRect rc = dlg->GetRect();
4416  CorrectWindowRect(top_win, rc);
4417  dlg->SetSize(rc);
4418  dlg->Move(rc.GetLeftTop());
4419  }
4420 }
4421 
4423 {
4424  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4425  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4426 
4427  CQualTableLoadManager* qual_mgr = NULL;
4428 
4429  CRef<CFileLoadWizard> fileManager(new CFileLoadWizard());
4430  vector<string> format_ids;
4431  format_ids.push_back("file_loader_qual_table");
4432  fileManager->LoadFormats(format_ids);
4433  fileManager->SetWorkDir(m_WorkDir);
4434 
4435  for( size_t i = 0; i < fileManager->GetFormatManagers().size(); ++i ) {
4436  const IFileLoadPanelClient* mgr = fileManager->GetFormatManagers()[0].GetPointerOrNull();
4437 
4438  if ("file_loader_qual_table" == mgr->GetFileLoaderId()) {
4439  const CQualTableLoadManager* const_qual_mgr = dynamic_cast<const CQualTableLoadManager*>(mgr);
4440  if (const_qual_mgr) {
4441  qual_mgr = const_cast<CQualTableLoadManager*>(const_qual_mgr);
4442  qual_mgr->SetTopLevelEntry(m_TopSeqEntry);
4443  qual_mgr->SetServiceLocator(m_Workbench);
4444  }
4445  }
4446  }
4447 
4448  vector<CIRef<IOpenObjectsPanelClient> > loadManagers;
4449  loadManagers.push_back(CIRef<IOpenObjectsPanelClient>(fileManager.GetPointer()));
4450 
4451  COpenObjectsDlg dlg(NULL);
4452  dlg.SetSize(760, 940);
4453  dlg.Centre(wxBOTH | wxCENTRE_ON_SCREEN);
4454  dlg.SetMinSize(wxSize(760, 750));
4455  dlg.SetRegistryPath("Dialogs.Edit.OpenTables");
4456  dlg.SetManagers(loadManagers);
4457  LoadSettings("Dialogs.Edit.OpenTables", &dlg);
4458 
4459  if (dlg.ShowModal() == wxID_OK) {
4460  qual_mgr->x_GetColumnIdPanel()->x_TableReaderMacro();
4461  }
4462  SaveSettings("Dialogs.Edit.OpenTables", &dlg);
4463 }
4464 
4466 {
4467  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4468  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4469 
4470  CQualTableLoadManager* qual_mgr = NULL;
4471 
4472  vector< CIRef<IFileLoadPanelClientFactory> > file_formats;
4473  GetExtensionAsInterface("file_load_panel_client", file_formats);
4474  CIRef<IFileLoadPanelClient> format_manager;
4475 
4476  for (size_t i = 0; i < file_formats.size(); ++i) {
4477  if (file_formats[i]->GetFileLoaderId() == "file_loader_qual_table") {
4478  format_manager.Reset(file_formats[i]->CreateInstance());
4479 
4480  if ("file_loader_qual_table" == format_manager->GetFileLoaderId()) {
4481  const CQualTableLoadManager* const_qual_mgr = dynamic_cast<const CQualTableLoadManager*>(format_manager.GetPointer());
4482  if (const_qual_mgr) {
4483  qual_mgr = const_cast<CQualTableLoadManager*>(const_qual_mgr);
4484  qual_mgr->SetTopLevelEntry(m_TopSeqEntry);
4485  qual_mgr->SetServiceLocator(m_Workbench);
4486  }
4487  }
4488  }
4489  }
4490 
4491 
4492  string fname;
4493  if (wxTheClipboard->Open())
4494  {
4495  wxTextDataObject data;
4496  if (wxTheClipboard->IsSupported( wxDF_UNICODETEXT ))
4497  wxTheClipboard->GetData( data );
4498  if (data.GetText().length() == 0) {
4499  wxMessageBox("No data in clipboard for table");
4500  wxTheClipboard->Close();
4501  return;
4502  }
4503 
4505  f.AsOutputFile(CTmpFile::eIfExists_ReturnCurrent) << data.GetText();
4506  fname = f.GetFileName();
4507  wxTheClipboard->Close();
4508  }
4509 
4510  vector<wxString> fnames;
4511  fnames.push_back(ToWxString(fname));
4512 
4513  // This also causes windows to be created it seems, and so it must happen after
4514  // create is called....
4515  qual_mgr->SetFilenames(fnames);
4516 
4518  dlg.SetSize(760, 940);
4519  dlg.Centre(wxBOTH|wxCENTRE_ON_SCREEN);
4520  dlg.SetMinSize(wxSize(760, 750));
4521  dlg.SetRegistryPath("Dialogs.Edit.OpenTables");
4522  LoadSettings("Dialogs.Edit.OpenTables", &dlg);
4523 
4524  if (dlg.ShowModal() == wxID_OK) {
4525  qual_mgr->x_GetColumnIdPanel()->x_TableReaderMacro();
4526  }
4527  CFile tmp_file(fname);
4528  tmp_file.Remove();
4529 
4530  SaveSettings("Dialogs.Edit.OpenTables", &dlg);
4531 }
4532 
4533 void CSequenceEditingEventHandler::BulkEdit( wxCommandEvent& event )
4534 {
4535  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4536  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4537 
4538  try
4539  {
4541  dlg.SetWorkDir(m_WorkDir);
4542  if (dlg.ShowModal() == wxID_OK) {
4545  //dlg.Close();
4546  }
4547  } catch (CException&) {}
4548 }
4549 
4550 void CSequenceEditingEventHandler::BulkCdsEdit( wxCommandEvent& event )
4551 {
4552  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4553  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4554 
4555 
4557 
4558  try
4559  {
4560  CBulkCDS dlg(NULL, seh,m_Workbench, m_SeqSubmit);
4561 
4562  bool done = false;
4563  while (!done) {
4564  if (dlg.ShowModal() == wxID_OK) {
4566  if (cmd) {
4568  //dlg.Close();
4569  done = true;
4570  } else {
4571  wxString error = ToWxString(dlg.GetErrorMessage());
4572  wxMessageBox(error, wxT("Error"),
4573  wxOK | wxICON_ERROR, NULL);
4574  }
4575  } else {
4576  done = true;
4577  }
4578  }
4579  } catch (CException&) {}
4580 }
4581 
4582 void CSequenceEditingEventHandler::BulkGeneEdit( wxCommandEvent& event )
4583 {
4584  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4585  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4586 
4588 
4589  try
4590  {
4592 
4593  bool done = false;
4594  while (!done) {
4595  if (dlg.ShowModal() == wxID_OK) {
4597  if (cmd) {
4599  //dlg.Close();
4600  done = true;
4601  } else {
4602  wxString error = ToWxString(dlg.GetErrorMessage());
4603  wxMessageBox(error, wxT("Error"),
4604  wxOK | wxICON_ERROR, NULL);
4605  }
4606  } else {
4607  done = true;
4608  }
4609  }
4610  } catch (CException&) {}
4611 
4612 }
4613 
4614 void CSequenceEditingEventHandler::BulkRnaEdit( wxCommandEvent& event )
4615 {
4616  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4617  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4618 
4620 
4621  try {
4622  CBulkRna dlg(NULL, seh,m_Workbench, m_SeqSubmit);
4623 
4624  bool done = false;
4625  while (!done) {
4626  if (dlg.ShowModal() == wxID_OK) {
4628  if (cmd) {
4630  //dlg.Close();
4631  done = true;
4632  } else {
4633  wxString error = ToWxString(dlg.GetErrorMessage());
4634  wxMessageBox(error, wxT("Error"),
4635  wxOK | wxICON_ERROR, NULL);
4636  }
4637  } else {
4638  done = true;
4639  }
4640  }
4641  } catch (const CException&) {}
4642 }
4643 
4645 {
4646  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4647  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4648 
4650 
4651  try {
4653 
4654  bool done = false;
4655  while (!done) {
4656  if (dlg.ShowModal() == wxID_OK) {
4658  if (cmd) {
4660  //dlg.Close();
4661  done = true;
4662  }
4663  else {
4664  wxString error = ToWxString(dlg.GetErrorMessage());
4665  wxMessageBox(error, wxT("Error"),
4666  wxOK | wxICON_ERROR, NULL);
4667  }
4668  }
4669  else {
4670  done = true;
4671  }
4672  }
4673  }
4674  catch (const CException&) {}
4675 }
4676 
4678 {
4679  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4680  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4682  if (dlg.ShowModal() == wxID_OK)
4683  {
4685  if (cmd)
4686  {
4688  }
4689  dlg.Close();
4690  }
4691 }
4692 
4693 
4694 void CSequenceEditingEventHandler::CorrectGenes( wxCommandEvent& event )
4695 {
4697  dlg->Show(true);
4698 }
4699 
4700 
4702 {
4703  return first->Compare(*second);
4704 
4705 }
4706 
4707 
4709 {
4710  return first->Equals(*second);
4711 }
4712 
4713 void CSequenceEditingEventHandler::Autodef(wxCommandEvent& evt)
4714 {
4715  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4716  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4717 
4718  int event_id = evt.GetId();
4719 
4720  switch (event_id) {
4722  {
4723  SAutodefParams params;
4727  }
4728  break;
4729  case eCmdAutodefOptions:
4730  {
4731  SAutodefParams params;
4733  CAutodefDlg dlg(NULL);
4734  dlg.SetParams(&params);
4735  if (dlg.ShowModal() == wxID_OK)
4736  {
4737  dlg.PopulateParams(params);
4739  if (dlg.OnlyTargeted()) {
4740  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
4741  vector<CRef<CSeq_loc> > cpy = orig_locs;
4742  vector<CRef<CSeq_loc> >::iterator lit = cpy.begin();
4743  while (lit != cpy.end()) {
4745  if (!b || b.IsAa()) {
4746  lit = cpy.erase(lit);
4747  } else {
4748  ++lit;
4749  }
4750  }
4751 
4752  if (cpy.empty()) {
4753  dlg.Close();
4754  return;
4755  }
4756  stable_sort(cpy.begin(), cpy.end(), CompLoc);
4757  cpy.erase( unique( cpy.begin(), cpy.end(), EqualLoc), cpy.end() );
4758 
4759  cmd.Reset(new CCmdComposite("Autodef"));
4760  ITERATE(vector<CRef<CSeq_loc> >, b, cpy) {
4763  if (subcmd) {
4764  cmd->AddCommand(*subcmd);
4765  }
4766  }
4767  } else {
4769  }
4771  dlg.Close();
4772  }
4773 
4774  }
4775  break;
4776  case eCmdAutodefMisc:
4777  {
4778  SAutodefParams params;
4780  params.m_MiscFeatRule = 1;
4783  }
4784  break;
4785  case eCmdAutodefId:
4786  {
4787  SAutodefParams params;
4791  }
4792  break;
4793  case eCmdAutodefNoMods:
4794  {
4795  SAutodefParams params;
4798  }
4799  break;
4800  case eCmdAutodefPopset:
4801  {
4802  SAutodefParams params;
4804  CAutodefDlg dlg(NULL);
4805  dlg.SetParams(&params);
4806  dlg.ShowSourceOptions(false);
4807  if (dlg.ShowModal() == wxID_OK)
4808  {
4809  dlg.PopulateParams(params);
4812  dlg.Close();
4813  }
4814  }
4815  break;
4816  case eCmdAutodefRefresh:
4817  {
4818  CRef<CCmdComposite> cmd = macro::CMacroFunction_RefreshDefline::s_RefreshDeflineCommand(m_TopSeqEntry);
4819  if (cmd) m_CmdProccessor->Execute(cmd);
4820  }
4821  break;
4822  }
4823 }
4824 
4825 
4826 void CSequenceEditingEventHandler::PT_Cleanup (wxCommandEvent& event)
4827 {
4828  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4829  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4831  if (cmd) {
4833  }
4834 }
4835 
4836 
4838 {
4839  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4840  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4841 
4843  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Parse Strain Serotype from Names");
4844  if (composite) {
4845  m_CmdProccessor->Execute(composite);
4846  }
4847 }
4848 
4850 {
4852  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4853 
4855  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Add Strain Serotype to Names");
4856  if (composite) {
4857  m_CmdProccessor->Execute(composite);
4858  }
4859 }
4860 
4861 
4863 {
4865  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4866 
4868  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Fixup Organism Names");
4869  if (composite) {
4870  m_CmdProccessor->Execute(composite);
4871  }
4872 }
4873 
4874 
4876 {
4878  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4879 
4881  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Split Quals at Commas");
4882  if (composite) {
4883  m_CmdProccessor->Execute(composite);
4884  }
4885 }
4886 
4888 {
4890  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4891 
4893  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Split Structured Collections at Semicolon");
4894  if (composite) {
4895  m_CmdProccessor->Execute(composite);
4896  }
4897 }
4898 
4899 
4901 {
4903  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4904 
4906  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Trim Organism Names");
4907  if (composite) {
4908  m_CmdProccessor->Execute(composite);
4909  }
4910 }
4911 
4913 {
4915  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4916 
4917  string rna_name;
4918  switch (event.GetId()){
4919  case eCmdAddNamedrRNA12S:
4920  rna_name = "12S ribosomal RNA";
4921  break;
4922  case eCmdAddNamedrRNA16S:
4923  rna_name = "16S ribosomal RNA";
4924  break;
4925  case eCmdAddNamedrRNA23S:
4926  rna_name = "23S ribosomal RNA";
4927  break;
4928  case eCmdAddNamedrRNA18S:
4929  rna_name = "18S ribosomal RNA";
4930  break;
4931  case eCmdAddNamedrRNA28S:
4932  rna_name = "28S ribosomal RNA";
4933  break;
4934  case eCmdAddNamedrRNA26S:
4935  rna_name = "26S ribosomal RNA";
4936  break;
4937  case eCmdAddNamedrRNASmall:
4938  rna_name = "small subunit ribosomal RNA";
4939  break;
4940  case eCmdAddNamedrRNALarge:
4941  rna_name = "large subunit ribosomal RNA";
4942  break;
4943  }
4944  bool ispartial5 = true;
4945  bool ispartial3 = true;
4946  CRef<CCmdComposite> composite = AddNamedrRna(m_TopSeqEntry, rna_name, ispartial5, ispartial3);
4947  if (composite){
4948  m_CmdProccessor->Execute(composite);
4949  }
4950 }
4951 
4953 {
4955  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4956 
4958  if (composite){
4959  m_CmdProccessor->Execute(composite);
4960  }
4961 }
4962 
4964 {
4966  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4967 
4969  if (composite){
4970  m_CmdProccessor->Execute(composite);
4971  }
4972 }
4973 
4974 
4976 {
4977  bool rval = false;
4979 
4980  if ( (m_IsSeq && m_IsAa && allowed_type == CSeqFeatData::eFeatureLocationAllowed_ProtOnly) ||
4982  (m_IsSeq && allowed_type == CSeqFeatData::eFeatureLocationAllowed_Any) )
4983  rval = true;
4984 
4985  return rval;
4986 }
4987 
4989 {
4990  CRef<CSeq_loc> loc;
4991 
4992  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
4993  if (orig_locs.empty())
4994  {
4995  if (!RunningInsideNCBI())
4996  wxMessageBox(wxT("No data loaded"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
4997  return loc;
4998  }
4999 
5000  if (!m_TopSeqEntry && !m_CachedSelectedLocations.empty()) {
5001  CBioseq_Handle bsh = m_SelObjects.front().scope->GetBioseqHandle(*(m_CachedSelectedLocations.front()->GetId()));
5003  }
5004  if (!m_TopSeqEntry)
5005  {
5006  if (!RunningInsideNCBI())
5007  wxMessageBox(wxT("No data loaded"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5008  return loc;
5009  }
5010 
5011  if (m_IsSeq)
5012  {
5013  ITERATE(vector<CRef<CSeq_loc> >, lit, orig_locs)
5014  {
5015  if (x_IsLocationOkForFeatCmd(subtype, *lit))
5016  {
5017  loc = *lit;
5018  break;
5019  }
5020  }
5021  }
5022 
5023  if (!loc)
5024  {
5025  if (!RunningInsideNCBI())
5026  {
5029  {
5030  wxMessageBox(wxT("Please select a protein bioseq to create a ") + wxString(CSeqFeatData::SubtypeValueToName(subtype)), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5031  }
5032  else if (allowed_type == CSeqFeatData::eFeatureLocationAllowed_NucOnly)
5033  {
5034  wxMessageBox(wxT("Please select a nucleotide bioseq to create a ") + wxString(CSeqFeatData::SubtypeValueToName(subtype)), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5035  }
5036  else
5037  {
5038  wxMessageBox(wxT("Please select a bioseq to create a ") + wxString(CSeqFeatData::SubtypeValueToName(subtype)), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5039  }
5041  dlg->Show();
5042  }
5043  }
5044  return loc;
5045 }
5046 
5048 {
5050  CRef<CSeq_loc> loc = GetFeatureLocation(subtype);
5051  if (!loc)
5052  return;
5053 
5055  feat->SetLocation().Assign(*loc);
5056 
5059 
5060 
5061  CIRef<IEditObject> editor(new CEditObjectSeq_feat(*feat, seh, m_TopSeqEntry.GetScope(), true));
5062  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
5063  edit_dlg->SetUndoManager(m_CmdProccessor);
5064  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
5065  edit_dlg->SetEditorWindow(editorWindow);
5066  edit_dlg->SetEditor(editor);
5067  edit_dlg->Show(true);
5068 }
5069 
5071 {
5073  CRef<CSeq_loc> loc = GetFeatureLocation(subtype);
5074  if (!loc)
5075  return;
5076 
5078  feat->SetLocation().Assign(*loc);
5079 
5080  string regulatory_class;
5081  switch(evt.GetId())
5082  {
5083  case eCmdCreateRegulatory_promoter : regulatory_class = "promoter"; break;
5084  case eCmdCreateRegulatory_enhancer : regulatory_class = "enhancer"; break;
5085  case eCmdCreateRegulatory_ribosome_binding_site : regulatory_class = "ribosome_binding_site"; break;
5086  case eCmdCreateRegulatory_riboswitch : regulatory_class = "riboswitch"; break;
5087  case eCmdCreateRegulatory_terminator : regulatory_class = "terminator"; break;
5088  default : break;
5089  }
5090  if (!regulatory_class.empty())
5091  {
5092  CRef<CGb_qual> q(new CGb_qual());
5093  q->SetQual("regulatory_class");
5094  q->SetVal(regulatory_class);
5095  feat->SetQual().push_back(q);
5096  }
5097 
5098 
5101 
5102 
5103  CIRef<IEditObject> editor(new CEditObjectSeq_feat(*feat, seh, m_TopSeqEntry.GetScope(), true));
5104  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
5105  edit_dlg->SetUndoManager(m_CmdProccessor);
5106  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
5107  edit_dlg->SetEditorWindow(editorWindow);
5108  edit_dlg->SetEditor(editor);
5109  edit_dlg->Show(true);
5110 }
5111 
5112 
5114 {
5116  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5117 
5118  CRef<CSeqdesc> seqdesc(new CSeqdesc());
5119  switch (evt.GetId()) {
5121  seqdesc->SetUser().SetType().SetStr("TpaAssembly");
5122  break;
5125  break;
5127  seqdesc->SetUser().SetType().SetStr("RefGeneTracking");
5128  break;
5129  case eCmdCreateDescDBLink:
5131  break;
5134  break;
5137  break;
5139  seqdesc->SetUser().SetType().SetStr("AuthorizedAccess");
5140  break;
5142  seqdesc->SetUser().Assign(*edit::CGenomeAssemblyComment::MakeEmptyUserObject());
5143  break;
5145  seqdesc->SetGenbank();
5146  break;
5147  case eCmdCreateDescComment:
5149  seqdesc->SetComment();
5150  break;
5151  case eCmdCreateDescTitle:
5152  seqdesc->SetTitle();
5153  break;
5154  case eCmdCreateDescMolinfo:
5155  seqdesc->SetMolinfo();
5156  break;
5157  case eCmdCreateDescSource:
5158  {{
5159  CRef<CBioSource> bioSource(new CBioSource());
5160  seqdesc->SetSource(*bioSource);
5161  }}
5162  break;
5163  case eCmdCreateDescPub:
5164  case eCmdCreateDescPub_ext:
5165  {{
5166  CRef<CPubdesc> pubdesc(new CPubdesc());
5167  seqdesc->SetPub(*pubdesc);
5168  }}
5169  break;
5170  default:
5171  break;
5172  }
5173 
5175  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
5176  if (!orig_locs.empty())
5177  {
5178  CBioseq_Handle bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*orig_locs.front());
5179  seh = bsh.GetSeq_entry_Handle();
5180  }
5181 
5182  CIRef<IEditObject> editor(new CEditObjectSeq_desc(*seqdesc, seh, m_TopSeqEntry.GetScope(), true));
5183  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
5184  edit_dlg->SetUndoManager(m_CmdProccessor);
5185  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
5186  edit_dlg->SetEditorWindow(editorWindow);
5187  edit_dlg->SetEditor(editor);
5188  edit_dlg->SetWorkDir(m_WorkDir);
5189  edit_dlg->Show(true);
5190 }
5191 
5192 
5194 {
5195  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5196  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5197 
5198  CRemoveUnverified worker;
5199  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Unverified"))
5200  event.Skip();
5201 }
5202 
5204 {
5206  if (!m_TopSeqEntry || !m_CmdProccessor) return;
5207 
5208  CRemoveUnreviewed worker;
5211 }
5212 
5213 void CSequenceEditingEventHandler::AddDefLine ( wxCommandEvent& event)
5214 {
5216  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5217 
5219  dlg->Show(true);
5220 }
5221 
5223 {
5225  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5226 
5227  bool show_label = true;
5228  switch (event.GetId()){
5229  case eCmdPrefixOrgToDefLine:{
5230  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Organism Name to Definition Line"));
5231  if (AddOrgToDefline(m_TopSeqEntry, composite))
5232  m_CmdProccessor->Execute(composite);
5233  break;
5234  }
5236  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Strain to Definition Line"));
5238  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5239  m_CmdProccessor->Execute(composite);
5240  break;
5241  }
5243  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Clone to Definition Line"));
5245  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5246  m_CmdProccessor->Execute(composite);
5247  break;
5248  }
5250  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Isolate to Definition Line"));
5252  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5253  m_CmdProccessor->Execute(composite);
5254  break;
5255  }
5257  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Haplotype to Definition Line"));
5259  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5260  m_CmdProccessor->Execute(composite);
5261  break;
5262  }
5264  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Cultivar to Definition Line"));
5266  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5267  m_CmdProccessor->Execute(composite);
5268  break;
5269  }
5271  SAutodefParams params;
5272  unsigned int found = ConfigureParamsForPrefixCombo(params, m_TopSeqEntry);
5273  CPrefixDeflinedlg dlg(NULL, m_TopSeqEntry, found);
5274  if (found > 0){
5275  dlg.SetParams(&params);
5276  dlg.PopulateModifierCombo();
5277  }
5278  if (dlg.ShowModal() == wxID_OK){
5279  CRef<CCmdComposite> composite = dlg.GetCommand();
5280  if (composite){
5281  m_CmdProccessor->Execute(composite);
5282  }
5283  dlg.Close();
5284  }
5285  break;
5286  }
5287  }
5288 }
5289 
5291 {
5293  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5294 
5295  CMakeBadSpecificHostTable collector;
5296  collector.MakeTable(m_TopSeqEntry);
5297 }
5298 
5299 
5301 {
5303  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5304 
5306  dlg->Show(true);
5307 }
5308 
5309 void CSequenceEditingEventHandler::ApplyRNA_ITS ( wxCommandEvent& event)
5310 {
5312  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5313 
5315  dlg->Show(true);
5316 }
5317 
5318 void CSequenceEditingEventHandler::EditingButtons ( wxCommandEvent& event )
5319 {
5320  wxWindow* main_window = NULL;
5321  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5322  if (wb_frame)
5323  main_window = wb_frame->GetMainWindow();
5325 }
5326 
5327 void CSequenceEditingEventHandler::TrimNsRich( wxCommandEvent& event )
5328 {
5330  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5331 
5332  wxWindow* main_window = NULL;
5333  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5334  if (wb_frame)
5335  main_window = wb_frame->GetMainWindow();
5336 
5337  CTrimN worker;
5338  worker.apply(m_TopSeqEntry,m_CmdProccessor,"Trim Ns Rich", main_window, m_WorkDir);
5339 }
5340 
5342 {
5344  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5345 
5346  wxWindow* main_window = NULL;
5347  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5348  if (wb_frame)
5349  main_window = wb_frame->GetMainWindow();
5350 
5352  trim_rules.push_back(CSequenceAmbigTrimmer::STrimRule{ 1, 0 });
5353 
5354  CTrimN worker;
5355  worker.apply(m_TopSeqEntry,m_CmdProccessor,"Trim Ns Terminal", main_window, m_WorkDir, trim_rules);
5356 }
5357 
5358 void CSequenceEditingEventHandler::LabelRna( wxCommandEvent& event )
5359 {
5361  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5362 
5363  wxWindow* main_window = NULL;
5364  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5365  if (wb_frame)
5366  main_window = wb_frame->GetMainWindow();
5367 
5368  CLabelRna worker;
5369  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Label RNA", main_window))
5370  event.Skip();
5371 }
5372 
5373 void CSequenceEditingEventHandler::RemProtTitles( wxCommandEvent& event )
5374 {
5376  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5377 
5378  CRemProtTitles worker;
5379  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Protein Titles"))
5380  event.Skip();
5381 }
5382 
5384 {
5386  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5387 
5388  CRemAllProtTitles worker;
5389  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor))
5390  event.Skip();
5391 }
5392 
5393 void CSequenceEditingEventHandler::SegregateSets( wxCommandEvent& event )
5394 {
5395  wxWindow* main_window = NULL;
5396  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5397  if (wb_frame)
5398  main_window = wb_frame->GetMainWindow();
5399  CSegregateSets* dlg = new CSegregateSets(main_window, m_TopSeqEntry, m_CmdProccessor);
5400  dlg->Show(true);
5401 }
5402 
5403 void CSequenceEditingEventHandler::SequesterSets( wxCommandEvent& event )
5404 {
5405  wxWindow* main_window = NULL;
5406  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5407  if (wb_frame)
5408  main_window = wb_frame->GetMainWindow();
5410  dlg->Show(true);
5411 }
5412 
5414 {
5416  if (dlg.ShowModal() == wxID_OK)
5417  {
5419  if (cmd)
5420  {
5421  vector<string> names = dlg.GetNames();
5423  if (!names.empty())
5424  {
5425  CRef<CCmdComposite> rm_from_align_cmd( new CCmdComposite("Remove from alignments") );
5427  m_CmdProccessor->Execute(rm_from_align_cmd);
5428  }
5429  event.SetId(eCmdValidate);
5430  Validate(event);
5431  }
5432  }
5433 }
5434 
5435 void CSequenceEditingEventHandler::AddSet( wxCommandEvent& event )
5436 {
5438  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5439  CChooseSetClassDlg dlg(NULL);
5440  if (dlg.ShowModal() == wxID_OK)
5441  {
5442  CBioseq_set::EClass new_class = dlg.GetClass();
5444  if (cmd) m_CmdProccessor->Execute(cmd);
5445  }
5446 }
5447 
5448 
5450 {
5452  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5453 
5454  if (!m_TopSeqEntry.IsSet()) {
5455  return;
5456  }
5457 
5459  if (dlg.ShowModal() == wxID_OK)
5460  {
5461  bool error = false;
5464  error);
5465  if (error) {
5466  wxMessageBox(wxT("Set structure no longer matches"), wxT("Error"),
5467  wxOK | wxICON_ERROR, NULL);
5468  } else if (cmd) {
5470  } else {
5471  wxMessageBox(wxT("No changes requested"), wxT("Error"),
5472  wxOK | wxICON_ERROR, NULL);
5473  }
5474  }
5475 }
5476 
5478 {
5480  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5482  if (cmd) m_CmdProccessor->Execute(cmd);
5483 }
5484 
5485 void CSequenceEditingEventHandler::MacroEditor( wxCommandEvent& event )
5486 {
5487  wxWindow* main_window = NULL;
5488  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5489  if (wb_frame)
5490  main_window = wb_frame->GetMainWindow();
5491 
5492  CRef<IGuiCoreHelper> gui_core_helper(new CGuiCoreHelper(m_Workbench));
5493  CMacroFlowEditor::GetInstance(main_window, gui_core_helper);
5494 }
5495 
5497 {
5498  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5499  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5500 
5502  if (dlg.ShowModal() == wxID_OK)
5503  {
5505  if (cmd) m_CmdProccessor->Execute(cmd);
5506  }
5507 }
5508 
5510 {
5511  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5512  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5513 
5515  dlg.apply(m_TopSeqEntry,m_CmdProccessor,"BioseqFeatsRevComp", true, true, true);
5516 }
5517 
5519 {
5520  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5521  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5522 
5524  dlg.apply(m_TopSeqEntry,m_CmdProccessor,"BioseqOnlyRevComp", true, false, true);
5525 }
5526 
5527 void CSequenceEditingEventHandler::UnculTaxTool( wxCommandEvent& event )
5528 {
5529  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5530  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5531 
5532  wxWindow* main_window = NULL;
5533  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5534  if (wb_frame)
5535  main_window = wb_frame->GetMainWindow();
5536  try
5537  {
5538  CUnculTaxTool *dlg = new CUnculTaxTool(main_window, m_TopSeqEntry, m_Workbench);
5539  dlg->Show(true);
5540  } catch (CException&) {}
5541 }
5542 
5544 {
5546  dlg->Show(true);
5547 }
5548 
5550 {
5552  dlg->ApplyToAllAndDie();
5553 }
5554 
5556 {
5558  dlg->Show(true);
5559 }
5560 
5562 {
5563  wxWindow* main_window = NULL;
5564  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5565  if (wb_frame)
5566  main_window = wb_frame->GetMainWindow();
5568  dlg->Show(true);
5569 }
5570 
5571 
5573 {
5575  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5576 
5577  CAddFluComments worker;
5579 }
5580 
5581 
5583 {
5584  CLowerQuals* dlg = new CLowerQuals(NULL, m_Workbench);
5585  dlg->Show(true);
5586 }
5587 
5589 {
5591  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5592 
5593  CRef<CCmdComposite> adjust_cds(new CCmdComposite("Adjust for consensus splice sites"));
5594  for (CBioseq_CI b_iter(m_TopSeqEntry, CSeq_inst::eMol_na); b_iter; ++b_iter) {
5595 
5596  bool good_seq = false;
5597  switch (event.GetId()) {
5601  break;
5605  break;
5608  break;
5609  }
5610  if (good_seq) {
5611  if (event.GetId() == eCmdAdjustConsensusSpliceSitesConsensusEnds) {
5612  for (CFeat_CI feat(*b_iter, SAnnotSelector(CSeqFeatData::e_Cdregion)); feat; ++feat) {
5614  CRef<CCmdComposite> cmd = worker.GetCommandToAdjustCDSEnds(feat->GetMappedFeature());
5615  if (cmd) {
5616  adjust_cds->AddCommand(*cmd);
5617  }
5618  }
5619  }
5620  else {
5621  for (CFeat_CI feat(*b_iter, SAnnotSelector(CSeqFeatData::e_Cdregion)); feat; ++feat) {
5623  CRef<CCmdComposite> cmd = worker.GetCommand(feat->GetMappedFeature());
5624  if (cmd) {
5625  adjust_cds->AddCommand(*cmd);
5626  }
5627  }
5628  }
5629  }
5630  }
5631 
5632  m_CmdProccessor->Execute(adjust_cds);
5633 }
5634 
5635 
5637 {
5639  bool similar = true;
5640  bool nonfunctional = false;
5641  bool unverified = false;
5642  dlg->ApplyToAllAndDie(similar,nonfunctional,unverified);
5643 }
5644 
5646 {
5648  bool similar = false;
5649  bool nonfunctional = true;
5650  bool unverified = false;
5651  dlg->ApplyToAllAndDie(similar,nonfunctional,unverified);
5652 }
5653 
5655 {
5657  bool similar = true;
5658  bool nonfunctional = false;
5659  bool unverified = true;
5660  dlg->ApplyToAllAndDie(similar,nonfunctional,unverified);
5661 }
5662 
5663 
5665 {
5667  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5668 
5669  CRef<CCmdComposite> cmd(new CCmdComposite("Combine Selected Genes into Pseudogene"));
5670 
5672  if (objects.empty()) return;
5673 
5674  vector<const CSeq_feat*> genes;
5676  const CObject* ptr = it->object.GetPointer();
5677  const CSeq_feat* seqfeat = dynamic_cast<const CSeq_feat*>(ptr);
5678  if (seqfeat && seqfeat->IsSetData() && seqfeat->GetData().IsGene())
5679  {
5680  genes.push_back(seqfeat);
5681  }
5682  }
5683  if (genes.size() != 2)
5684  {
5685  wxMessageBox(_("Please select two gene features to combine. Use Ctrl+Left mouse click"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5686  return;
5687  }
5688  CScope &scope = m_TopSeqEntry.GetScope();
5689  CRef<CSeq_feat> new_feat(new CSeq_feat());
5690  new_feat->Assign(*genes[0]);
5691  new_feat->SetPseudo(true);
5692  new_feat->SetLocation().Add(genes[1]->GetLocation());
5694  new_loc->SetPartialStart(false, eExtreme_Biological);
5695  new_loc->SetPartialStop(false, eExtreme_Biological);
5696  new_feat->SetLocation(*new_loc);
5697  new_feat->SetPartial(false);
5698  vector<string> locus;
5699  if (genes[1]->GetData().GetGene().IsSetLocus())
5700  locus.push_back(genes[1]->GetData().GetGene().GetLocus());
5701  if (genes[0]->GetData().GetGene().IsSetLocus())
5702  locus.push_back(genes[0]->GetData().GetGene().GetLocus());
5703  new_feat->SetComment(NStr::Join(locus,";"));
5705  GetProductToCDSMap(scope, product_to_cds);
5706  CBioseq_Handle bsh = scope.GetBioseqHandle(new_feat->GetLocation());
5708  cmd->AddCommand(*CRef<CCmdCreateFeat>(new CCmdCreateFeat(seh, *new_feat)));
5709  cmd->AddCommand(*GetDeleteFeatureCommand(scope.GetSeq_featHandle(*genes[0]), true, product_to_cds));
5710  cmd->AddCommand(*GetDeleteFeatureCommand(scope.GetSeq_featHandle(*genes[1]), true, product_to_cds));
5711  CConstRef<CSeq_feat> cds1 = sequence::GetOverlappingCDS(genes[0]->GetLocation(), scope);
5712  CConstRef<CSeq_feat> cds2 = sequence::GetOverlappingCDS(genes[1]->GetLocation(), scope);
5713  cmd->AddCommand(*GetDeleteFeatureCommand(scope.GetSeq_featHandle(*cds1), true, product_to_cds));
5714  cmd->AddCommand(*GetDeleteFeatureCommand(scope.GetSeq_featHandle(*cds2), true, product_to_cds));
5716 }
5717 
5719 {
5721  dlg->Show(true);
5722 }
5723 
5724 
5725 void CSequenceEditingEventHandler::LatLonTool( wxCommandEvent& event )
5726 {
5727  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5728  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5729 
5730  try
5731  {
5733 
5734  bool done = false;
5735  while (!done) {
5736  if (dlg.ShowModal() == wxID_OK) {
5738  if (cmd) {
5740  done = true;
5741  } else {
5742  wxString error = ToWxString(dlg.GetErrorMessage());
5743  wxMessageBox(error, wxT("Error"),
5744  wxOK | wxICON_ERROR, NULL);
5745  }
5746  } else {
5747  done = true;
5748  }
5749  }
5750  } catch (CException&) {}
5751 }
5752 
5754 {
5755  CRef<CCmdComposite> cmd(new CCmdComposite("CDSGeneRangeError Suppress"));
5756  for (CFeat_CI feat_ci(m_TopSeqEntry); feat_ci; ++feat_ci)
5757  {
5758  const CSeq_feat& orig = feat_ci->GetOriginalFeature();
5761  bool gene_xref = false;
5763  {
5764  if ((*xref)->IsSetData() && (*xref)->GetData().IsGene())
5765  gene_xref = true;
5766  }
5767  if (!contained && overlapping && !gene_xref)
5768  {
5769  CRef<CSeq_feat> new_feat(new CSeq_feat());
5770  new_feat->Assign(orig);
5772  xref->SetData().SetGene();
5773  new_feat->SetXref().push_back(xref);
5774  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(feat_ci->GetSeq_feat_Handle(), *new_feat)));
5775  }
5776  }
5778 }
5779 
5781 {
5782  CRef<CCmdComposite> cmd(new CCmdComposite("CDSGeneRangeError Restore"));
5783  for (CFeat_CI feat_ci(m_TopSeqEntry); feat_ci; ++feat_ci)
5784  {
5785  const CSeq_feat& orig = feat_ci->GetOriginalFeature();
5788  bool gene_xref = false;
5790  {
5791  if ((*xref)->IsSetData() && (*xref)->GetData().IsGene())
5792  gene_xref = true;
5793  }
5794  if (!contained && overlapping && gene_xref)
5795  {
5796  CRef<CSeq_feat> new_feat(new CSeq_feat());
5797  new_feat->Assign(orig);
5798  CSeq_feat::TXref::iterator seq_feat_xref;
5799  EDIT_EACH_SEQFEATXREF_ON_SEQFEAT(xref,*new_feat)
5800  {
5801  if ((*xref)->IsSetData() && (*xref)->GetData().IsGene())
5802  seq_feat_xref = xref;
5803  }
5804  new_feat->SetXref().erase(seq_feat_xref);
5805  if (new_feat->GetXref().empty())
5806  new_feat->ResetXref();
5807  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(feat_ci->GetSeq_feat_Handle(), *new_feat)));
5808  }
5809  }
5811 }
5812 
5814 {
5815  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5816  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5817 
5819  if (dlg.ShowModal() == wxID_OK)
5820  {
5821  dlg.SaveTable(m_WorkDir);
5822  }
5823 }
5824 
5825 void CSequenceEditingEventHandler::RemoveSegGaps( wxCommandEvent& event )
5826 {
5828  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5829 
5830  CRef<CCmdComposite> cmd(new CCmdComposite("Remove Seg Gaps"));
5831  // So far, handle DENSEG type only
5833  CAlign_CI align_ci(m_TopSeqEntry, align_sel);
5834  for ( ; align_ci; ++align_ci) {
5835  CRef<CSeq_align> new_align(new CSeq_align());
5836  new_align->Assign(align_ci.GetOriginalSeq_align());
5837 
5838  bool modified = macro::CMacroFunction_RemoveSegGaps::s_RemoveSegGaps(*new_align);
5839  if (modified) {
5840  CIRef<IEditCommand> chgAlign( new CCmdChangeAlign( align_ci.GetSeq_align_Handle(), *new_align ));
5841  cmd->AddCommand(*chgAlign);
5842  }
5843  }
5845 }
5846 
5847 void CSequenceEditingEventHandler::EditSequence( wxCommandEvent& event )
5848 {
5849  wxWindow* main_window = NULL;
5850  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5851  if (wb_frame)
5852  main_window = wb_frame->GetMainWindow();
5853 
5856  if (sel_srv)
5857  {
5858  sel_srv->GetActiveObjects(objects);
5859  }
5860  if (objects.empty())
5861  {
5863  }
5864 
5865  if(objects.empty())
5866  {
5867  wxMessageBox(wxT("No objects found"), wxT("Error"), wxOK | wxICON_ERROR);
5868  return;
5869  }
5870 
5872  if (!scope)
5873  {
5874  wxMessageBox(wxT("Cannot determine scope"), wxT("Error"), wxOK | wxICON_ERROR);
5875  return;
5876  }
5877  const CSeq_loc* loc = NULL;
5878  size_t count = 0;
5879  for (auto &o : objects)
5880  {
5881  const CSeq_loc* obj_loc = dynamic_cast<const CSeq_loc*>(o.object.GetPointer());
5882  if (!obj_loc)
5883  continue;
5884  if (!loc)
5885  loc = obj_loc;
5886  count++;
5887  }
5888 
5889  if (!loc)
5890  {
5891  wxMessageBox(wxT("The selection is not a bioseq"), wxT("Error"), wxOK | wxICON_ERROR);
5892  return;
5893  }
5894  if (count > 1)
5895  {
5896  wxMessageBox(wxT("Multiple bioseqs in scope, opening the first one only"), wxT("Warning"), wxOK | wxICON_ERROR);
5897  }
5898  int from = 0;
5899  CRef<CSeq_loc> whole_loc;
5900  if (!loc->IsWhole())
5901  {
5902  from = loc->GetStart(eExtreme_Positional) + 1;
5903  CBioseq_Handle bsh = scope->GetBioseqHandle(*loc);
5904  whole_loc = bsh.GetRangeSeq_loc(0,0);
5905  }
5906  if (whole_loc)
5907  loc = whole_loc.GetPointer();
5908  CEditSequence *dlg = NULL;
5909  try
5910  {
5911  dlg = new CEditSequence( main_window, loc, *scope, m_CmdProccessor, from);
5912  dlg->Show(true);
5913  } catch (CException&)
5914  {
5915  if (dlg)
5916  dlg->Destroy();
5917  wxMessageBox(wxT("No bioseq selected"), wxT("Error"), wxOK | wxICON_ERROR);
5918  }
5919 
5920 }
5921 
5923 {
5925  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5926 
5927  CRawSeqToDeltaByN dlg(NULL);
5928  if (dlg.ShowModal() == wxID_OK)
5929  {
5930  dlg.apply(m_TopSeqEntry, m_CmdProccessor, "Raw Sequences to Delta by Ns");
5931  }
5932 }
5933 
5935 {
5937  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5938 
5939  wxWindow* main_window = NULL;
5940  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5941  if (wb_frame)
5942  main_window = wb_frame->GetMainWindow();
5943 
5944  CRawSeqToDeltaSeqByLoc dlg(main_window, m_TopSeqEntry);
5945  if (dlg.ShowModal() == wxID_OK)
5946  {
5947  CRef<CCmdComposite> cmd = dlg.apply("Raw Sequences to Delta by Loc");
5948  if (cmd)
5950  }
5951 }
5952 
5954 {
5956  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5957 
5959  if (cmd) m_CmdProccessor->Execute(cmd);
5960 }
5961 
5963 {
5965  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5966 
5967  CUpdateReplacedECNumbers worker;
5968  worker.apply(m_TopSeqEntry, m_CmdProccessor, "Update Replaced EC numbers");
5969 }
5970 
5972 {
5974  if (!m_TopSeqEntry || !m_CmdProccessor) return;
5975 
5976  CSeqUpdateWorker worker;
5977  switch (event.GetId()) {
5978  case eCmdUpdateSequence:
5981  break;
5984  break;
5987  break;
5988  }
5989  if (RunningInsideNCBI()) {
5991  } else {
5993  }
5994 }
5995 
5997 {
5999  if (!m_TopSeqEntry || !m_CmdProccessor) return;
6000 
6001  CSeqUpdateWorker worker;
6002  switch (event.GetId()) {
6005  break;
6008  break;
6009  }
6011 }
6012 
6014 {
6015  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6016  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6017 
6019  dlg->Show(true);
6020 }
6021 
6023 {
6025  if (!m_TopSeqEntry || !m_CmdProccessor) return;
6026 
6027  //CImportFeatTable::ShowTableInfo(); // show informative message
6029  CIRef<IEditCommand> cmd = worker.ImportFeaturesFromFile(m_WorkDir, "file_loader_5col");
6030  if (!cmd)
6031  return;
6032 
6034 }
6035 
6036 void CSequenceEditingEventHandler::ImportGFF3(wxCommandEvent& event)
6037 {
6039  if (!m_TopSeqEntry || !m_CmdProccessor) return;
6040 
6041  //CImportFeatTable::ShowTableInfo(); // show informative message
6043  CIRef<IEditCommand> cmd = worker.ImportFeaturesFromFile(m_WorkDir, "file_loader_gff");
6044  if (!cmd)
6045  return;
6046 
6048 }
6049 
6051 {
6053  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6054 
6055  //CImportFeatTable::ShowTableInfo(); // show informative message
6058  if (!cmd)
6059  return;
6060 
6062 }
6063 
6065 {
6067  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6068 
6070 }
6071 
6073 {
6075  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6076 
6078 }
6079 
6081 {
6083  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6084 
6086 }
6087 
6089 {
6091 }
6092 
6094 {
6096 }
6097 
6098 void CSequenceEditingEventHandler::FindASN1( wxCommandEvent& evt )
6099 {
6101  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6102 
6103  wxWindow* main_window = NULL;
6104  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6105  if (wb_frame)
6106  main_window = wb_frame->GetMainWindow();
6108  dlg->Show(true);
6109 }
6110 
6112 {
6113  wxWindow* main_window = NULL;
6114  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6115  if (wb_frame)
6116  main_window = wb_frame->GetMainWindow();
6117  CFuseFeaturesDlg * dlg = new CFuseFeaturesDlg(main_window, m_Workbench);
6118  dlg->Show(true);
6119 }
6120 
6122 {
6124 }
6125 
6127 {
6128  wxWindow* main_window = NULL;
6129  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6130  if (wb_frame)
6131  main_window = wb_frame->GetMainWindow();
6132  CRmDupFeaturesDlg * dlg = new CRmDupFeaturesDlg(main_window, m_Workbench);
6133  dlg->Show(true);
6134 }
6135 
6137 {
6140  CAECRFrame * dlg = new CAECRFrame(NULL, m_Workbench);
6141  dlg->SetInitParameters(aecr_action_type, aecr_field_type);
6142  CallAfter(&CSequenceEditingEventHandler::ShowAfter, dlg);
6143 }
6144 
6146 {
6148  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6149 
6150 
6151  string strcomment_dbname;
6152  switch (evt.GetId()){
6154  strcomment_dbname.assign("HIVDatabase");
6155  break;
6157  strcomment_dbname.assign("FluData");
6158  break;
6160  strcomment_dbname.assign("MIGS-Data");
6161  break;
6163  strcomment_dbname.assign("MIMS-Data");
6164  break;
6166  strcomment_dbname.assign("MIENS-Data");
6167  break;
6169  strcomment_dbname.assign("MIMARKS:3.0-Data");
6170  break;
6172  strcomment_dbname.assign("MIGS:3.0-Data");
6173  break;
6175  strcomment_dbname.assign("MIMS:3.0-Data");
6176  break;
6178  strcomment_dbname.assign("Assembly-Data");
6179  break;
6181  strcomment_dbname.assign("Genome-Assembly-Data");
6182  break;
6184  strcomment_dbname.assign("International Barcode of Life (iBOL)Data");
6185  break;
6186 
6187  }
6188 
6190  vector<CConstRef<CObject> > objs = col->GetObjects(m_TopSeqEntry, kEmptyStr, CRef<edit::CStringConstraint>(NULL));
6191  if (objs.size() == 0) {
6192  wxMessageBox(wxT("No structured comments found!"), wxT("Error"),
6193  wxOK | wxICON_ERROR, NULL);
6194  return;
6195  }
6196 
6197  bool any_change = false;
6198  CRef<CCmdComposite> cmd(new CCmdComposite("Edit Structured Comment DB name"));
6199  ITERATE(vector<CConstRef<CObject> >, it, objs) {
6200  CRef<CObject> new_obj = col->GetNewObject(*it);
6201  col->SetVal(*new_obj, strcomment_dbname, edit::eExistingText_replace_old);
6202  CRef<CCmdComposite> ecmd = col->GetReplacementCommand(*it, new_obj,
6203  m_TopSeqEntry.GetScope(), "Edit Structured Comment Dbname Values");
6204  if (ecmd) {
6205  cmd->AddCommand(*ecmd);
6206  any_change = true;
6207  }
6208  }
6209 
6210  if (any_change) {
6212  } else {
6213  wxMessageBox(wxT("No effect!"), wxT("Error"),
6214  wxOK | wxICON_ERROR, NULL);
6215  }
6216 }
6217 
6219 {
6221  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6222 
6224 }
6225 
6226 
6228 {
6230  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6231 
6233 }
6234 
6236 {
6238  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6239 
6241 }
6242 
6244 {
6246  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6247 
6249 }
6250 
6251 
6253 {
6255  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6256 
6258 }
6259 
6261 {
6263  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6264 
6266 }
6267 
6269 {
6271  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6272 
6274 }
6275 
6277 {
6279  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6280 
6282 }
6283 
6285 {
6286  wxWindow* main_window = NULL;
6287  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6288  if (wb_frame)
6289  main_window = wb_frame->GetMainWindow();
6290  CCdsFromGeneMrnaExon * dlg = new CCdsFromGeneMrnaExon(main_window, m_Workbench);
6291  dlg->Show(true);
6292 }
6293 
6295 {
6296  wxWindow* main_window = NULL;
6297  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6298  if (wb_frame)
6299  main_window = wb_frame->GetMainWindow();
6300  CmRNAFromGeneCdsExon * dlg = new CmRNAFromGeneCdsExon(main_window, m_Workbench);
6301  dlg->Show(true);
6302 }
6303 
6305 {
6306  wxWindow* main_window = NULL;
6307  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6308  if (wb_frame)
6309  main_window = wb_frame->GetMainWindow();
6310  CtRNAFromGene * dlg = new CtRNAFromGene(main_window, m_Workbench);
6311  dlg->Show(true);
6312 }
6313 
6315 {
6316  wxWindow* main_window = NULL;
6317  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6318  if (wb_frame)
6319  main_window = wb_frame->GetMainWindow();
6320  CCdsToMatPeptide * dlg = new CCdsToMatPeptide(main_window, m_Workbench);
6321  dlg->Show(true);
6322 }
6323 
6324 void CSequenceEditingEventHandler::SelectFeature( wxCommandEvent& event )
6325 {
6326  wxWindow* main_window = NULL;
6327  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6328  if (wb_frame)
6329  main_window = wb_frame->GetMainWindow();
6330  CSelectFeatures * dlg = new CSelectFeatures(main_window, m_Workbench);
6331  dlg->Show();
6332 }
6333 
6334 
6335 void CSequenceEditingEventHandler::RemoveSet( wxCommandEvent& event )
6336 {
6338 }
6339 
6341 {
6343 }
6344 
6345 void CSequenceEditingEventHandler::EditSeqId( wxCommandEvent& event )
6346 {
6347  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6348  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6349  wxWindow* main_window = NULL;
6350  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6351  if (wb_frame)
6352  main_window = wb_frame->GetMainWindow();
6353 
6354  CEditSeqId dlg(main_window, m_TopSeqEntry);
6355  if (dlg.ShowModal() == wxID_OK)
6356  {
6358  if (cmd)
6360  CRef<CCmdComposite> del_original_ids = dlg.GetRemoveOriginalIdCommand();
6361  if (del_original_ids)
6362  m_CmdProccessor->Execute(del_original_ids);
6363  dlg.Close();
6364  }
6365 }
6366 
6367 
6368 void CSequenceEditingEventHandler::EditHistory( wxCommandEvent& event )
6369 {
6370  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6371  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6372 
6373  CBioseq_Handle bsh;
6374  vector<CRef<CSeq_loc> > &locs = x_GetSelectedLocations();
6375  if (!locs.empty()) {
6376  try
6377  {
6378  bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*locs.front());
6379  } catch (CException&) {}
6380  }
6381 
6382  if (!bsh)
6383  return;
6384 
6385  wxWindow* main_window = NULL;
6386  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6387  if (wb_frame)
6388  main_window = wb_frame->GetMainWindow();
6389 
6390  try
6391  {
6392  CEditHistory dlg(main_window, bsh);
6393 
6394  if (dlg.ShowModal() == wxID_OK)
6395  {
6397  if (cmd)
6398  {
6400  }
6401  }
6402  } catch (CException&) {}
6403 }
6404 
6406 {
6407  wxWindow* main_window = NULL;
6408  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6409  if (wb_frame)
6410  main_window = wb_frame->GetMainWindow();
6411  CExonFromCds * dlg = new CExonFromCds(main_window, m_Workbench, CSeqFeatData::eSubtype_cdregion, "Exon from CDS");
6412  dlg->Show(true);
6413 }
6414 
6416 {
6417  wxWindow* main_window = NULL;
6418  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6419  if (wb_frame)
6420  main_window = wb_frame->GetMainWindow();
6421  CExonFromCds * dlg = new CExonFromCds(main_window, m_Workbench, CSeqFeatData::eSubtype_mRNA, "Exon from mRNA");
6422  dlg->Show(true);
6423 }
6424 
6426 {
6427  wxWindow* main_window = NULL;
6428  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6429  if (wb_frame)
6430  main_window = wb_frame->GetMainWindow();
6431  CExonFromCds * dlg = new CExonFromCds(main_window, m_Workbench, CSeqFeatData::eSubtype_tRNA, "Exon from tRNA");
6432  dlg->Show(true);
6433 }
6434 
6435 
6437 {
6438  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6439  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6440  wxWindow* main_window = NULL;
6441  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6442  if (wb_frame)
6443  main_window = wb_frame->GetMainWindow();
6444 
6445  CSetGlobalRefGeneStatus dlg(main_window, m_TopSeqEntry);
6446  if (dlg.ShowModal() == wxID_OK)
6447  {
6449  if (cmd)
6450  {
6452  }
6453  }
6454 }
6455 
6456 void CSequenceEditingEventHandler::ClearKeywords( wxCommandEvent& event )
6457 {
6458  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6459  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6460  wxWindow* main_window = NULL;
6461  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6462  if (wb_frame)
6463  main_window = wb_frame->GetMainWindow();
6464 
6465  CClearKeywords dlg(main_window, m_TopSeqEntry);
6466  if (dlg.ShowModal() == wxID_OK)
6467  {
6469  if (cmd)
6470  {
6472  }
6473  }
6474 }
6475 
6477 {
6479  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6480 
6482 }
6483 
6485 {
6487  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6488 
6490 }
6491 
6493 {
6495  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6496 
6498  if (cmd)
6499  {
6501  }
6502 }
6503 
6504 void CSequenceEditingEventHandler::LinkmRNACDS( wxCommandEvent& event )
6505 {
6507  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6508 
6509  CmRNACDSLinker worker(m_TopSeqEntry);
6510  switch (event.GetId()){
6513  break;
6516  break;
6519  break;
6520  case eCmdLinkmRNACDSLabel:
6521  worker.LinkByLabel(m_CmdProccessor);
6522  break;
6525  break;
6527  m_CmdProccessor->Execute(CCmdFeatIdXrefsFromQualifiers::Create(m_TopSeqEntry, { "protein_id", "orig_protein_id" }));
6528  break;
6530  m_CmdProccessor->Execute(CCmdFeatIdXrefsFromQualifiers::Create(m_TopSeqEntry, { "transcript_id", "orig_transcript_id" }));
6531  break;
6534  break;
6535  case eCmdShowLinkedmRNACDS:
6536  {
6537  vector<CConstRef<CObject> > objs = worker.GetReferencedmRNA_CDS(m_SelObjects);
6538  if (!objs.empty()) {
6541  evt.AddObjectSelection(objs);
6542  service->Broadcast(evt, NULL);
6543  }
6544  break;
6545  }
6546  default:
6547  ;
6548  }
6549 }
6550 
6552 {
6553  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6554  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6555 
6557  if (cmd) {
6559  }
6560 }
6561 
6563 {
6564  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6565  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6566 
6568  if (cmd) {
6570  }
6571 }
6572 
6574 {
6575  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6576  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6577 
6579  if (cmd) {
6581  }
6582 }
6583 
6584 void CSequenceEditingEventHandler::DeltaSeqToRaw( wxCommandEvent& event )
6585 {
6586  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6587  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6589 }
6590 
6591 
6593 {
6594  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6595  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6596 
6598  if (cmd) {
6600  }
6601 }
6602 
6604 {
6605  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6606  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6607 
6609  if (cmd) {
6611  }
6612 }
6613 
6615 {
6616  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6617  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6618 
6620  if (cmd) {
6622  }
6623 }
6624 
6626 {
6627  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6628  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6629 
6631  if (cmd) {
6633  }
6634 }
6635 
6637 {
6638  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6639  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6640 
6642  if (cmd) {
6644  }
6645 }
6646 
6648 {
6649  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6650  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6651 
6653  if (cmd) {
6655  }
6656 }
6657 
6659 {
6660  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6661  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6662 
6664  if (cmd) {
6666  }
6667 }
6668 
6670 {
6671  if (!m_Workbench) return;
6672  wxWindow* main_window = NULL;
6673  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6674  if (wb_frame)
6675  main_window = wb_frame->GetMainWindow();
6676  CRemoveGeneXrefs *dlg = new CRemoveGeneXrefs(main_window, m_Workbench);
6677  dlg->Show(true);
6678 }
6679 
6680 void CSequenceEditingEventHandler::ExtendCDS( wxCommandEvent& event )
6681 {
6682  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6683  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6684 
6686  if (cmd) {
6688  }
6689 }
6690 
6691 void CSequenceEditingEventHandler::TruncateCDS( wxCommandEvent& event )
6692 {
6693  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6694  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6695 
6696  wxWindow* main_window = NULL;
6697  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6698  if (wb_frame)
6699  main_window = wb_frame->GetMainWindow();
6700 
6701  CTruncateCDS dlg(main_window, m_TopSeqEntry);
6702  if (dlg.ShowModal() == wxID_OK)
6703  {
6705  if (cmd)
6706  {
6708  }
6709  }
6710 }
6711 
6713 {
6714  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6715  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6716 
6718  if (cmd)
6719  {
6721  }
6722 }
6723 
6725 {
6726  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6727  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6728 
6729  wxWindow* main_window = NULL;
6730  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6731  if (wb_frame)
6732  main_window = wb_frame->GetMainWindow();
6733 
6734  CFixProductNames dlg(main_window, m_TopSeqEntry);
6735  if (dlg.ShowModal() == wxID_OK)
6736  {
6738  if (cmd)
6739  {
6741  }
6742  }
6743 }
6744 
6746 {
6747  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6748  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6749 
6750  wxWindow* main_window = NULL;
6751  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6752  if (wb_frame)
6753  main_window = wb_frame->GetMainWindow();
6754 
6755  CApplyGCode dlg(main_window, m_TopSeqEntry);
6756  if (dlg.ShowModal() == wxID_OK)
6757  {
6759  if (cmd)
6760  {
6763  if (cleanup)
6765  string error;
6767  if (retranslate)
6768  m_CmdProccessor->Execute(retranslate);
6769  }
6770  }
6771 }
6772 
6774 {
6775  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6776  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6777 
6778  wxWindow* main_window = NULL;
6779  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6780  if (wb_frame)
6781  main_window = wb_frame->GetMainWindow();
6782 
6783  CEditSeqEndsWithAlign dlg(main_window, m_TopSeqEntry);
6784  if (dlg.ShowModal() == wxID_OK)
6785  {
6787  if (cmd)
6788  {
6790  }
6791  }
6792 }
6793 
6794 void CSequenceEditingEventHandler::UpdateAlign( wxCommandEvent& event )
6795 {
6796  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6797  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6798 
6799  wxWindow* main_window = NULL;
6800  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6801  if (wb_frame)
6802  main_window = wb_frame->GetMainWindow();
6803 
6804  CUpdateAlign worker;
6805  worker.apply(m_TopSeqEntry, m_CmdProccessor, main_window);
6806 }
6807 
6809 {
6810  wxWindow* main_window = NULL;
6811  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6812  if (wb_frame)
6813  main_window = wb_frame->GetMainWindow();
6815  dlg->Show(true);
6816 }
6817 
6819 {
6820  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6821  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6822 
6823  wxWindow* main_window = NULL;
6824  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6825  if (wb_frame)
6826  main_window = wb_frame->GetMainWindow();
6827 
6829 }
6830 
6832 {
6833  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6834  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6835 
6836  wxWindow* main_window = NULL;
6837  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6838  if (wb_frame)
6839  main_window = wb_frame->GetMainWindow();
6840 
6842 }
6843 
6845 {
6846  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6847  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6848 
6850  if (cmd)
6851  {
6853  }
6854 }
6855 
6857 {
6858  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6859  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6860 
6861  CGenusSpeciesFixup worker;
6863  if (cmd)
6864  {
6866  }
6867 }
6868 
6870 {
6871  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6872  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6873 
6874  wxWindow* main_window = NULL;
6875  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6876  if (wb_frame)
6877  main_window = wb_frame->GetMainWindow();
6878 
6879  try
6880  {
6881  CCountryConflict dlg(main_window, m_TopSeqEntry);
6882 
6883  if (dlg.ShowModal() == wxID_OK)
6884  {
6886  if (cmd)
6887  {
6889  } else {
6890  wxString error = ToWxString(dlg.GetErrorMessage());
6891  wxMessageBox(error, wxT("Error"),
6892  wxOK | wxICON_ERROR, NULL);
6893  }
6894  }
6895 
6896  } catch (CException&) {}
6897 }
6898 
6899 void CSequenceEditingEventHandler::AddSecondary( wxCommandEvent& event )
6900 {
6901  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6902  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6903 
6904  wxWindow* main_window = NULL;
6905  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6906  if (wb_frame)
6907  main_window = wb_frame->GetMainWindow();
6908 
6910  vector<CRef<CSeq_loc> > &locs = x_GetSelectedLocations();
6911  if (locs.size() == 1) {
6912  try
6913  {
6914  seh = m_TopSeqEntry.GetScope().GetBioseqHandle(*locs.front()).GetSeq_entry_Handle();
6915  } catch (CException&) {}
6916  }
6917 
6918  CAddSecondary dlg(main_window, seh);
6919 
6920  if (dlg.ShowModal() == wxID_OK)
6921  {
6923  if (cmd)
6924  {
6926  }
6927  }
6928 
6929 }
6930 
6932 {
6933  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6934  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6935 
6937  if (cmd)
6938  {
6940  }
6941 }
6942 
6944 {
6945  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6946  if (!m_TopSeqEntry || !m_CmdProccessor) return;
6947 
6948  wxWindow* main_window = NULL;
6949  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6950  if (wb_frame)
6951  main_window = wb_frame->GetMainWindow();
6952 
6953  CFeatureTblFr* frame = new CFeatureTblFr(main_window, m_Workbench);
6954  frame->SetWorkDir(m_WorkDir);
6955  frame->Show(true);
6956 }
6957 
6959 {
6961  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6962 
6963  CFixStructuredVouchers worker;
6965  if (cmd)
6966  {
6968  }
6969 }
6970 
6972 {
6973  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6974  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6975 
6976  wxWindow* main_window = NULL;
6977  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6978  if (wb_frame)
6979  main_window = wb_frame->GetMainWindow();
6980 
6981 
6982  CEditSequenceEnds dlg(main_window, m_TopSeqEntry);
6983 
6984  if (dlg.ShowModal() == wxID_OK)
6985  {
6987  if (cmd)
6988  {
6990  }
6991  }
6992 
6993 }
6994 
6996 {
6997  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6998  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6999 
7000  wxWindow* main_window = NULL;
7001  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7002  if (wb_frame)
7003  main_window = wb_frame->GetMainWindow();
7004 
7006  if (objects.empty())
7007  return;
7008 
7009  const CObject* ptr = objects.front().object.GetPointer();
7010  const CBioseq* bioseq = dynamic_cast<const CBioseq*>(ptr);
7011  const CBioseq_set* bioseqset = dynamic_cast<const CBioseq_set*>(ptr);
7012 
7013  CRef<CSeq_descr> so;
7014  if (bioseq && bioseq->IsSetDescr())
7015  {
7016  so.Reset(new CSeq_descr);
7017  so->Assign(bioseq->GetDescr());
7018  }
7019  if (bioseqset && bioseqset->IsSetDescr())
7020  {
7021  so.Reset(new CSeq_descr);
7022  so->Assign(bioseqset->GetDescr());
7023  }
7024 
7025  if (so)
7026  {
7027  wxFileDialog asn_save_file(main_window, wxT("Export object to file"), wxEmptyString, wxEmptyString,
7030  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
7031 
7032  if (asn_save_file.ShowModal() == wxID_OK)
7033  {
7034  wxString path = asn_save_file.GetPath();
7035  if( !path.IsEmpty())
7036  {
7037  ios::openmode mode = ios::out;
7038  CNcbiOfstream os(path.fn_str(), mode);
7039  os << MSerial_AsnText;
7040  os << *so;
7041  }
7042  }
7043  }
7044 
7045 }
7046 
7048 {
7049  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7050  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7051 
7052  wxWindow* main_window = NULL;
7053  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7054  if (wb_frame)
7055  main_window = wb_frame->GetMainWindow();
7056 
7057 
7058  CCreateSeqHistForTpa dlg(main_window, m_TopSeqEntry);
7059 
7060  if (dlg.ShowModal() == wxID_OK)
7061  {
7063  if (cmd)
7064  {
7066  }
7067  }
7068 }
7069 
7071 {
7072  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7073  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7074 
7075  wxWindow* main_window = NULL;
7076  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7077  if (wb_frame)
7078  main_window = wb_frame->GetMainWindow();
7079 
7080  string msg;
7082 
7083  if (cmd)
7084  {
7086  }
7087 
7088  if (!msg.empty())
7089  {
7090  CGenericReportDlg* report = new CGenericReportDlg(main_window);
7091  report->SetTitle(wxT("TPA Alignment Assembly Problems"));
7092  report->SetText(wxString(msg));
7093  report->Show(true);
7094  }
7095 }
7096 
7098 {
7099  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7100  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7101 
7103  if (cmd)
7104  {
7106  }
7107 }
7108 
7109 void CSequenceEditingEventHandler::FarPointerSeq( wxCommandEvent& event )
7110 {
7111  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7112  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7113 
7114  wxWindow* main_window = NULL;
7115  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7116  if (wb_frame)
7117  main_window = wb_frame->GetMainWindow();
7118 
7119  try
7120  {
7121  CFarPointerSeq dlg(main_window, m_TopSeqEntry);
7122 
7123  if (dlg.ShowModal() == wxID_OK)
7124  {
7126  if (cmd)
7127  {
7129  }
7130  }
7131  }
7132  catch (CException&)
7133  {
7134  }
7135 }
7136 
7137 
7139 {
7140  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7141  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7142 
7143  wxWindow* main_window = NULL;
7144  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7145  if (wb_frame)
7146  main_window = wb_frame->GetMainWindow();
7147 
7148 
7149  CAlignmentAssistant *dlg = NULL;
7150  try
7151  {
7152  dlg = new CAlignmentAssistant( main_window, m_TopSeqEntry, m_CmdProccessor);
7153  dlg->Show(true);
7154  } catch (CException&)
7155  {
7156  if (dlg)
7157  dlg->Destroy();
7158  wxMessageBox(wxT("No alignment found"), wxT("Error"), wxOK | wxICON_ERROR);
7159  }
7160 
7161 }
7162 
7164 {
7165  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7166  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7167 
7168  wxWindow* main_window = NULL;
7169  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7170  if (wb_frame)
7171  main_window = wb_frame->GetMainWindow();
7172 
7173 
7174  CAdjustFeaturesForGaps dlg(main_window, m_TopSeqEntry);
7175 
7176  bool done = false;
7177  while (!done) {
7178  if (dlg.ShowModal() == wxID_OK) {
7180  if (cmd)
7181  {
7183  if (dlg.LeaveUp()) {
7184  dlg.Refresh();
7185  } else {
7186  done = true;
7187  }
7188  }
7189  } else {
7190  done = true;
7191  }
7192  }
7193 }
7194 
7196 {
7197  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7198  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7199 
7200  try
7201  {
7203  if (cmd)
7204  {
7206  }
7207  }
7208  catch (CException& e)
7209  {
7210  wxMessageBox(wxString(e.GetMsg()), wxT("Error"),wxOK | wxICON_ERROR, NULL);
7211  }
7212 }
7213 
7215 {
7216  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7217  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7218 
7219  wxWindow* main_window = NULL;
7220  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7221  if (wb_frame)
7222  main_window = wb_frame->GetMainWindow();
7223 
7225  try
7226  {
7227  dlg = new CCompareWithBiosample(main_window, m_TopSeqEntry, m_CmdProccessor, true);
7228  dlg->Show(true);
7229  } catch (CException&)
7230  {
7231  if (dlg)
7232  dlg->Destroy();
7233  }
7234 }
7235 
7237 {
7238  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7239  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7240 
7241  wxWindow* main_window = NULL;
7242  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7243  if (wb_frame)
7244  main_window = wb_frame->GetMainWindow();
7245 
7247  try
7248  {
7249  dlg = new CCompareWithBiosample(main_window, m_TopSeqEntry, m_CmdProccessor, false);
7250  dlg->Show(true);
7251  } catch (CException&)
7252  {
7253  if (dlg)
7254  dlg->Destroy();
7255  }
7256 }
7257 
7258 
7260 {
7261  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7262  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7263 
7264 
7266 
7267  if (cmd)
7269 }
7270 
7271 void CSequenceEditingEventHandler::BarcodeTool( wxCommandEvent& event )
7272 {
7273  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7274  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7275 
7276  wxWindow* main_window = NULL;
7277  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7278  if (wb_frame)
7279  main_window = wb_frame->GetMainWindow();
7280 
7281  CBarcodeTool *dlg(NULL);
7282  try
7283  {
7284  dlg = new CBarcodeTool(main_window, m_TopSeqEntry, m_CmdProccessor, m_Workbench);
7285  dlg->Show(true);
7286  } catch (CException&)
7287  {
7288  if (dlg)
7289  dlg->Destroy();
7290  }
7291 }
7292 
7294 {
7295  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7296  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7297 
7298  CLocalFileRestorer restorer(m_Workbench);
7299  restorer.RestoreFile(event.GetId() == eCmdRestoreAndConvertSeqSubmit);
7300 }
7301 
7303 {
7304  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7305  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7306 
7308  CRef<CCmdComposite> cmd = worker.GetCommand();
7309  if (cmd)
7310  {
7312  }
7313  CRef<CCmdComposite> del_original_ids = worker.GetRemoveOriginalIdCommand();
7314  if (del_original_ids)
7315  {
7316  int answer = wxMessageBox (_("Remove Original Ids?"), _("Remove Original Ids"), wxYES_NO | wxICON_QUESTION);
7317  if (answer == wxYES)
7318  m_CmdProccessor->Execute(del_original_ids);
7319  }
7320 }
7321 
7323 {
7324  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7325  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7326 
7328  CRef<CCmdComposite> cmd = worker.GetCommand();
7329  if (cmd)
7330  {
7332  }
7333  CRef<CCmdComposite> del_original_ids = worker.GetRemoveOriginalIdCommand();
7334  if (del_original_ids)
7335  {
7336  int answer = wxMessageBox (_("Remove Original Ids?"), _("Remove Original Ids"), wxYES_NO | wxICON_QUESTION);
7337  if (answer == wxYES)
7338  m_CmdProccessor->Execute(del_original_ids);
7339  }
7340 }
7341 
7343 {
7344  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7345  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7346 
7348  CRef<CCmdComposite> cmd = worker.GetCommand();
7349  if (cmd)
7350  {
7352  }
7353  CRef<CCmdComposite> del_original_ids = worker.GetRemoveOriginalIdCommand();
7354  if (del_original_ids)
7355  {
7356  int answer = wxMessageBox (_("Remove Original Ids?"), _("Remove Original Ids"), wxYES_NO | wxICON_QUESTION);
7357  if (answer == wxYES)
7358  m_CmdProccessor->Execute(del_original_ids);
7359  }
7360 }
7361 
7363 {
7364  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7365  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7366 
7368  CRef<CCmdComposite> cmd = worker.GetCommand();
7369  if (cmd)
7370  {
7372  }
7373 }
7374 
7376 {
7377  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7378  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7379 
7381  CRef<CCmdComposite> cmd1 = worker1.GetCommand();
7382  if (cmd1)
7383  {
7384  m_CmdProccessor->Execute(cmd1);
7385  }
7387  CRef<CCmdComposite> cmd2 = worker2.GetCommand();
7388  if (cmd2)
7389  {
7391  }
7392 }
7393 
7395 {
7396  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7397  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7398 
7400  CRef<CCmdComposite> cmd = worker.GetCommand();
7401  if (cmd)
7402  {
7404  }
7405 }
7406 
7408 {
7409  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7410  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7411 
7412  CRemoveName worker(m_TopSeqEntry);
7413  CRef<CCmdComposite> cmd = worker.GetCommand();
7414  if (cmd)
7415  {
7417  }
7418 }
7419 
7421 {
7422  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7423  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7424 
7426  CRef<CCmdComposite> cmd = worker.GetCommand();
7427  if (cmd)
7428  {
7430  }
7431 }
7432 
7434 {
7435  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7436  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7437 
7439  CRef<CCmdComposite> cmd = worker.GetCommand();
7440  if (cmd)
7441  {
7443  }
7444 }
7445 
7446 
7448 {
7449  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7450  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7451  wxWindow* main_window = NULL;
7452  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7453  if (wb_frame)
7454  main_window = wb_frame->GetMainWindow();
7455 
7456  CRemoveGeneralId dlg(main_window, m_TopSeqEntry);
7457  if (dlg.ShowModal() == wxID_OK)
7458  {
7460  if (cmd)
7462  }
7463 }
7464 
7466 {
7467  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7468  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7469 
7471  CRef<CCmdComposite> cmd = worker.GetCommand();
7472  if (cmd)
7473  {
7475  }
7476 }
7477 
7479 {
7480  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7481  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7482 
7484  CRef<CCmdComposite> cmd = worker.GetCommand();
7485  if (cmd)
7486  {
7488  }
7489 }
7490 
7492 {
7493  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7494  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7495 
7497  CRef<CCmdComposite> cmd = worker.GetCommand();
7498  if (cmd)
7499  {
7501  }
7502 }
7503 
7505 {
7506  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7507  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7508 
7510  CRef<CCmdComposite> cmd = worker.GetCommand();
7511  if (cmd)
7512  {
7514  }
7515 }
7516 
7518 {
7520  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7521 
7522  CRef<CSeqdesc> seqdesc(new CSeqdesc());
7523  seqdesc->SetUser().Assign(*(edit::CStructuredCommentField::MakeUserObject("Assembly-Data")));
7524 
7526  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
7527  if (!orig_locs.empty())
7528  {
7529  CBioseq_Handle bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*orig_locs.front());
7530  seh = bsh.GetSeq_entry_Handle();
7531  }
7532 
7533  CIRef<IEditObject> editor(new CEditObjectSeq_desc(*seqdesc, seh, m_TopSeqEntry.GetScope(), true));
7534  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
7535  edit_dlg->SetUndoManager(m_CmdProccessor);
7536  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
7537  edit_dlg->SetEditorWindow(editorWindow);
7538  edit_dlg->SetEditor(editor);
7539  edit_dlg->SetWorkDir(m_WorkDir);
7540  edit_dlg->Show(true);
7541 }
7542 
7544 {
7545  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7546  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7547 
7548  wxWindow* main_window = NULL;
7549  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7550  if (wb_frame)
7551  main_window = wb_frame->GetMainWindow();
7552 
7553  CEditCdsFrame dlg(main_window, m_TopSeqEntry);
7554  if (dlg.ShowModal() == wxID_OK)
7555  {
7557  if (cmd)
7559  }
7560 }
7561 
7562 void CSequenceEditingEventHandler::ExpandGaps(wxCommandEvent& event)
7563 {
7564  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7565  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7566 
7568  if (cmd)
7569  {
7571  }
7572 }
7573 
7575 {
7576  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7577  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7578 
7580  if (cmd)
7581  {
7583  }
7584 }
7585 
7587 {
7588  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7589  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7590 
7592  if (cmd)
7593  {
7595  }
7596 }
7597 
7599 {
7600  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7601  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7602 
7604  if (cmd)
7605  {
7607  }
7608 }
7609 
7611 {
7612  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7613  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7614 
7616  if (cmd)
7617  {
7619  }
7620 }
7621 
7623 {
7624  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7625  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7626 
7628  if (cmd)
7629  {
7631  }
7632 }
7633 
7635 {
7636  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7637  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7638 
7639  wxWindow* main_window = NULL;
7640  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7641  if (wb_frame)
7642  main_window = wb_frame->GetMainWindow();
7643 
7644  CAddLinkageToGaps dlg(main_window);
7645  if (dlg.ShowModal() == wxID_OK)
7646  {
7648  if (cmd)
7650  }
7651 }
7652 
7654 {
7655  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7656  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7657 
7658  CSortedProteins sorted_prs(m_TopSeqEntry);
7659  sorted_prs.View();
7660 }
7661 
7663 {
7664  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7665  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7666 
7667  CConsolidateLikeMods worker("; ");
7669  if (cmd)
7670  {
7672  }
7673 }
7674 
7676 {
7677  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7678  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7679 
7680  CConsolidateLikeMods worker(" ");
7682  if (cmd)
7683  {
7685  }
7686 }
7687 
7688 
7689 void CSequenceEditingEventHandler::ApplyFBOL(wxCommandEvent& event)
7690 {
7691  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7692  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7693 
7695  if (cmd)
7696  {
7698  }
7699 }
7700 
7702 {
7703  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7704  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7705 
7707  if (cmd)
7708  {
7710  }
7711 }
7712 
7714 {
7715  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7716  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7717 
7719  if (cmd)
7720  {
7722  }
7723 }
7724 
7726 {
7727  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7728  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7729 
7731  if (cmd)
7732  {
7734  }
7735 }
7736 
7738 {
7739  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7740  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7741 
7743  if (cmd)
7744  {
7746  }
7747 }
7748 
7750 {
7751  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7752  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7753 
7755  if (cmd)
7756  {
7758  }
7759 }
7760 
7762 {
7763  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7764  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7765 
7767  if (cmd)
7768  {
7770  }
7771 }
7772 
7774 {
7775  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7776  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7777 
7779  if (cmd)
7780  {
7782  }
7783 }
7784 
7786 {
7787  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7788  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7789 
7791  if (cmd)
7792  {
7794  }
7795 }
7796 
7798 {
7799  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7800  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7801 
7803  if (cmd)
7804  {
7806  }
7807 }
7808 
7810 {
7811  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7812  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7813 
7815  if (cmd)
7816  {
7818  }
7819 }
7820 
7821 
7822 void CSequenceEditingEventHandler::Duplicate(wxCommandEvent& event)
7823 {
7824  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7825  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7826 
7828  {
7829  CConstRef<CObject> obj = (*it).object;
7830 
7831  CSeq_entry_Handle seh;
7832  const CSeq_feat* f = dynamic_cast<const CSeq_feat * >(obj.GetPointer());
7833  const CSeqdesc* d = dynamic_cast<const CSeqdesc *>(obj.GetPointer());
7834  const CBioseq_set* s = dynamic_cast<const CBioseq_set *>(obj.GetPointer());
7835  const CSeq_entry* e = dynamic_cast<const CSeq_entry*>(obj.GetPointer());
7836  if (s || e)
7837  continue;
7838  if (f)
7839  {
7841  if (fh)
7842  {
7843  const CSeq_annot_Handle& annot_handle = fh.GetAnnot();
7844  seh = annot_handle.GetParentEntry();
7845  }
7846  }
7847  if (d)
7848  {
7849  seh = edit::GetSeqEntryForSeqdesc((*it).scope, *d);
7850  }
7851  if (!seh)
7852  {
7853  CScope::TTSE_Handles tses;
7855  if (!tses.empty())
7856  seh = tses.front();
7857  }
7858 
7859  CIRef<IEditObject> editor = CreateEditorForObject(obj, seh, true);
7860  if (editor)
7861  {
7862  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
7863  edit_dlg->SetUndoManager(m_CmdProccessor);
7864  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
7865  editorWindow->TransferDataToWindow();
7866  edit_dlg->SetEditorWindow(editorWindow);
7867  edit_dlg->SetEditor(editor);
7868  edit_dlg->SetWorkDir(m_WorkDir);
7869  edit_dlg->Show(true);
7870  break;
7871  }
7872  }
7873 }
7874 
7876 {
7877  if (!m_Workbench) return;
7878  wxWindow* main_window = NULL;
7879  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7880  if (wb_frame)
7881  main_window = wb_frame->GetMainWindow();
7882  CSuppressGenes *dlg = new CSuppressGenes(main_window, m_Workbench);
7883  dlg->Show(true);
7884 }
7885 
7886 
7888 {
7889  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7890  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7891 
7892  wxWindow* main_window = NULL;
7893  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7894  if (wb_frame)
7895  main_window = wb_frame->GetMainWindow();
7896 
7900  id_col->SetHeader().SetTitle(kSequenceIdColLabel);
7901  table->SetColumns().push_back(id_col);
7902 
7903  size_t row = 0;
7905  for ( ; b_iter ; ++b_iter )
7906  {
7907  CRef<CSeq_id> id(new CSeq_id());
7909  id->Assign (*(best.GetSeqId()));
7910  id_col->SetData().SetId().push_back(id);
7911 
7912  for (CSeqdesc_CI it (*b_iter, CSeqdesc::e_User); it; ++it)
7913  {
7914  if (it->GetUser().IsSetType() && it->GetUser().GetType().IsStr() && NStr::EqualNocase(it->GetUser().GetType().GetStr(), "StructuredComment") )
7915  {
7916  ITERATE (CUser_object::TData, field_it, it->GetUser().GetData())
7917  {
7918  if ((*field_it)->IsSetLabel() && (*field_it)->GetLabel().IsStr() && (*field_it)->IsSetData())
7919  {
7920  vector<string> val;
7921  if ((*field_it)->GetData().IsStr())
7922  {
7923  val.push_back((*field_it)->GetData().GetStr());
7924  }
7925  else if ((*field_it)->GetData().IsStrs())
7926  {
7927  for (vector<CStringUTF8>::const_iterator str_it = (*field_it)->GetData().GetStrs().begin(); str_it != (*field_it)->GetData().GetStrs().end(); ++str_it)
7928  {
7929  val.push_back(*str_it);
7930  }
7931  }
7932  AddValueToTable (table, (*field_it)->GetLabel().GetStr(), NStr::Join(val, ", "), row);
7933  }
7934  }
7935  }
7936  }
7937 
7938  row++;
7939  }
7940  table->SetNum_rows(static_cast<CSeq_table::TNum_rows>(row));
7943 
7944  wxFileDialog table_save_file(main_window, wxT("Export Structured Comment Table"), wxEmptyString, wxEmptyString,
7947  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
7948 
7949  if (table_save_file.ShowModal() == wxID_OK)
7950  {
7951  wxString path = table_save_file.GetPath();
7952  wxString name = table_save_file.GetFilename();
7953 
7954  name.Trim(false);
7955  name.Trim(true);
7956 
7957  if (name.IsEmpty())
7958  {
7959  return;
7960  }
7961  ios::openmode mode = ios::out;
7962 
7963  CNcbiOfstream os(path.fn_str(), mode);
7964  if (!os)
7965  {
7966  wxMessageBox(wxT("Cannot open file ")+name, wxT("Error"), wxOK | wxICON_ERROR, main_window);
7967  return;
7968  }
7969 
7970  CCSVExporter exporter(os, '\t', '"', false);
7971  ITERATE (CSeq_table::TColumns, cit, table->GetColumns()) {
7972  exporter.Field((*cit)->GetHeader().GetTitle());
7973  }
7974  exporter.NewRow();
7975  for (int i = 0; i < table->GetNum_rows(); ++i) {
7976  ITERATE (CSeq_table::TColumns, cit, table->GetColumns()) {
7977  if (i < (*cit)->GetData().GetSize()) {
7978  if ((*cit)->GetData().IsId()) {
7979  string label = "";
7980  (*cit)->GetData().GetId()[i]->GetLabel(&label, CSeq_id::eContent);
7981  exporter.Field(label);
7982  } else if ((*cit)->GetData().IsString()) {
7983  exporter.Field((*cit)->GetData().GetString()[i]);
7984  }
7985  } else {
7986  string blank = "";
7987  exporter.Field(blank);
7988  }
7989  }
7990  exporter.NewRow();
7991  }
7992  }
7993 }
7994 
7996 {
7997  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7998  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7999 
8000 
8002  dlg->Show(true);
8003 }
8004 
8006 {
8007  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8008  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8009 
8011  if (cmd)
8012  {
8014  }
8015 }
8016 
8018 {
8019  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8020  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8021 
8023  if (cmd)
8024  {
8026  }
8027 }
8028 
8030 {
8031  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8032  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8033 
8035  if (cmd)
8036  {
8038  }
8039 }
8040 
8042 {
8043  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8044  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8045 
8047  if (cmd)
8048  {
8050  }
8051 }
8052 
8054 {
8055  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8056  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8057 
8059  if (cmd)
8060  {
8062  }
8063 }
8064 
8066 {
8067  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8068  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
8069 
8070 
8072  dlg->Show(true);
8073 }
8074 
8076 {
8077  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8078  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8079 
8080  wxWindow* main_window = NULL;
8081  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8082  if (wb_frame)
8083  main_window = wb_frame->GetMainWindow();
8084 
8086  if (cmd)
8087  {
8089  }
8090 }
8091 
8093 {
8094  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8095  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8096 
8097  wxWindow* main_window = NULL;
8098  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8099  if (wb_frame)
8100  main_window = wb_frame->GetMainWindow();
8101 
8103  if (cmd)
8104  {
8106  }
8107 }
8108 
8110 {
8111  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8112  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
8113 
8114 
8116  dlg->Show(true);
8117 }
8118 
8120 {
8121  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8122  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8123 
8125  if (cmd)
8126  {
8128  }
8129 }
8130 
8132 {
8133  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8134  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8135 
8137  if (cmd)
8138  {
8140  }
8141 }
8142 
8144 {
8145  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8146  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8147 
8149  if (cmd)
8150  {
8152  }
8153 }
8154 
8156 {
8157  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8158  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8159 
8161  if (cmd)
8162  {
8164  }
8165 }
8166 
8168 {
8169  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8170  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8171 
8173  if (cmd)
8174  {
8176  }
8177 }
8178 
8180 {
8181  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8182  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8183 
8185  if (cmd)
8186  {
8188  }
8189 }
8190 
8192 {
8193  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8194  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8195 
8197  if (cmd)
8198  {
8200  }
8201 }
8202 
8204 {
8205  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8206  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8207 
8208  wxWindow* main_window = NULL;
8209  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8210  if (wb_frame)
8211  main_window = wb_frame->GetMainWindow();
8212 
8214  if (cmd)
8215  {
8217  }
8218 }
8219 
8221 {
8222  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8223  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8224 
8225  wxWindow* main_window = NULL;
8226  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8227  if (wb_frame)
8228  main_window = wb_frame->GetMainWindow();
8229 
8231  if (cmd)
8232  {
8234  }
8235 }
8236 
8238 {
8239  wxWindow* main_window = NULL;
8240  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8241  if (wb_frame)
8242  main_window = wb_frame->GetMainWindow();
8243 
8245  dlg->Show(true);
8246 }
8247 
8249 {
8250  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8251  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8252 
8254  if (dlg.ShowModal() == wxID_OK) {
8256  if (cmd) {
8258  dlg.Report();
8259  }
8260  }
8261 }
8262 
8264 {
8266  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8267 
8268  bool enable = event.IsChecked();
8270  if (cmd) {
8272  }
8273 
8274  if (enable)
8275  {
8276  if (!TestHupIdEnabled())
8277  {
8278  wxMenuItem* menu = dynamic_cast<wxMenuItem*>(event.GetEventObject());
8279  menu->Check(false);
8280  wxMessageBox(_("Loading HUP-ID failed, do you have permissions to access this server?"), wxT("Error"), wxOK, NULL);
8281  }
8282  }
8283 }
8284 
8285 static wxString IndexerTypeToName(int i)
8286 {
8287  switch(i)
8288  {
8289  case e_GenBankIndexer : return _("GenBank"); break;
8290  case e_RefSeqIndexer : return _("RefSeq"); break;
8291  default : break;
8292  }
8293  return wxEmptyString;
8294 }
8295 
8297 {
8298  wxWindow* main_window = NULL;
8299  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8300  if (wb_frame)
8301  main_window = wb_frame->GetMainWindow();
8302  wxArrayString choices;
8303  for (int i = 0; i < e_LastIndexer; i++)
8304  {
8305  choices.Add(IndexerTypeToName(i));
8306  }
8307  wxSingleChoiceDialog dlg(main_window, _("Select Indexer Type"), _("Indexer Type"), choices);
8309  int sel = gui_reg.GetReadView(kInternalIndexerRegistry)
8311  dlg.SetSelection(sel);
8312 
8313  if (dlg.ShowModal() == wxID_OK)
8314  {
8315  sel = dlg.GetSelection();
8318  }
8319 }
8320 
8322 {
8323  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8324  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8325 
8327 }
8328 
8330 {
8331  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8332  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8333 
8335  if (cmd) {
8337  }
8338 }
8339 
8341 {
8342  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8343  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8344 
8345  wxWindow* main_window = NULL;
8346  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8347  if (wb_frame)
8348  main_window = wb_frame->GetMainWindow();
8349 
8351  dlg.ShowModal();
8352 }
8353 
8355 {
8356  if (!m_Workbench) return;
8357  wxWindow* main_window = NULL;
8358  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8359  if (wb_frame)
8360  main_window = wb_frame->GetMainWindow();
8361  CFixForTransSplicing *dlg = new CFixForTransSplicing(main_window, m_Workbench);
8362  dlg->Show(true);
8363 }
8364 
8366 {
8367  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8368  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8369 
8371  if (cmd) {
8373  }
8374 }
8375 
8377 {
8378  CRef<CUser_object> params(new CUser_object());
8380  type->SetStr("TextViewParams");
8381  params->SetType(*type);
8382  CUser_object::TData& data = params->SetData();
8383  {
8384  CRef<CUser_field> param(new CUser_field());
8386  label->SetStr("TextViewType");
8387  param->SetLabel(*label);
8388  param->SetData().SetStr("Flat File");
8389  data.push_back(param);
8390  }
8391  {
8392  CRef<CUser_field> param(new CUser_field());
8394  label->SetStr("ExpandAll");
8395  param->SetLabel(*label);
8396  param->SetData().SetBool(true);
8397  data.push_back(param);
8398  }
8399  {
8400  CRef<CUser_field> param(new CUser_field());
8402  label->SetStr("TrackSelection");
8403  param->SetLabel(*label);
8404  param->SetData().SetBool(true);
8405  data.push_back(param);
8406  }
8407  return params;
8408 }
8409 
8410 static tuple<CRef<CGBProjectHandle>,CRef<CProjectItem> > LoadFileForSubmission(wxWindow* parent, CIRef<CProjectService> srv, CRef<CGBWorkspace> ws)
8411 {
8414 
8415  vector< CIRef<IFileFormatLoaderManager> > managers;
8416  GetExtensionAsInterface("file_format_loader_manager", managers);
8417 
8418  CRef<CFileLoadWizard> fileManager(new CFileLoadWizard());
8419  vector<string> format_ids(1,"file_loader_auto");
8420  format_ids.push_back("file_loader_fasta");
8421  format_ids.push_back("file_loader_asn");
8422  /* for (auto manager : managers)
8423  {
8424  format_ids.push_back(manager->GetFileLoaderId());
8425  }*/
8426  fileManager->LoadFormats(format_ids);
8427 
8428  vector<CIRef<IOpenObjectsPanelClient> > loadManagers;
8429  loadManagers.push_back(CIRef<IOpenObjectsPanelClient>(fileManager.GetPointer()));
8430  COpenObjectsDlg dlg(parent);
8431  dlg.SetSize(710, 480);
8432  dlg.SetRegistryPath("Dialogs.Edit.OpenSubmissionFile");
8433  dlg.SetManagers(loadManagers);
8434  if (dlg.ShowModal() == wxID_OK)
8435  {
8436  CIRef<IObjectLoader> object_loader(dlg.GetObjectLoader());
8437  if (!object_loader)
8438  return make_tuple(ph,pi);
8439  IExecuteUnit* execute_unit = dynamic_cast<IExecuteUnit*>(object_loader.GetPointer());
8440  if (!execute_unit || !execute_unit->PreExecute() || !GUI_AsyncExecUnit(*execute_unit, wxT("Reading file(s)...")) || !execute_unit->PostExecute())
8441  return make_tuple(ph,pi);
8442 
8443  auto& objects = object_loader->GetObjects();
8444  const CBioseq* bseq = nullptr;
8445  for (auto& it : objects) {
8446  const CObject& ptr = it.GetObject();
8447  if (bseq = dynamic_cast<const CBioseq*>(&ptr)) {
8448  break;
8449  }
8450  else if (const CSeq_entry* entry = dynamic_cast<const CSeq_entry*>(&ptr)) {
8451  if (entry && entry->IsSeq()) {
8452  LOG_POST(Info << MSerial_AsnText << entry->GetSeq());
8453  bseq = &(entry->GetSeq());
8454  break;
8455  }
8456  }
8457  else if (const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>(&ptr)) {
8458  bseq = nullptr;
8459  break;
8460  }
8461  }
8462 
8463  if (bseq && bseq->IsAa()) {
8464  wxMessageBox(wxT("The file contains one protein sequence. Please import a nucleotide sequence file"), wxT("Error"),
8465  wxOK | wxICON_ERROR);
8466  return make_tuple(ph, pi);
8467  }
8468 
8469  CSelectProjectOptions options;
8471  CObjectLoadingTask::AddObjects(srv->GetServiceLocator(), object_loader->GetObjects(), dynamic_cast<CLoaderDescriptor*>(object_loader->GetLoader()), options);
8472  wxDateTime start = wxDateTime::Now();
8473  wxDateTime now = start;
8474  while ((!ph || !pi) && (now - start).GetSeconds() < 60)
8475  {
8476  for (auto project_handle : ws->GetWorkspace().GetProjects())
8477  {
8478  if (project_handle->GetProject().GetData().IsSetItems())
8479  {
8480  for (auto item : project_handle->GetProject().GetData().GetItems())
8481  {
8482  if (item->IsSetLabel() && item->IsSetItem() && (item->GetItem().IsSubmit() || item->GetItem().IsEntry()))
8483  {
8484  ph = project_handle;
8485  pi = item;
8486  break;
8487 
8488  }
8489  }
8490  }
8491  }
8492  if (wxTheApp && wxTheApp->GetMainLoop())
8493  {
8494  if (!wxTheApp->GetMainLoop()->IsYielding())
8495  wxTheApp->Yield(true);
8496  wxTheApp->ProcessPendingEvents();
8497  }
8498  wxMilliSleep(100);
8499  now = wxDateTime::Now();
8500  }
8501  }
8502  return make_tuple(ph,pi);
8503 }
8504 
8506 {
8507  if (!m_TopSeqEntry || !m_CmdProccessor)
8508  return pi;
8509  if (m_SeqSubmit)
8510  return pi;
8511 
8512  vector<CIRef<IProjectView>> views;
8513  srv->FindViews(views, *pi->GetObject());
8514  for (auto& it : views)
8515  {
8516  srv->RemoveProjectView(*it);
8517  }
8518 
8519  CRef<CSubmit_block> submitBlock(new CSubmit_block);
8522  string version_str = "Genome Workbench ";
8523  version_str += NStr::IntToString(version.GetVer_major());
8524  version_str += ".";
8525  version_str += NStr::IntToString(version.GetVer_minor());
8526  version_str += ".";
8527  version_str += NStr::IntToString(version.GetVer_patch());
8528  version_str += " " + wxGetOsDescription().ToStdString();
8529  submitBlock->SetTool(version_str);
8530 
8531  submitBlock->SetContact().SetContact().SetName().SetName().SetLast("?");
8532  bool found_sub = false;
8534  for (CSeqdesc_CI desc_ci(*entry_it, CSeqdesc::e_Pub, 1); desc_ci; ++desc_ci)
8535  if (desc_ci->IsPub() && desc_ci->GetPub().IsSetPub() && desc_ci->GetPub().GetPub().IsSet() && !desc_ci->GetPub().GetPub().Get().empty() && desc_ci->GetPub().GetPub().Get().front()->IsSub())
8536  {
8537  submitBlock->SetCit().Assign(desc_ci->GetPub().GetPub().Get().front()->GetSub());
8538  found_sub = true;
8539  break;
8540  }
8541 
8542  if (!found_sub)
8543  {
8544  CRef< CAuthor > author(new CAuthor);
8545  author->SetName().SetName().SetLast("?");
8546  submitBlock->SetCit().SetAuthors().SetNames().SetStd().push_back(author);
8547  }
8548  if (!submitBlock->GetCit().IsSetDate()) {
8549  CRef<CDate> today(new CDate);
8551  submitBlock->SetCit().SetDate(*today);
8552  }
8553 
8556  copy->Assign(*entry);
8557 
8558  CRef<CSeq_submit> submission(new CSeq_submit);
8559  submission->SetSub(submitBlock.GetNCObject());
8560  submission->SetData().SetEntrys().push_back(copy);
8561 
8562  CGBDocument* doc = dynamic_cast<CGBDocument*>(ph.GetPointer());
8563 
8564  CRef<CProjectItem> new_item(new CProjectItem);
8565  new_item->SetDescr().assign(pi->GetDescr().begin(), pi->GetDescr().end());
8566  new_item->SetItem().SetSubmit(*submission);
8567 
8568  if (pi->IsSetLabel())
8569  new_item->SetLabel(pi->GetLabel());
8570  else
8571  {
8572  string label;
8574  new_item->SetLabel(label);
8575  }
8576 
8578  pi = new_item;
8579  m_CmdProccessor->Execute(chg);
8580  CScope* scope = ph->GetScope();
8582  m_SeqSubmit.Reset(&pi->GetItem().GetSubmit());
8583  return pi;
8584 }
8585 
8587 {
8588  CRef<CCmdComposite> cmd(new CCmdComposite("Change na to genomic dna"));
8589  for (CBioseq_CI b_iter(m_TopSeqEntry, CSeq_inst::eMol_na); b_iter; ++b_iter)
8590  {
8591  CConstRef<CBioseq> bioseq = b_iter->GetCompleteBioseq();
8592  if (!bioseq || !bioseq->IsSetInst() || !bioseq->GetInst().IsSetMol() || bioseq->GetInst().GetMol() != CSeq_inst::eMol_na)
8593  continue;
8594 
8595  CRef<CBioseq> new_bioseq (new CBioseq());
8596  new_bioseq->Assign (*bioseq);
8597  new_bioseq->SetInst().SetMol(CSeq_inst::eMol_dna);
8598  CIRef<IEditCommand> chgInst(new CCmdChangeBioseqInst(*b_iter, new_bioseq->GetInst()));
8599  cmd->AddCommand(*chgInst);
8600 
8601  CSeqdesc_CI di(*b_iter, CSeqdesc::e_Molinfo, 1);
8602  if (di)
8603  {
8604  const CSeqdesc& seqdesc = *di;
8605  CRef<CSeqdesc> edited_seqdesc(new CSeqdesc);
8606  edited_seqdesc->Assign(seqdesc);
8607  edited_seqdesc->SetMolinfo().SetBiomol(CMolInfo::eBiomol_genomic);
8608  CRef<CCmdChangeSeqdesc> chgd_cmd(new CCmdChangeSeqdesc(di.GetSeq_entry_Handle(), seqdesc, *edited_seqdesc));
8609  cmd->AddCommand(*chgd_cmd);
8610  }
8611  else
8612  {
8613  CRef<CSeqdesc> edited_seqdesc(new CSeqdesc);
8614  edited_seqdesc->SetMolinfo().SetBiomol(CMolInfo::eBiomol_genomic);
8615  CRef<CCmdCreateDesc> subcmd(new CCmdCreateDesc(b_iter->GetSeq_entry_Handle(), *edited_seqdesc));
8616  cmd->AddCommand(*subcmd);
8617  }
8618  }
8619 
8621 }
8622 
8624 {
8625  if (m_TopSeqEntry.IsSet()) {
8627  auto old_set = bh.GetCompleteBioseq_set();
8628  if (!old_set->IsSetClass() ||
8629  (old_set->IsSetClass() && old_set->GetClass() == CBioseq_set::eClass_not_set)) {
8630  CRef<CBioseq_set> new_set(new CBioseq_set());
8631  new_set->Assign(*old_set);
8635  }
8636  else if (old_set->IsSetClass() && old_set->GetClass() == CBioseq_set::eClass_nuc_prot) {
8639  copy->Assign(*entry);
8640 
8641  CRef<CSeq_entry> outside_set(new CSeq_entry);
8643  outside_set->SetSet().SetSeq_set().push_back(copy);
8644 
8645  CScope new_scope(*CObjectManager::GetInstance());
8646  new_scope.AddDefaults();
8647  CSeq_entry_Handle tmp_topseh = new_scope.AddTopLevelSeqEntry(*outside_set);
8648  CRef<CCmdChangeSeqEntry> wrap_cmd(new CCmdChangeSeqEntry(m_TopSeqEntry, outside_set));
8649  m_CmdProccessor->Execute(wrap_cmd);
8650  }
8651  }
8652  else if (m_TopSeqEntry.IsSeq()) {
8655  copy->Assign(*entry);
8656 
8657  CScope new_scope(*CObjectManager::GetInstance());
8658  new_scope.AddDefaults();
8659  CSeq_entry_Handle tmp_topseh = new_scope.AddTopLevelSeqEntry(*copy);
8660 
8661  // wrap single sequence in genbank set
8662  CSeq_entry_EditHandle eh(tmp_topseh);
8665  m_CmdProccessor->Execute(wrap_cmd);
8666  }
8667 }
8668 
8669 class CDoOnIdleTask : public CAppTask
8670 {
8671 public:
8672  CDoOnIdleTask(std::function<void()> f) : m_f(f) {}
8673 protected:
8674  std::function<void()> m_f;
8676  {
8677  m_f();
8678  return eCompleted;
8679  }
8680 };
8681 
8683 {
8685  if (!srv) return;
8686  CRef<CGBWorkspace> ws = srv->GetGBWorkspace();
8687  if (!ws || !ws->IsSetWorkspace() || !ws->GetWorkspace().IsSetProjects()) return;
8688 
8689  wxWindow* main_window = nullptr;
8690  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8691  if (wb_frame)
8692  main_window = wb_frame->GetMainWindow();
8693 
8694  vector<pair<CRef<CGBProjectHandle>, CRef<CProjectItem> > > projects;
8697  wxArrayString choices;
8698  bool non_editable = false;
8699  for (auto project_handle : ws->GetWorkspace().GetProjects())
8700  {
8701  if (project_handle->GetProject().GetData().IsSetItems())
8702  {
8703  for (auto item : project_handle->GetProject().GetData().GetItems())
8704  {
8705  if (item->IsSetLabel())
8706  {
8707  if (item->IsSetItem() && (item->GetItem().IsSubmit() || item->GetItem().IsEntry()))
8708  {
8709  projects.push_back(make_pair(project_handle, item));
8710  choices.Add(wxString(item->GetLabel()));
8711  }
8712  else
8713  non_editable = true;
8714  }
8715  }
8716  }
8717  }
8718  if (non_editable)
8719  {
8720  wxMessageBox(wxT("One or more projects contain records which cannot be used for submission.\nThis is only an informational notice, this is not an error."), wxT("Information"), wxOK | wxICON_INFORMATION, NULL);
8721  }
8722  if (projects.empty())
8723  {
8724  tie(ph,pi) = LoadFileForSubmission(main_window, srv, ws);
8725  }
8726  else if (projects.size() == 1)
8727  {
8728  tie(ph,pi) = projects[0];
8729  }
8730  else
8731  {
8732  wxSingleChoiceDialog dlg(main_window, _("Select the project for the submission"), _("Multiple projects found"), choices);
8733  if (dlg.ShowModal() == wxID_OK)
8734  {
8735  int sel = dlg.GetSelection();
8736  if (sel != wxNOT_FOUND)
8737  {
8738  tie(ph,pi) = projects[sel];
8739  }
8740  }
8741  }
8742  if (!ph || !pi)
8743  return;
8744 
8745  CGBDocument* doc = dynamic_cast<CGBDocument*>(ph.GetPointer());
8746  if (doc)
8747  {
8748  m_CmdProccessor = &doc->GetUndoManager();
8749  m_WorkDir = doc->GetWorkDir();
8750  }
8751 
8752  if (!m_CmdProccessor) return;
8753 
8754  m_SeqSubmit.Reset();
8755  m_TopSeqEntry.Reset();
8756  if (pi->IsSetItem() && pi->GetItem().IsSubmit())
8757  m_SeqSubmit.Reset(&pi->GetItem().GetSubmit());
8758 
8759 
8760  CScope* scope = ph->GetScope();
8761  if (m_SeqSubmit)
8762  {
8764  {
8765  for (auto entry : m_SeqSubmit->GetData().GetEntrys())
8766  {
8767  if (entry)
8768  {
8769  CSeq_entry_Handle seh = scope->GetSeq_entryHandle(*entry);
8770  if (seh)
8771  {
8773  break;
8774  }
8775  }
8776  }
8777  }
8778  }
8779  else if (pi->IsSetItem() && pi->GetItem().IsEntry())
8780  {
8781  CSeq_entry_Handle seh = scope->GetSeq_entryHandle(pi->GetItem().GetEntry(), CScope::eMissing_Null);
8782  if (seh)
8784  }
8785 
8786  if (!m_TopSeqEntry) return;
8787 
8788  if (!m_SeqSubmit)
8789  pi = CreateSeqSubmit(ph, pi, srv);
8790 
8793  try {
8795  if (taxlookup_cmd)
8796  m_CmdProccessor->Execute(taxlookup_cmd);
8797  }
8798  catch (const CException& e) {
8799  LOG_POST(Error << "Taxonomy lookup failed before opening the Submission Wizard: " << e.GetMsg());
8800  }
8801 
8803  if (m_SeqSubmit)
8805  else
8807  IProjectView* old_view = srv->FindView(*(objects.front().object), "Text View");
8808  if (!old_view)
8809  old_view = srv->AddProjectView("Text View", objects, GetParams());
8810 
8811 
8812 
8814  CDoOnIdleTask* task = new CDoOnIdleTask([=](){CSubmissionWizard::GetInstance(main_window, m_Workbench, ph, pi);});
8815  taskService->AddTask(*task);
8816 }
8817 
8819 {
8821  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8822 
8823  wxWindow* main_window = NULL;
8824  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8825  if (wb_frame)
8826  main_window = wb_frame->GetMainWindow();
8827 
8829  if (m_SeqSubmit)
8830  {
8831  so = m_SeqSubmit;
8832  }
8833  else
8834  {
8835 
8836  int answer = wxMessageBox (_("You need to use the 'Genome Submission Wizard' to add contact information before submitting to GenBank - save incomplete file?"),
8837  _("Save Incomplete File"), wxYES_NO | wxICON_QUESTION);
8838  if (answer == wxYES)
8839  {
8841  }
8842  else
8843  {
8844  PrepareSeqSubmit(event);
8845  return;
8846  }
8847  }
8848 
8849  if (!so)
8850  return;
8851 
8852  wxFileDialog asn_save_file(main_window, wxT("Save Submission File"), m_WorkDir, wxEmptyString,
8855  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
8856 
8857 
8858  if (asn_save_file.ShowModal() == wxID_OK) {
8859  wxString path = asn_save_file.GetPath();
8860  if (!path.IsEmpty()) {
8861  bool saved = false;
8862  try {
8863  ios::openmode mode = ios::out;
8864  CNcbiOfstream os(path.fn_str(), mode);
8865  os << MSerial_AsnText;
8866  os << *so;
8867  saved = true;
8868  }
8869  catch (const CException& e) {
8870  LOG_POST(Error << "Failed to save submission file: " << e.GetMsg());
8871  }
8872  catch (const exception& e) {
8873  LOG_POST(Error << "Failed to save submission file: " << e.what());
8874  }
8875 
8876  if (!saved) {
8877  NcbiErrorBox("Submission file cannot be saved");
8878  CFile fh(ToStdString(path));
8879  if (fh.Exists() && fh.IsFile()) {
8881  }
8882  }
8883  }
8884  }
8885 }
8886 
8888 {
8890  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8891 
8892  wxWindow* main_window = NULL;
8893  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8894  if (wb_frame)
8895  main_window = wb_frame->GetMainWindow();
8896 
8898  if (m_SeqSubmit)
8899  {
8900  so = m_SeqSubmit;
8901  }
8902  if (!so)
8903  return;
8904 
8905  wxFileDialog asn_save_file(main_window, wxT("Save ASN.1 File"), m_WorkDir, wxEmptyString,
8908  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
8909 
8910  if (asn_save_file.ShowModal() == wxID_OK)
8911  {
8912  wxString path = asn_save_file.GetPath();
8913  if( !path.IsEmpty())
8914  {
8915  ios::openmode mode = ios::out;
8916  CNcbiOfstream os(path.fn_str(), mode);
8917  os << MSerial_AsnText;
8918  os << *so;
8919  }
8920  }
8921 
8922 }
8923 
8924 
8926 {
8928  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
8929 
8930  string prefix;
8931  switch (event.GetId()){
8933  prefix.assign("MIENS-Data");
8934  break;
8936  prefix.assign("MIMARKS:5.0-Data");
8937  break;
8939  prefix.assign("MIGS:5.0-Data");
8940  break;
8942  prefix.assign("MIMS:5.0-Data");
8943  break;
8945  prefix.assign("Genome-Assembly-Data");
8946  break;
8948  prefix.assign("Genome-Annotation-Data");
8949  break;
8950  default : break;
8951  }
8952 
8953  if (prefix.empty())
8954  return;
8955 
8956  CRef<CSeqdesc> seqdesc(new CSeqdesc());
8957  seqdesc->SetUser().Assign(*edit::CStructuredCommentField::MakeUserObject(prefix));
8958 
8960  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
8961  if (!orig_locs.empty())
8962  {
8963  CBioseq_Handle bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*orig_locs.front());
8964  seh = bsh.GetSeq_entry_Handle();
8965  }
8966 
8967  CIRef<IEditObject> editor(new CEditObjectSeq_desc(*seqdesc, seh, m_TopSeqEntry.GetScope(), true));
8968  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
8969  edit_dlg->SetUndoManager(m_CmdProccessor);
8970  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
8971  edit_dlg->SetEditorWindow(editorWindow);
8972  edit_dlg->SetEditor(editor);
8973  edit_dlg->SetWorkDir(m_WorkDir);
8974  edit_dlg->Show(true);
8975 }
8976 
8977 
8979 {
8981  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
8982 
8983  string prefix;
8984  switch (event.GetId()){
8986  prefix.assign("MIENS");
8987  break;
8989  prefix.assign("MIMARKS");
8990  break;
8992  prefix.assign("MIGS");
8993  break;
8995  prefix.assign("MIMS");
8996  break;
8998  prefix.assign("Genome-Assembly");
8999  break;
9001  prefix.assign("Genome-Annotation");
9002  break;
9003  default : break;
9004  }
9005 
9006  if (prefix.empty())
9007  return;
9008 
9009  bool found(false);
9010  CRef<CCmdComposite> cmd(new CCmdComposite("Remove Structured Comment"));
9012  {
9013  for ( CSeqdesc_CI user_it(*entry_it, CSeqdesc::e_User, 1); user_it; ++user_it)
9014  {
9015  const CUser_object& u = user_it->GetUser();
9016  if (u.IsSetType() && u.GetType().IsStr() && NStr::EqualNocase(u.GetType().GetStr(), "StructuredComment"))
9017  {
9018  try
9019  {
9020  const CUser_field& prefix_field = user_it->GetUser().GetField("StructuredCommentPrefix");
9021  if (prefix_field.IsSetData() && prefix_field.GetData().IsStr()
9022  && NStr::StartsWith(prefix_field.GetData().GetStr(), "##" + prefix, NStr::eNocase)
9023  && NStr::EndsWith(prefix_field.GetData().GetStr(), "-Data-START##", NStr::eNocase))
9024  {
9025  CIRef<IEditCommand> cmdDelDesc(new CCmdDelDesc(user_it.GetSeq_entry_Handle(), *user_it));
9026  cmd->AddCommand(*cmdDelDesc);
9027  found = true;
9028  }
9029  }
9030  catch (const exception&) { }
9031  }
9032  }
9033  }
9034  if (found)
9036 }
9037 
9038 void CSequenceEditingEventHandler::Help(wxCommandEvent& event)
9039 {
9040  wxString manual_name;
9041  switch (event.GetId()) {
9042  case eCmdHelpReports_ext:
9043  manual_name = wxT("manual8");
9044  break;
9045  case eCmdHelpImport_ext:
9046  manual_name = wxT("manual11");
9047  break;
9048  case eCmdHelpSequences_ext:
9049  manual_name = wxT("manual9");
9050  break;
9051  case eCmdHelpFeatures_ext:
9052  manual_name = wxT("manual10");
9053  break;
9054  case eCmdHelpComments_ext:
9055  manual_name = wxT("manual12");
9056  break;
9058  manual_name = wxT("manual15");
9059  break;
9060  default:
9061  break;
9062  }
9063 
9064  wxURI help_url(wxT("https://www.ncbi.nlm.nih.gov/tools/gbench/") + manual_name + wxT("/"));
9065  wxString help_encoded_url = help_url.BuildURI();
9066  wxLaunchDefaultBrowser(help_encoded_url, 0);
9067 }
9068 
9070 {
9072  if (!m_TopSeqEntry || !m_CmdProccessor) return;
9073 
9075  dlg->Show(true);
9076 }
9077 
9079 
User-defined methods of the data storage class.
#define static
@ eExtreme_Positional
numerical value
Definition: Na_strand.hpp:63
@ eExtreme_Biological
5' and 3'
Definition: Na_strand.hpp:62
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.
EVT_UPDATE_UI(eCmdAlnShowMethodsDlg, CAlnMultiWidget::OnUpdateShowMethodDlg) EVT_UPDATE_UI(eCmdMethodProperties
#define EXT_POINT__APP_MODE_EXTENSION
CSeq_entry_Handle GetSeqEntryForSeqdesc(CRef< CScope > scope, const CSeqdesc &seq_desc)
bool GUI_AsyncExecUnit(IExecuteUnit &exec_unit, const wxString &msg)
Definition: async_call.cpp:53
void ConfigureAutodefParamsForBestCombo(SAutodefParams &params, objects::CSeq_entry_Handle seh)
void ConfigureAutodefParamsForID(SAutodefParams &params, objects::CSeq_entry_Handle seh)
unsigned int ConfigureParamsForPrefixCombo(SAutodefParams &params, objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > InstantiateProteinTitles(objects::CSeq_entry_Handle entry)
CRef< CCmdComposite > AutodefSeqEntryNoTitle(objects::CSeq_entry_Handle entry, SAutodefParams *params, bool docsum_only=false)
@ eCmdCreateSigPeptide
@ eCmdCreateRegion
@ eCmdCreateMiscRecomb
@ eCmdCreateRepeatRegion
@ eCmdCreateRegulatory_ribosome_binding_site
@ eCmdCreatetRNA
@ eCmdCreateAssemblyGap
@ eCmdCreateBond
@ eCmdCreatepreRNA
@ eCmdCreateRegulatory
@ eCmdCreateCRegion
@ eCmdCreateProt
@ eCmdCreateVSegment
@ eCmdCreateMiscFeature
@ eCmdCreateModifiedBase
@ eCmdCreateMobileElement
@ eCmdCreateNRegion
@ eCmdCreateTelomere
@ eCmdCreateMiscStructure
@ eCmdCreaterRNA
@ eCmdCreatetmRNA
@ eCmdCreatePrimerBind
@ eCmdCreateBiosourceFeat
@ eCmdCreateExon
@ eCmdCreateMatPeptide
@ eCmdCreateCentromere
@ eCmdCreateiDNA
@ eCmdCreatePrimTranscript
@ eCmdCreateJSegment
@ eCmdCreateMiscBinding
@ eCmdCreatemiscRNA
@ eCmdCreateRegulatory_promoter
@ eCmdCreateOriT
@ eCmdCreateDSegment
@ eCmdCreateVRegion
@ eCmdCreateRegulatory_riboswitch
@ eCmdCreateSTS
@ eCmdCreateCodingRegion_ext
@ eCmdCreatePolyASite
@ eCmdCreateSRegion
@ eCmdCreateCommentDescriptor
@ eCmdCreate5UTR
@ eCmdCreatePubFeatureLabeled
@ eCmdCreateMRNA
@ eCmdCreateGene
@ eCmdCreateCodingRegion
@ eCmdCreateSite
@ eCmdCreateUnsure
@ eCmdCreateRegulatory_enhancer
@ eCmdCreateVariation
@ eCmdCreatePreRNA
@ eCmdCreateTransitPeptide
@ eCmdCreateIntron
@ eCmdCreateDLoop
@ eCmdCreateSecondaryStructure
@ eCmdCreateProprotein
@ eCmdCreatencRNA
@ eCmdCreateProteinBind
@ eCmdCreate3UTR
@ eCmdCreateRepOrigin
@ eCmdCreateLTR
@ eCmdCreateStemLoop
@ eCmdCreateRNA
@ eCmdCreateOperon
@ eCmdCreateRegulatory_terminator
@ eCmdCreateMiscDifference
CIRef< IEditObject > CreateEditorForObject(CConstRef< CObject > obj, objects::CSeq_entry_Handle seh, bool create)
void SetInitParameters(EActionType action_type, EFieldType field_type, const string &field=kEmptyStr, const wxString &title=wxEmptyString)
Definition: aecr_frame.cpp:555
@ eFieldType_Feature
Definition: aecr_frame.hpp:152
@ eFieldType_StructuredComment
Definition: aecr_frame.hpp:157
@ eFieldType_Taxname
Definition: aecr_frame.hpp:150
@ eFieldType_CDSGeneProt
Definition: aecr_frame.hpp:153
@ eActionType_RemoveTextOutside
Definition: aecr_frame.hpp:146
@ eActionType_Remove
Definition: aecr_frame.hpp:145
@ eActionType_Convert
Definition: aecr_frame.hpp:141
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
void SetKeyword(const string &keyword)
void Apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand()
void apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProccessor)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse, CSeqFeatData::ESubtype subtype)
CRef< CCmdComposite > GetCommand()
static bool s_IsBioseqGood_AdjustEnds(const objects::CBioseq_Handle &bsh)
static bool s_IsBioseqGood_Strict(const objects::CBioseq_Handle &bsh)
static bool s_IsBioseqGood_Relaxed(const objects::CBioseq_Handle &bsh)
CRef< CCmdComposite > GetCommandToAdjustCDSEnds(const objects::CSeq_feat &cds)
CRef< CCmdComposite > GetCommand(const objects::CSeq_feat &cds)
AdjustForConsensusSpliceSite Adjust internal intervals of a CDS (and its associated mRNA feature) to ...
CAlign_CI –.
Definition: align_ci.hpp:63
CAppTaskService - Application Task Service.
CAppTask - default implementation of IAppTask, use it as a base class for custom tasks.
CRef< CCmdComposite > GetCommand()
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > GetCommand()
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
CAuthor –.
Definition: Author.hpp:59
bool OnlyTargeted()
void ShowSourceOptions(bool show)
void SetParams(SAutodefParams *params)
void PopulateParams(SAutodefParams &params)
static void CollectBioseqEditorCommands(vector< CUICommand * > &commands)
static CRef< objects::CSeq_feat > MakeDefaultFeature(objects::CSeqFeatData::ESubtype subtype)
static objects::CSeqFeatData::ESubtype GetFeatTypeFromCmdID(int cmd_id)
CBioseq_CI –.
Definition: bioseq_ci.hpp:69
CBioseq_Handle –.
CBioseq_set_Handle –.
const CBioseq & GetNucFromNucProtSet(void) const
Definition: Bioseq_set.cpp:227
CSeq_entry * GetParentEntry(void) const
Definition: Bioseq_set.hpp:122
TSeqPos GetLength(void) const
Definition: Bioseq.cpp:360
bool IsAa(void) const
Definition: Bioseq.cpp:350
string GetErrorMessage()
CRef< CCmdComposite > GetCommand()
void SetEditingType(EEditingType editing_type)
void ChooseFeatureType(objects::CSeqFeatData::ESubtype subtype)
CRef< CCmdComposite > GetCommand()
string GetErrorMessage()
CRef< CCmdComposite > GetCommand()
CRef< CCmdComposite > GetCommand()
string GetErrorMessage()
void Field(const string &value)
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
ncbi::objects::CBioseq_set::EClass GetClass()
static bool RepairXrefs(const CSeq_feat &f, const CTSE_Handle &tse)
Repairs non-reciprocal xref pairs for specified feature if xrefs between subtypes are permitted and f...
Definition: cleanup.cpp:905
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
CRef< CCmdComposite > GetCommand()
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
void AddCommand(IEditCommand &command)
static CIRef< IEditCommand > Create(const objects::CSeq_entry_Handle &seh, const vector< string > &quals)
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(wxWindow *parent, objects::CSeq_entry_Handle seh)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
void ApplyToAllAndDie(bool similar, bool nonfunctional, bool unverified)
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title, string delim_name_value, string delim_fields)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle seh)
static void apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(const TConstScopedObjects &objects, bool to_known, bool adjust_features=false)
CRef< CCmdComposite > GetCommand(objects::CScope &scope, const objects::CBioseq_set &orig, bool &error)
CRef< CCmdComposite > GetCommand()
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, bool capitalize_after_colon)
static void apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, wxWindow *parent)
static void apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, wxWindow *parent)
static CRef< CCmdComposite > GetCreateSeqHistFromTpaCommand(CSeq_entry_Handle tse, string &msg, double word_size, double expect_value)
CRef< CCmdComposite > GetCommand()
Definition: Date.hpp:53
void SetToTime(const CTime &time, EPrecision prec=ePrecision_second)
Definition: Date.cpp:57
@ ePrecision_day
Definition: Date.hpp:58
CDebugMacroTool.
virtual void SetRegistryPath(const string &path)
Definition: dialog.cpp:59
static CDiscrepancyDlg * OpenDiscrepancyDlg(EReportType type, CScope &scope, IWorkbench *workbench, const wxString &workDir=wxEmptyString)
std::function< void()> m_f
CDoOnIdleTask(std::function< void()> f)
virtual IAppTask::ETaskState x_Run()
override this function in derived classes
CRef< CCmdComposite > GetCommand(void)
CRef< CCmdComposite > GetCommand()
void SetEditorWindow(wxWindow *editorWindow)
void SetEditor(CIRef< IEditObject > editor)
virtual void SetWorkDir(const wxString &workDir)
virtual void SetUndoManager(ICommandProccessor *cmdProccessor)
static CRef< CCmdComposite > apply(const TConstScopedObjects &objects)
CRef< CCmdComposite > GetCommand()
CRef< CCmdComposite > GetRemoveOriginalIdCommand(void)
virtual CRef< CCmdComposite > GetCommand(void)
CRef< CCmdComposite > GetCommand()
static void GetInstance(wxWindow *parent, IWorkbench *workbench, bool autostart=false, wxWindowID id=10020, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(600, 400), long style=wxDEFAULT_FRAME_STYLE)
CEventHandler.
CEvent - generic event implementation TODO TODO - Attachments.
Definition: event.hpp:86
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle tse)
Definition: expand_gaps.cpp:64
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle tse)
void SaveTable(const wxString &workDir=wxEmptyString)
static void RemoveEmptyColsAndRows(CRef< CSeq_table > values_table)
static CRef< CCmdComposite > ExtendCDS(CSeq_entry_Handle seh)
CExtensionDeclaration - static declaration helper.
CRef< CCmdComposite > GetCommand()
CFeat_CI –.
Definition: feat_ci.hpp:64
void SetWorkDir(const wxString &workDir)
static wxString GetDialogFilter(EFileType fileType)
CFile –.
Definition: ncbifile.hpp:1604
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand()
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse, bool before_punct=false, bool before_cap=false, bool before_num=false, bool rm_commas=false, bool keep_last=false)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle seh)
CGBDocument.
Definition: document.hpp:113
wxString GetWorkDir() const
Definition: document.cpp:1364
CUndoManager & GetUndoManager()
Definition: document.hpp:158
virtual CScope * GetScope() const
@Gb_qual.hpp User-defined methods of the data storage class.
Definition: Gb_qual.hpp:61
static CRef< CCmdComposite > GetCommand(CSeq_entry_Handle seh)
static CRef< CCmdComposite > GetCommand(CSeq_entry_Handle seh)
void SetText(const wxString &text)
void SetRefresh(IRefreshCntrl *refresh)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse)
static void apply(IWorkbench *wb, ICommandProccessor *cmd_processor, CScope &scope)
CRegistryWriteView GetWriteView(const string &section)
get a read-write view at a particular level.
Definition: registry.cpp:462
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:400
CRegistryReadView GetReadView(const string &section) const
get a read-only view at a particular level.
Definition: registry.cpp:428
HTTP response.
CIRef< IEditCommand > ImportFeaturesFromClipboard(const wxString &workDir)
CIRef< IEditCommand > ImportFeaturesFromFile(const wxString &workDir=wxEmptyString, const string &format_id=kEmptyStr)
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title, wxWindow *parent)
Definition: label_rna.cpp:105
CRef< CCmdComposite > GetCommand()
string GetErrorMessage()
static CRef< CCmdComposite > apply(wxWindow *parent, CScope &scope, bool history_takeover)
static CRef< CCmdComposite > apply(wxWindow *parent, const wxString &cwd, objects::CSeq_entry_Handle tse)
CLoaderDescriptor –.
void RestoreFile(bool convert=false)
static CMacroFlowEditor * GetInstance(wxWindow *parent, CRef< IGuiCoreHelper > gui_core_helper, wxWindowID id=15000, const wxString &caption=_("Macro Flow Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(1500, 1000), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX)
void MakeTable(const objects::CSeq_entry_Handle &seh)
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CObject > GetNewObject(CConstRef< CObject > obj)
CRef< CCmdComposite > GetReplacementCommand(CConstRef< CObject >, CRef< CObject > newobj, objects::CScope &scope, const string &cmd_name)
vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
CRef< CCmdComposite > GetCommand()
virtual CRef< CCmdComposite > GetCommand(void)
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, const string &title)
CRef< CCmdComposite > GetCommand()
static CNcbiApplication * Instance(void)
Singleton method.
Definition: ncbiapp.cpp:264
static bool AddObjects(IServiceLocator *serviceLocator, IObjectLoader::TObjects &objects, objects::CLoaderDescriptor *loader, CSelectProjectOptions &options, const map< string, string > &projectItemExtra=map< string, string >())
CObject –.
Definition: ncbiobj.hpp:180
IObjectLoader * GetObjectLoader()
void SetManagers(vector< CIRef< IOpenObjectsPanelClient > > &managers)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
static CRef< CCmdComposite > apply(CSeq_entry_Handle seh)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, bool monthFirst)
void SetFromFieldType(EFieldType field_type)
void SetToFieldType(EFieldType field_type)
CRef< CCmdComposite > GetCommand()
void SetParams(SAutodefParams *params)
CProjectService - a service providing API for operations with Workspaces and Projects.
static CRef< CCmdComposite > GetPropagateDownCommand(objects::CSeq_entry_Handle seh)
@Pubdesc.hpp User-defined methods of the data storage class.
Definition: Pubdesc.hpp:54
CTableFileLoadManager.
virtual void SetFilenames(const vector< wxString > &filenames)
initilize the manager with the given filenames
virtual void SetServiceLocator(IServiceLocator *srv_locator)
Sets / unsets Service Locator.
CAttribTableColumnIdPanel * x_GetColumnIdPanel()
void SetTopLevelEntry(CSeq_entry_Handle seq_entry)
void apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
static void DeltaSeqToRaw(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor)
CRef< CCmdComposite > apply(string title)
static CRef< CCmdComposite > ByAssemblyGapFeatures(objects::CSeq_entry_Handle seh)
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
static CRef< CCmdComposite > apply(CSeq_entry_Handle tse, bool update_genes)
CRef –.
Definition: ncbiobj.hpp:618
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
Definition: reg_view.cpp:230
void Set(const string &key, int val)
access a named key at this level, with no recursion
Definition: reg_view.cpp:533
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor)
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
static void rm_dbxref_from_biosource_and_feats(objects::CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void rm_dbxref_from_biosource(objects::CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void rm_dbxref_from_feat(objects::CSeq_entry_Handle seh, objects::CSeqFeatData::E_Choice type, ICommandProccessor *cmd_processor)
static void RemoveDuplicateFeatures(objects::CSeq_entry_Handle tse, ICommandProccessor *processor)
static void RemoveAllFeatures(CSeq_entry_Handle seh, ICommandProccessor *processor)
static CRef< CCmdComposite > RemoveNonsuppressing(CSeq_entry_Handle seh)
static CRef< CCmdComposite > RemoveOrphanLocus_tag(CSeq_entry_Handle seh)
static CRef< CCmdComposite > RemoveAll(CSeq_entry_Handle seh)
static CRef< CCmdComposite > RemoveUnnecessary(CSeq_entry_Handle seh)
static CRef< CCmdComposite > RemoveOrphanLocus(CSeq_entry_Handle seh)
virtual CRef< CCmdComposite > GetCommand(void)
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
static CRef< CCmdComposite > JustRemoveProteins(objects::CSeq_entry_Handle seh)
static CRef< CCmdComposite > OrphanedProteins(objects::CSeq_entry_Handle seh)
static CRef< CCmdComposite > AndRenormalizeNucProtSets(objects::CSeq_entry_Handle seh)
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title, CSeq_annot::C_Data::E_Choice which)
static void ApplyToCSeq_entry(objects::CSeq_entry_Handle tse, CCmdComposite *composite, const vector< string > &names)
static CRef< CCmdComposite > GetCommand(CSeq_entry_Handle tse)
CRef< CCmdComposite > GetRemoveOriginalIdCommand()
CRef< CCmdComposite > GetCommand()
static void remove_set(IWorkbench *wb)
Definition: remove_set.cpp:129
static void remove_sets_from_set(IWorkbench *wb)
Definition: remove_set.cpp:167
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
static void rm_taxon_from_feats_and_biosource(objects::CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void rm_taxon_from_feats(objects::CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle tse)
static void apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor)
CRef< CCmdComposite > Apply(objects::CSeq_entry_Handle tse)
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
static CRef< CCmdComposite > ReorderById(objects::CSeq_entry_Handle seh)
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, const string &title)
virtual bool Show(bool show=1)
Report opening events in dialogs used in the editing package.
static CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle seh, string title, ERetranslateMethod method, string &error)
void apply(objects::CSeq_entry_Handle seh, ICommandProccessor *cmdProcessor, string title, ERetranslateMethod method)
void apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title, bool update_seq, bool update_feat, bool update_graph)
CRef< CCmdComposite > GetCommand()
CScope –.
Definition: scope.hpp:92
CProjectSelectOptions - describes how new Project Items shall be added to a workspace.
void Set_CreateNewProject(const string &folder=kEmptyStr)
CSelectionEvent CSelectionEvent is used for broadcasting selection between views.
Definition: obj_event.hpp:68
bool AddObjectSelection(const CObject &obj)
Definition: obj_event.cpp:177
virtual void GetActiveObjects(TConstScopedObjects &sel)
returns objects currently active in the application, this function should be used for obtaining argum...
virtual void Broadcast(CSelectionEvent &evt, ISelectionClient *source)
request broadcasting of the given event, Broadcast() notifies observers about changes in selection (d...
Declare the Package Object.
virtual const SwxMenuItemRec * GetMenuDef() const
simpler way to provide a static menu using macros defined earlier in this file
IWorkbench * m_Workbench
virtual string GetName() const
virtual bool Init()
void x_UpdateValAuxFile(const string &fname) const
virtual void GetVersion(size_t &verMajor, size_t &verMinor, size_t &verPatch) const
virtual wxEvtHandler * GetEventHandler()
returns a handler which processes commands from the set above not needed for views
virtual vector< CUICommand * > GetCommands()
returns a vector of commands (takes ownership over CUICommand pointers)
virtual void Shut()
virtual void SetWorkbench(IWorkbench *wb)
static EFeatureLocationAllowed AllowedFeatureLocation(ESubtype subtype)
@ eFeatureLocationAllowed_NucOnly
@ eFeatureLocationAllowed_ProtOnly
@ eFeatureLocationAllowed_Any
static CTempString SubtypeValueToName(ESubtype eSubtype)
Turns a ESubtype into its string value which is NOT necessarily related to the identifier of the enum...
CSeqFeatXref –.
Definition: SeqFeatXref.hpp:66
void UpdateSingleSequence_Ext(IWorkbench *workbench, const objects::CSeq_entry_Handle &tse, ICommandProccessor *cmdProcessor) const
void SetSeqUpdateType(ESeqUpdateType update_type)
void UpdateMultipleSequences(IWorkbench *workbench, const objects::CSeq_entry_Handle &tse, ICommandProccessor *cmdProcessor)
void UpdateSingleSequence(IWorkbench *workbench, const objects::CSeq_entry_Handle &tse, ICommandProccessor *cmdProcessor) const
CRef< CSeq_loc > CreateRowSeq_loc(TDim row) const
Definition: Seq_align.cpp:2028
TDim CheckNumRows(void) const
Validatiors.
Definition: Seq_align.cpp:73
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
Definition: Seq_align.cpp:317
CSeq_annot_Handle –.
@Seq_descr.hpp User-defined methods of the data storage class.
Definition: Seq_descr.hpp:55
CSeq_entry_CI –.
CSeq_entry_Handle –.
CSeq_entry_Handle –.
Definition: Seq_entry.hpp:56
CSeq_feat_Handle –.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
CSeqdesc_CI –.
Definition: seqdesc_ci.hpp:65
CConstRef< CSeq_submit > m_SeqSubmit
void FocusClear(wxCommandEvent &event)
void ConvertAuthorToConstortiumWhereLastName(wxCommandEvent &event)
void CreateDescriptor(wxCommandEvent &event)
void FixCapitalizationAffiliation(wxCommandEvent &event)
void ApplyStructuredCommentField(wxCommandEvent &evt)
void RemoveUnverified(wxCommandEvent &event)
void AddKeywordTPA_inferential(wxCommandEvent &event)
void Discrepancy(wxCommandEvent &event)
void CorrectGenes(wxCommandEvent &event)
void RemoveSeqAnnotAlign(wxCommandEvent &event)
void RemoveUnnecessaryExceptions(wxCommandEvent &event)
void RawSeqToDeltaByLoc(wxCommandEvent &event)
void RemoveDuplicateStructuredComments(wxCommandEvent &event)
void TruncateCDS(wxCommandEvent &event)
void CountryFixupNoCap(wxCommandEvent &event)
ICommandProccessor * m_CmdProccessor
void ConvertGapsBySize(wxCommandEvent &event)
void RemoveStructuredCommentKeyword(wxCommandEvent &event)
void EditSelectedGaps(wxCommandEvent &event)
void ConvertDescToFeatPub(wxCommandEvent &event)
void ExpandGaps(wxCommandEvent &event)
void AddRNA(wxCommandEvent &event)
void RemoveGenbankSeqIdsFromAll(wxCommandEvent &event)
void BioseqOnlyRevComp(wxCommandEvent &event)
void ExtendPartialsAll(wxCommandEvent &evt)
void EditSeqEndsWithAlign(wxCommandEvent &event)
void VectorTrim(wxCommandEvent &event)
void EditHistory(wxCommandEvent &event)
void PT_Cleanup(wxCommandEvent &event)
void ImportFeatureTableClipboard(wxCommandEvent &event)
void ConvertAuthorToConsortiumAll(wxCommandEvent &event)
void CreateSpecificStructuredComment(wxCommandEvent &event)
void LabelRna(wxCommandEvent &event)
void ExonFromCds(wxCommandEvent &evt)
void RemoveAllFeatures(wxCommandEvent &event)
void RemAllProtTitles(wxCommandEvent &event)
void TrimOrganismNames(wxCommandEvent &event)
void StripAuthorSuffixes(wxCommandEvent &event)
void RemoveGiSeqIdsFromAll(wxCommandEvent &event)
void RemoveDescriptors(wxCommandEvent &evt)
void CreateProteinId(wxCommandEvent &event)
void AddKeywordTPA_assembly(wxCommandEvent &event)
void PackageFeaturesOnParts(wxCommandEvent &event)
void CheckForMixedStrands(wxCommandEvent &event)
void AddKeywordGDS(wxCommandEvent &event)
void LocalToGeneralId(wxCommandEvent &event)
void ConvertAccessionToLocalIdsNuc(wxCommandEvent &event)
void RemoveAllPublications(wxCommandEvent &event)
void AddGenomeAssemblyStructuredComment(wxCommandEvent &event)
void Autodef(wxCommandEvent &event)
void BarcodeTool(wxCommandEvent &event)
void ConvertFeatToDescComment(wxCommandEvent &event)
void BulkEdit(wxCommandEvent &event)
void FixUsaAndStates(wxCommandEvent &event)
void RemoveDupFeatsWithOptions(wxCommandEvent &evt)
void ConvertSetType(wxCommandEvent &event)
void ExplodeRNAFeats(wxCommandEvent &event)
void Validate(wxCommandEvent &event)
void TestDialogView(wxCommandEvent &event)
void RemoveSeqAnnotGraph(wxCommandEvent &event)
void CDSGeneRangeErrorRestore(wxCommandEvent &event)
void RemoveLocalSeqIdsFromProt(wxCommandEvent &event)
void BulkRnaEdit(wxCommandEvent &event)
void UnculTaxTool(wxCommandEvent &event)
void ConvertDescToFeatSource(wxCommandEvent &event)
void RemoveGenomeProjectsDB(wxCommandEvent &event)
void BulkApplyGenCode(wxCommandEvent &event)
void DescriptorPropagateDown(wxCommandEvent &event)
void TestFormView(wxCommandEvent &event)
void Oncaller(wxCommandEvent &event)
void ConsolidateLikeModsWithSemicolon(wxCommandEvent &event)
void MakeBadSpecificHostTable(wxCommandEvent &event)
void RemoveDbXrefsBioSourceAndFeats(wxCommandEvent &evt)
void PropagateDBLink(wxCommandEvent &event)
void Duplicate(wxCommandEvent &event)
void SwapPrimerSeqName(wxCommandEvent &event)
void ReorderStructuredComment(wxCommandEvent &event)
void ResolveIntersectingFeats(wxCommandEvent &evt)
void ApplyRNA_ITS(wxCommandEvent &event)
void GenusSpeciesFixup(wxCommandEvent &event)
void FixStructuredVouchers(wxCommandEvent &event)
void CountryFixupCap(wxCommandEvent &event)
TConstScopedObjects m_SelObjects
void RemoveAllGeneXrefs(wxCommandEvent &event)
void CombineSelectedGenesIntoPseudogenes(wxCommandEvent &evt)
void SelectTarget(wxCommandEvent &event)
void EditFeature(wxCommandEvent &evt)
void AddMicrosatellite(wxCommandEvent &event)
void AddAssemblyStructuredComment(wxCommandEvent &event)
void AdjustForConsensusSpliceSites(wxCommandEvent &event)
void CreateFeature(wxCommandEvent &event)
void LowercaseQuals(wxCommandEvent &event)
void RmCultureNotes(wxCommandEvent &event)
void ConvertFeatToDescSource(wxCommandEvent &event)
void UniqifyFeatureIds(wxCommandEvent &event)
void SuspectProductRulesEditor(wxCommandEvent &event)
void ConvertDescToFeatComment(wxCommandEvent &event)
void SequesterSets(wxCommandEvent &event)
void IsObjectSelected(wxUpdateUIEvent &event)
void FixProductNamesOptions(wxCommandEvent &event)
void RemoveDbXrefsRNA(wxCommandEvent &evt)
void RemoveDbXrefsBioSource(wxCommandEvent &evt)
CSeq_entry_Handle m_TopSeqEntry
void CreateSeqHistForTpaDetailed(wxCommandEvent &event)
void FixForTransSplicing(wxCommandEvent &evt)
void RemoveLocalSeqIdsFromNuc(wxCommandEvent &event)
void ConvertSelectedGapsToKnown(wxCommandEvent &event)
void LoadSecondaryAccessionsHistoryTakeover(wxCommandEvent &event)
void RemoveProteinsAndRenormalizeNucProtSets(wxCommandEvent &event)
void EditSequenceEnds(wxCommandEvent &event)
void ExportTable(wxCommandEvent &event)
void ConvertFeatures(wxCommandEvent &event)
void ConvertDescToSecondProtName(wxCommandEvent &event)
void AddGlobalCodeBreak(wxCommandEvent &event)
void AddControlRegion(wxCommandEvent &event)
void DeleteSpecificStructuredComment(wxCommandEvent &evt)
void RemoveDuplicateGoTerms(wxCommandEvent &evt)
void SplitDblinkQuals(wxCommandEvent &evt)
void RemoveOrphanLocusGeneXrefs(wxCommandEvent &event)
void ConvertCdsWithInternalStopToMiscFeat(wxCommandEvent &evt)
void RemoveSequencesFromAlignments(wxCommandEvent &event)
void RemoveGeneralId(wxCommandEvent &event)
void RemoveTaxonFeatsAndBioSource(wxCommandEvent &event)
void RemoveTextInsideStr(wxCommandEvent &event)
void WrongQualsToNote(wxCommandEvent &event)
void TrimNsRich(wxCommandEvent &event)
void RemoveGeneXrefs(wxCommandEvent &event)
void ConvertAccessionToLocalIdsProt(wxCommandEvent &event)
void EditStructuredCommentPrefixSuffix(wxCommandEvent &evt)
void UpdateSingleSequence(wxCommandEvent &event)
void JustRemoveProteins(wxCommandEvent &event)
void AssignFeatureIds(wxCommandEvent &event)
void ConvertCdsWithInternalStopToMiscFeatUnverified(wxCommandEvent &evt)
void AddStrainSerotypeToNames(wxCommandEvent &event)
void FixCapitalizationAuthors(wxCommandEvent &event)
void RemoveSet(wxCommandEvent &event)
void RemoveSequences(wxCommandEvent &event)
void ViewSortedProteins(wxCommandEvent &event)
void ExportStructuredCommentsTable(wxCommandEvent &evt)
void ExonFromMRNA(wxCommandEvent &evt)
void CompareWithBiosample(wxCommandEvent &event)
void CDSGeneRangeErrorSuppress(wxCommandEvent &event)
void CreateSeqHistForTpa(wxCommandEvent &event)
void ShowFeatureTable(wxCommandEvent &event)
void UpdateTargetedLocusName(wxCommandEvent &evt)
void tRNAFromGene(wxCommandEvent &evt)
void GroupExplode(wxCommandEvent &event)
void BioseqFeatsRevComp(wxCommandEvent &event)
void FixCapitalizationCountry(wxCommandEvent &event)
void GeneFromOtherFeat(wxCommandEvent &evt)
void FixupOrganismNames(wxCommandEvent &event)
void x_OnSelectionEvent(CEvent *event)
void SplitPrimerSets(wxCommandEvent &event)
void RemoveSegGaps(wxCommandEvent &event)
void TruncateAuthorMiddleInitials(wxCommandEvent &event)
void LoadSecondaryAccessions(wxCommandEvent &event)
void RmWrongQuals(wxCommandEvent &event)
void EditCdsFrame(wxCommandEvent &event)
void FindASN1(wxCommandEvent &evt)
void RemoveCddFeatDbxref(wxCommandEvent &event)
void DiscrepancyList(wxCommandEvent &event)
void TaxFixCleanup(wxCommandEvent &event)
void IsHupIdEnabled(wxUpdateUIEvent &event)
void FuseFeatures(wxCommandEvent &evt)
void RemoveUnpublishedPublications(wxCommandEvent &event)
void AddCitSubForUpdate(wxCommandEvent &event)
void AppendModToOrg(wxCommandEvent &event)
void BulkMiscFeatEdit(wxCommandEvent &event)
void RemoveOrphanLocus_tagGeneXrefs(wxCommandEvent &event)
void RawSeqToDeltaByAssemblyGapFeatures(wxCommandEvent &event)
void ConvertAccessionToLocalIdsAll(wxCommandEvent &event)
void TableReader(wxCommandEvent &event)
void AddCDS(wxCommandEvent &event)
void NormalizeGeneQuals(wxCommandEvent &event)
void PrefixDefLines(wxCommandEvent &event)
void RawSeqToDeltaByNs(wxCommandEvent &event)
void DisableStrainForwarding(wxCommandEvent &event)
void IndexerTypeSelection(wxCommandEvent &event)
void UpdateMultipleSequences(wxCommandEvent &event)
void RemoveOrphanedProteins(wxCommandEvent &event)
void x_SetUpTSEandUnDoManager(IWorkbench *wb)
void RestoreRNAediting(wxCommandEvent &event)
void RmIllegalQuals(wxCommandEvent &event)
void RestoreLocalFile(wxCommandEvent &event)
void ConvertFeatsToGaps(wxCommandEvent &event)
vector< CRef< CSeq_loc > > m_CachedSelectedLocations
CSeq_align::TDim x_FindRelevantAlignRow(const CSeq_align &align, const CSeq_id *id)
CRef< CProjectItem > CreateSeqSubmit(CRef< CGBProjectHandle > ph, CRef< CProjectItem > pi, CIRef< CProjectService > srv)
void TableReaderClipboard(wxCommandEvent &event)
void Mega(wxCommandEvent &event)
void ExonFromTRNA(wxCommandEvent &evt)
void SplitQualifiersAtCommas(wxCommandEvent &event)
void EditingButtons(wxCommandEvent &event)
void GeneXrefsFromFeats(wxCommandEvent &event)
void ReorderSeqById(wxCommandEvent &event)
void ConvertSelectedGapsToUnknown(wxCommandEvent &event)
void SplitCDSwithTooManyXs(wxCommandEvent &event)
void ParseCollectionDateDayFirst(wxCommandEvent &event)
void EditSequence(wxCommandEvent &event)
void SpecificHostCleanup(wxCommandEvent &event)
void RemoveTaxonFeats(wxCommandEvent &event)
void PrefixAuthWithTax(wxCommandEvent &event)
void CreateRegulatory(wxCommandEvent &evt)
void ImportFeatureTable(wxCommandEvent &event)
void ConvertAccessionToLocalIdsName(wxCommandEvent &event)
void RemoveUnreviewed(wxCommandEvent &event)
void SortUniqueCountTree(wxCommandEvent &event)
void ExtendPartialsConstr(wxCommandEvent &evt)
void AddSecondary(wxCommandEvent &event)
void MergePrimerSets(wxCommandEvent &event)
void FixCapitalizationAll(wxCommandEvent &event)
void ConvertToDelayedGenProdSetQuals(wxCommandEvent &event)
void RemoveSeqHistAssembly(wxCommandEvent &event)
void AddKeywordWithConstraint(wxCommandEvent &event)
void RemoveDbXrefsAllFeats(wxCommandEvent &evt)
void RemoveInPressPublications(wxCommandEvent &event)
void AddFluComments(wxCommandEvent &event)
CSequenceEditingEventHandler(IWorkbench *wb=NULL)
void SetGlobalRefGeneStatus(wxCommandEvent &event)
void RemoveNonsuppressingGeneXrefs(wxCommandEvent &event)
void DeltaSeqToRaw(wxCommandEvent &event)
void ConvertDescToFeatPubConstraint(wxCommandEvent &event)
void ClearNomenclature(wxCommandEvent &event)
void AddDefLine(wxCommandEvent &evt)
void FixCapitalizationTitles(wxCommandEvent &event)
void Submitter(wxCommandEvent &event)
void AddNamedrRNA(wxCommandEvent &event)
void EnableHupId(wxCommandEvent &event)
void BulkGeneEdit(wxCommandEvent &event)
void RemoveBankitComment(wxCommandEvent &event)
void MolInfoEdit(wxCommandEvent &event)
void RemovePublishedPublications(wxCommandEvent &event)
void RemoveEmptyGenomeProjectsDB(wxCommandEvent &event)
void RemoveSetsFromSet(wxCommandEvent &event)
void UpdateAlign(wxCommandEvent &event)
void RemoveFeatures(wxCommandEvent &evt)
void ListMacroButtonNames(wxCommandEvent &event)
void EditPubs(wxCommandEvent &event)
void RemoveDupFeats(wxCommandEvent &evt)
void AddSet(wxCommandEvent &event)
void LoadSettings(const string &regpath, wxWindow *dlg)
void ConsolidateLikeModsWithoutSemicolon(wxCommandEvent &event)
void EnableStrainForwarding(wxCommandEvent &event)
void ReverseAuthorNames(wxCommandEvent &event)
vector< CRef< CSeq_loc > > & x_GetSelectedLocations()
void TrimJunkInPrimerSeqs(wxCommandEvent &event)
void ApplyFBOL(wxCommandEvent &event)
void AdjustCDSForIntrons(wxCommandEvent &event)
void ConvertSecondProtNameToDesc(wxCommandEvent &event)
void ConvertCdsWithGapsToMiscFeat(wxCommandEvent &evt)
void ReassignFeatureIds(wxCommandEvent &event)
void ConvertBadCdsAndRnaToMiscFeat(wxCommandEvent &event)
void ApplyEditConvertRemove(wxCommandEvent &event)
void RecomputeIntervals(wxCommandEvent &event)
void CountryConflict(wxCommandEvent &event)
void SegregateSets(wxCommandEvent &event)
void Help(wxCommandEvent &evt)
void RemoveUnindexedFeatures(wxCommandEvent &event)
void LinkmRNACDS(wxCommandEvent &event)
void SelectFeature(wxCommandEvent &event)
void BulkCdsEdit(wxCommandEvent &event)
void RemoveLocalSeqIdsFromAll(wxCommandEvent &event)
void AdjustrRNAForIntrons(wxCommandEvent &event)
void GlobalPubmedIdLookup(wxCommandEvent &event)
void ShowAfter(wxWindow *dlg)
void ClearKeywords(wxCommandEvent &event)
void ExtendCDS(wxCommandEvent &event)
void MacroEditor(wxCommandEvent &event)
void ParseCollectionDateMonthFirst(wxCommandEvent &event)
void FixNonReciprocalLinks(wxCommandEvent &event)
void ParseComment(wxCommandEvent &event)
void PrepareSeqSubmit(wxCommandEvent &event)
void ResynchronizePartials(wxCommandEvent &event)
void SaveASN1File(wxCommandEvent &event)
void AddTranslExcept(wxCommandEvent &event)
void CdsFromGeneMrnaExon(wxCommandEvent &evt)
void ConvertRptUnitRangeToLoc(wxCommandEvent &event)
void RemoveDbXrefsGenes(wxCommandEvent &evt)
void AddSequences(wxCommandEvent &event)
void ImportGFF3(wxCommandEvent &event)
void RemoveDbXrefsCDS(wxCommandEvent &evt)
void SortUniqueCount(wxCommandEvent &event)
void SaveDescriptors(wxCommandEvent &event)
void CdsToMatPeptide(wxCommandEvent &event)
void CorrectIntervalOrder(wxCommandEvent &event)
void AdjusttRNAForIntrons(wxCommandEvent &event)
void SaveSubmissionFile(wxCommandEvent &event)
void RemoveCollidingPublications(wxCommandEvent &event)
void RemoveEmptyStructuredComments(wxCommandEvent &event)
void ModifyStructuredComment(wxCommandEvent &event)
void FixProductNamesDefault(wxCommandEvent &event)
void AddStructuredCommentKeyword(wxCommandEvent &event)
void GeneralToLocalId(wxCommandEvent &event)
void GeneFeatFromXrefs(wxCommandEvent &event)
void RemoveUnnecessaryGeneXrefs(wxCommandEvent &event)
void LoadStructComments(wxCommandEvent &event)
void AddOtherFeature(wxCommandEvent &event)
void ConvertFeatToDescPub(wxCommandEvent &event)
void ParseText(wxCommandEvent &event)
void RemoveGenbankSeqIdsFromProt(wxCommandEvent &event)
void CreateLocusTagGene(wxCommandEvent &event)
void MergeBiosources(wxCommandEvent &event)
void WithdrawSequences(wxCommandEvent &event)
void SaveSettings(const string &regpath, wxWindow *dlg) const
void EditSeqId(wxCommandEvent &event)
void FocusSet(wxCommandEvent &event)
void SetTransgSrcDesc(wxCommandEvent &event)
void ClearFeatureIds(wxCommandEvent &event)
void ConvertCdsWithInternalStopToMiscFeatViral(wxCommandEvent &evt)
void ConvertComment(wxCommandEvent &event)
void ItemAction(wxCommandEvent &event, CRef< CItem > item, const string &title)
void RemoveAuthorConsortiums(wxCommandEvent &event)
void AlignmentAssistant(wxCommandEvent &event)
void FixiInPrimerSeqs(wxCommandEvent &event)
void ConvertCdsToMiscFeat(wxCommandEvent &evt)
void CreateGapFeats(wxCommandEvent &event)
void FuseJoinsInLocs(wxCommandEvent &event)
void ConvertBadInference(wxCommandEvent &event)
void AdjustmRNAForIntrons(wxCommandEvent &event)
void TrimNsTerminal(wxCommandEvent &event)
void SuppressGenes(wxCommandEvent &evt)
void RemProtTitles(wxCommandEvent &event)
void CompareWithBiosampleFirstOnly(wxCommandEvent &event)
void AddKeywordTPA_experimental(wxCommandEvent &event)
void AddLinkageToGaps(wxCommandEvent &event)
void ParseStrainSerotypeFromNames(wxCommandEvent &event)
void RecomputeIntervalsAndUpdateGenes(wxCommandEvent &event)
void ExtendCDSToStop(wxCommandEvent &event)
void CorrectRNAStrand(wxCommandEvent &event)
void RevCompSequences(wxCommandEvent &event)
void AdjustFeaturesForGaps(wxCommandEvent &event)
void RemoveSeqIdNamesFromProtFeats(wxCommandEvent &event)
void CombineAdjacentGaps(wxCommandEvent &event)
void FixOrgModInstitution(wxCommandEvent &event)
void LatLonTool(wxCommandEvent &event)
void RemoveSeqAnnotIds(wxCommandEvent &event)
void FarPointerSeq(wxCommandEvent &event)
CRef< CSeq_loc > GetFeatureLocation(CSeqFeatData::ESubtype subtype)
bool x_IsLocationOkForFeatCmd(CSeqFeatData::ESubtype subtype, CRef< CSeq_loc > loc)
void mRNAFromGeneCdsExon(wxCommandEvent &evt)
void RemoveAllStructuredComments(wxCommandEvent &event)
void SplitStructuredCollections(wxCommandEvent &event)
void IllegalQualsToNote(wxCommandEvent &event)
void ApplyIndexerComments(wxCommandEvent &evt)
void Update_Replaced_EC_numbers(wxCommandEvent &event)
void IsLocationSelected(wxUpdateUIEvent &event)
void RetranslateCDS(wxCommandEvent &event)
void AddFeatureBetween(wxCommandEvent &event)
CSequinDesktopViewFactory.
CRef< CCmdComposite > GetCommand()
static CIRef< IProjectView > CreateView(const string &viewName, FWindowFactory widgetFactory, IServiceLocator *serviceLocator, TConstScopedObjects &objects, ISimpleProjectViewCmdHandler *cmdHandler=0, bool bFloat=false)
static CRef< CCmdComposite > apply(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, const string &title)
static CSubmissionWizard * GetInstance(wxWindow *parent, IWorkbench *wb, CRef< CGBProjectHandle > ph, CRef< CProjectItem > pi, wxWindowID id=ID_CSUBMISSIONWIZARD, const wxString &caption=_("Submission Wizard"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(650, 548), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX)
CSubmit_block –.
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
static wxString ResolvePath(const wxString &path, const wxString &rel_name)
Utility function to hide the platform specifics of locating our standard directories and files.
Definition: sys_path.cpp:106
static wxString ResolvePathExisting(const wxString &path, const wxString &delim=wxT(","))
Utility function to hide the platform specifics of locating our standard directories.
Definition: sys_path.cpp:142
static void SetDoInference(objects::CUser_object &params, bool val)
static void SetDoAlignment(objects::CUser_object &params, bool val)
static wxWindow * CreateDialog(wxWindow *parent)
static wxWindow * CreateForm(wxWindow *parent)
Definition: text_panel.cpp:197
CTmpFile –.
Definition: ncbifile.hpp:2352
bool apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title, wxWindow *parent, const wxString &workDir, const CSequenceAmbigTrimmer::TTrimRuleVec &trim_rules=CSequenceAmbigTrimmer::GetDefaultTrimRules())
Definition: trim_n.cpp:50
CRef< CCmdComposite > GetCommand()
CUICommand.
Definition: ui_command.hpp:79
bool apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
void apply(objects::CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, wxWindow *parent)
void apply(CSeq_entry_Handle tse, ICommandProccessor *cmdProcessor, string title)
CUrl –.
Definition: ncbi_url.hpp:353
const CUser_field & GetField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Access a named field in this user field.
Definition: User_field.cpp:211
void SetObjectType(EObjectType obj_type)
@ eObjectType_StructuredComment
static void GetInstance(wxWindow *parent, IWorkbench *workbench, CRef< objects::CUser_object > params, wxWindowID id=17000, const wxString &caption=_("Validation Errors"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(900, 600), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
CRef< CCmdComposite > GetCommand()
vector< string > GetNames()
CWorkbench - default implementation of IWorkbench.
static void RmWrongQuals(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void IllegalQualsToNote(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void WrongQualsToNote(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
static void RmIllegalQuals(CSeq_entry_Handle seh, ICommandProccessor *cmd_processor)
void LinkByOverlap(ICommandProccessor *cmdProcessor)
void CompleteHalfFormedXrefPairs(ICommandProccessor *cmdProcessor)
void LinkSelectedFeatures(TConstScopedObjects &objects, ICommandProccessor *cmdProcessor)
void LinkByLabelAndLocation(ICommandProccessor *cmdProcessor)
void LinkByLabel(ICommandProccessor *cmdProcessor)
void LinkByProduct(ICommandProccessor *cmdProcessor)
vector< CConstRef< CObject > > GetReferencedmRNA_CDS(TConstScopedObjects &objects)
returns the pair of cross-referenced mRNA and CDS features, when one of them is selected
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
virtual bool PreExecute()=0
virtual bool PostExecute()=0
virtual string GetFileLoaderId() const =0
TODO - Document.
Definition: gui_package.hpp:54
IMenuContributor - contributes menu to Menu Service.
Definition: ui_command.hpp:371
class IProjectView defines the abstract interface for views observing projects.
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, CConstRef< objects::CSeq_submit > submit=CConstRef< objects::CSeq_submit >(nullptr))
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse)
IUICommandContributor - contributes commands to the common command space.
Definition: ui_command.hpp:351
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
Definition: svg.hpp:432
unsigned int m_MiscFeatRule
CRef< CCmdComposite > GetCommand()
void SetWorkDir(const wxString &workDir)
Definition: svg.hpp:498
Definition: map.hpp:338
#define _(proto)
Definition: ct_nlmzip_i.h:78
const char * file_name[]
static void Normalize(CPub &pub)
std::ofstream out("events_result.xml")
main entry point for tests
CRef< CCmdComposite > CreateControlRegion(objects::CSeq_entry_Handle entry)
CRef< CCmdComposite > AddNamedrRna(objects::CSeq_entry_Handle entry, string rna_name, bool ispartial5, bool ispartial3)
CRef< CCmdComposite > CreateMicrosatellite(objects::CSeq_entry_Handle entry)
const char * kStructCommDBName
const char * kGenbankBlockKeyword
const char * kSequenceIdColLabel
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
static void cleanup(void)
Definition: ct_dynamic.c:30
static CS_COMMAND * cmd2
Definition: ct_dynamic.c:27
static const struct name_t names[]
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
static int type
Definition: getdata.c:31
char data[12]
Definition: iconv.c:80
void GetGBenchVersionInfo(size_t &ver_major, size_t &ver_minor, size_t &ver_patch_level, CTime &build_date)
CRange< Position > Map(const CRange< Position > &target, const CRange< Position > &range)
Definition: blast_aux.cpp:826
CNcbiEnvironment & SetEnvironment(void)
Get a non-const copy of the application's cached environment.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
#define NULL
Definition: ncbistd.hpp:225
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
Definition: ncbiexpt.cpp:342
void Info(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1185
virtual bool Remove(TRemoveFlags flags=eRecursive) const
Remove a directory entry.
Definition: ncbifile.cpp:2595
bool IsFile(EFollowLinks follow=eFollowLinks) const
Check whether a directory entry is a file.
Definition: ncbifile.hpp:3940
virtual bool Exists(void) const
Check existence of file.
Definition: ncbifile.hpp:4038
@ eIfExists_ReturnCurrent
Return reference to current stream, create new one if it does not exists yet.
Definition: ncbifile.hpp:2383
@ eNoRemove
Do not remove file.
Definition: ncbifile.hpp:2357
virtual wxFrame * GetMainWindow()=0
returns a pointer to the main application frame window
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
Definition: service.hpp:91
#define NCBI_PACKAGEENTRYPOINT_EXPORT
Definition: gui_package.hpp:45
void AddTask(IAppTask &task)
Add a task to the queue.
virtual wxFrame * GetMainWindow()
returns a pointer to the main application frame window
ETaskState
List of task states defining the task management FSM.
Definition: app_task.hpp:87
@ eCompleted
successfully finished
Definition: app_task.hpp:92
const float pi
Definition: math.hpp:54
objects::CSeq_entry_Handle GetTopSeqEntryFromScopedObject(SConstScopedObject &obj)
Definition: utils.cpp:2542
static bool IsVDBAccession(const string &acc)
Check if string starts with ("SRA", "SRR", "DRR", "ERR")
Definition: utils.cpp:887
objects::CSeq_entry_Handle GetSeqEntryForPubdesc(CRef< objects::CScope > scope, const objects::CPubdesc &pubdesc)
virtual void RemoveListener(CEventHandler *listener)
Remove a listener.
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
Definition: label.cpp:140
void GetExtensionAsInterface(const string &ext_point_id, vector< CIRef< I > > &interfaces)
GetExtensionAsInterface() is a helper function that extracts all extensions implementing the specifie...
void NcbiErrorBox(const string &message, const string &title="Error")
specialized Message Box function for reporting critical errors
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
Definition: message_box.cpp:48
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
static Uint8 GetRemoteFileSize(const string &url)
Returns the size of the remote file.
Definition: url_utils.cpp:133
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
@ eDefault
Definition: label.hpp:73
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define MSerial_AsnText
I/O stream manipulators –.
Definition: serialbase.hpp:696
CNcbiIstream & ContentStream(void) const
Get input stream.
int GetStatusCode(void) const
Get response status code.
bool CanGetContentStream(void) const
Check if the requested content can be read from the content stream.
CHttpResponse g_HttpGet(const CUrl &url, const CHttpParam &param)
Shortcut for GET request.
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
Definition: Seq_id.cpp:2145
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
Definition: Seq_id.cpp:318
CConstRef< CSeq_id > GetSeqId(void) const
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
Definition: Seq_id.hpp:1065
@ fParse_Default
By default in ParseIDs and IsValid, allow raw parsable non-numeric accessions and plausible local acc...
Definition: Seq_id.hpp:102
@ eContent
Untagged human-readable accession or the like.
Definition: Seq_id.hpp:605
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
Definition: Seq_loc.cpp:337
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
Definition: Seq_loc.cpp:915
void SetInt(TInt &v)
Definition: Seq_loc.hpp:983
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
Definition: Seq_loc.cpp:3280
void SetPartialStop(bool val, ESeqLocExtremes ext)
Definition: Seq_loc.cpp:3313
@ fMerge_SingleRange
Definition: Seq_loc.hpp:332
bool AdjustFeaturePartialFlagForLocation(CSeq_feat &new_feat)
AdjustFeaturePartialFlagForLocation A function to ensure that Seq-feat.partial is set if either end o...
Definition: feature.cpp:3983
CMappedFeat GetBestOverlappingFeat(const CMappedFeat &feat, CSeqFeatData::ESubtype need_subtype, sequence::EOverlapType overlap_type, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0)
Definition: feature.cpp:3653
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
sequence::ECompare Compare(const CSeq_loc &loc1, const CSeq_loc &loc2, CScope *scope)
Returns the sequence::ECompare containment relationship between CSeq_locs.
CRef< CSeq_loc > Seq_loc_Merge(const CSeq_loc &loc, CSeq_loc::TOpFlags flags, CScope *scope)
Merge ranges in the seq-loc.
@ eOverlap_Simple
any overlap of extremes
@ eOverlap_Contained
2nd contained within 1st extremes
CConstRef< CSeq_feat > GetOverlappingCDS(const CSeq_loc &loc, CScope &scope)
Definition: sequence.cpp:1579
vector< STrimRule > TTrimRuleVec
Multiple STrimRules are allowed, which are applied from smallest bases_to_check to largest bases_to_c...
Definition: sequence.hpp:1322
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
Definition: sequence.hpp:101
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
Definition: scope.cpp:522
CSeq_entry_Handle GetSeq_entryHandle(CDataLoader *loader, const TBlobId &blob_id, EMissing action=eMissing_Default)
Get Seq-entry handle by its blob-id, with possible loading.
Definition: scope.cpp:113
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
Definition: scope.cpp:504
void GetAllTSEs(TTSE_Handles &tses, enum ETSEKind kind=eManualTSEs)
Definition: scope.cpp:295
CSeq_feat_Handle GetSeq_featHandle(const CSeq_feat &feat, EMissing action=eMissing_Default)
Definition: scope.cpp:200
vector< CSeq_entry_Handle > TTSE_Handles
Definition: scope.hpp:645
@ eAllTSEs
Definition: scope.hpp:643
@ eMissing_Null
Definition: scope.hpp:157
const CSeq_annot_Handle & GetAnnot(void) const
Get handle to seq-annot for this feature.
TSet GetSet(void) const
bool IsAa(void) const
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
TSet ConvertSeqToSet(TClass set_class=CBioseq_set::eClass_not_set) const
Convert the entry from Bioseq to Bioseq-set.
CConstRef< CBioseq_set > GetCompleteBioseq_set(void) const
Return the complete bioseq-set object.
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
TInst_Length GetInst_Length(void) const
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
CScope & GetScope(void) const
Get scope this handle belongs to.
bool IsSet(void) const
CRef< CSeq_loc > GetRangeSeq_loc(TSeqPos start, TSeqPos stop, ENa_strand strand=eNa_strand_unknown) const
Return CSeq_loc referencing the given range and strand on the bioseq If start == 0,...
CConstRef< TObject > GetCompleteObject(void) const
void Reset(void)
Reset handle and make it not to point to any seq-entry.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
const TId & GetId(void) const
bool IsSeq(void) const
const CSeq_align & GetOriginalSeq_align(void) const
Get original alignment.
Definition: align_ci.cpp:225
CSeq_align_Handle GetSeq_align_Handle(void) const
Get original alignment handle.
Definition: align_ci.cpp:233
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Definition: seqdesc_ci.cpp:326
@ fIncludeGivenEntry
Include the top (given) entry.
@ fRecursive
Iterate recursively.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:1684
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:1439
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
TObjectType * GetPointerOrNull(void) THROWS_NONE
Get pointer value.
Definition: ncbiobj.hpp:986
TObjectType & GetNCObject(void) const
Get object.
Definition: ncbiobj.hpp:1187
uint64_t Uint8
8-byte (64-bit) unsigned integer
Definition: ncbitype.h:105
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
Definition: ncbistre.hpp:500
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
Definition: ncbistre.hpp:146
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
Definition: ncbistre.hpp:439
bool NcbiStreamCopy(CNcbiOstream &os, CNcbiIstream &is)
Copy the entire contents of stream "is" to stream "os".
Definition: ncbistre.cpp:211
#define kEmptyStr
Definition: ncbistr.hpp:123
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
Definition: ncbistr.hpp:5430
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5084
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
Definition: ncbistr.hpp:2697
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5412
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
@ eNocase
Case insensitive compare.
Definition: ncbistr.hpp:1206
CTime CurrentTime(CTime::ETimeZone tz=CTime::eLocal, CTime::ETimeZonePrecision tzp=CTime::eTZPrecisionDefault)
Definition: ncbitime.hpp:2185
static const char label[]
void SetName(TName &value)
Assign a value to Name data member.
Definition: Author_.cpp:81
bool IsSetDate(void) const
replaces imp, will become required Check if a value has been assigned to Date data member.
Definition: Cit_sub_.hpp:443
TDescr & SetDescr(void)
Assign a value to Descr data member.
void SetLabel(const TLabel &value)
Assign a value to Label data member.
void SetItem(TItem &value)
Assign a value to Item data member.
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
Definition: Object_id_.hpp:291
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
const TData & GetData(void) const
Get the Data member data.
bool IsStr(void) const
Check if variant Str is selected.
TData & SetData(void)
Assign a value to Data data member.
const TStr & GetStr(void) const
Get the variant data.
Definition: Object_id_.hpp:297
void SetLabel(TLabel &value)
Assign a value to Label data member.
void SetType(TType &value)
Assign a value to Type data member.
void SetData(TData &value)
Assign a value to Data data member.
const TType & GetType(void) const
Get the Type member data.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
vector< CRef< CUser_field > > TData
@ eSubtype_cultivar
Definition: OrgMod_.hpp:93
@ eSubtype_strain
Definition: OrgMod_.hpp:85
@ eSubtype_isolate
Definition: OrgMod_.hpp:100
void SetHeader(THeader &value)
Assign a value to Header data member.
vector< CRef< CSeqTable_column > > TColumns
Definition: Seq_table_.hpp:92
void SetData(TData &value)
Assign a value to Data data member.
bool IsSpliced(void) const
Check if variant Spliced is selected.
Definition: Seq_align_.hpp:778
const TSegs & GetSegs(void) const
Get the Segs member data.
Definition: Seq_align_.hpp:921
TXref & SetXref(void)
Assign a value to Xref data member.
Definition: Seq_feat_.hpp:1314
void SetQual(const TQual &value)
Assign a value to Qual data member.
Definition: Gb_qual_.hpp:221
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
Definition: Seq_feat_.hpp:913
void SetLocation(TLocation &value)
Assign a value to Location data member.
Definition: Seq_feat_.cpp:131
void SetComment(const TComment &value)
Assign a value to Comment data member.
Definition: Seq_feat_.hpp:1058
void SetPartial(TPartial value)
Assign a value to Partial data member.
Definition: Seq_feat_.hpp:971
const TLocation & GetLocation(void) const
Get the Location member data.
Definition: Seq_feat_.hpp:1117
bool IsGene(void) const
Check if variant Gene is selected.
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_feat_.hpp:925
void SetVal(const TVal &value)
Assign a value to Val data member.
Definition: Gb_qual_.hpp:268
void SetPseudo(TPseudo value)
Assign a value to Pseudo data member.
Definition: Seq_feat_.hpp:1374
const TXref & GetXref(void) const
Get the Xref member data.
Definition: Seq_feat_.hpp:1308
void ResetXref(void)
Reset Xref data member.
Definition: Seq_feat_.cpp:182
TQual & SetQual(void)
Assign a value to Qual data member.
Definition: Seq_feat_.hpp:1153
bool IsSetLocation(void) const
feature made from Check if a value has been assigned to Location data member.
Definition: Seq_feat_.hpp:1105
@ e_not_set
No variant selected.
@ e_Other
for historical reasons, 'other' = 'refseq'
Definition: Seq_id_.hpp:104
@ e_Gi
GenInfo Integrated Database.
Definition: Seq_id_.hpp:106
@ e_Local
local use
Definition: Seq_id_.hpp:95
bool IsSetClass(void) const
Check if a value has been assigned to Class data member.
const TDescr & GetDescr(void) const
Get the Descr member data.
TSet & SetSet(void)
Select the variant.
Definition: Seq_entry_.cpp:130
TClass GetClass(void) const
Get the Class member data.
const TSet & GetSet(void) const
Get the variant data.
Definition: Seq_entry_.cpp:124
bool IsSetDescr(void) const
Check if a value has been assigned to Descr data member.
void SetClass(TClass value)
Assign a value to Class data member.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
@ eClass_nuc_prot
nuc acid and coded proteins
Definition: Bioseq_set_.hpp:99
@ eClass_genbank
converted genbank
const TInst & GetInst(void) const
Get the Inst member data.
Definition: Bioseq_.hpp:336
TTitle & SetTitle(void)
Select the variant.
Definition: Seqdesc_.hpp:1039
TPub & SetPub(void)
Select the variant.
Definition: Seqdesc_.cpp:362
bool IsSetMol(void) const
Check if a value has been assigned to Mol data member.
Definition: Seq_inst_.hpp:593
TGenbank & SetGenbank(void)
Select the variant.
Definition: Seqdesc_.cpp:340
const TId & GetId(void) const
Get the Id member data.
Definition: Bioseq_.hpp:290
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
Definition: Seq_annot_.hpp:861
bool IsSetInst(void) const
the sequence data Check if a value has been assigned to Inst data member.
Definition: Bioseq_.hpp:324
TMol GetMol(void) const
Get the Mol member data.
Definition: Seq_inst_.hpp:612
TComment & SetComment(void)
Select the variant.
Definition: Seqdesc_.hpp:1065
void SetInst(TInst &value)
Assign a value to Inst data member.
Definition: Bioseq_.cpp:86
TSource & SetSource(void)
Select the variant.
Definition: Seqdesc_.cpp:572
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
Definition: Bioseq_.hpp:303
void SetBiomol(TBiomol value)
Assign a value to Biomol data member.
Definition: MolInfo_.hpp:453
TUser & SetUser(void)
Select the variant.
Definition: Seqdesc_.cpp:390
const TFtable & GetFtable(void) const
Get the variant data.
Definition: Seq_annot_.hpp:621
bool IsFtable(void) const
Check if variant Ftable is selected.
Definition: Seq_annot_.hpp:615
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_annot_.hpp:873
const TDescr & GetDescr(void) const
Get the Descr member data.
Definition: Bioseq_.hpp:315
TMolinfo & SetMolinfo(void)
Select the variant.
Definition: Seqdesc_.cpp:594
@ e_Ids
used for communication between tools
Definition: Seq_annot_.hpp:136
@ e_User
user defined object
Definition: Seqdesc_.hpp:124
@ e_Pub
a reference to the publication
Definition: Seqdesc_.hpp:122
@ e_Molinfo
info on the molecule and techniques
Definition: Seqdesc_.hpp:134
@ eMol_not_set
> cdna = rna
Definition: Seq_inst_.hpp:109
@ eMol_na
just a nucleic acid
Definition: Seq_inst_.hpp:113
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
const TCit & GetCit(void) const
Get the Cit member data.
void SetSub(TSub &value)
Assign a value to Sub data member.
void SetCit(TCit &value)
Assign a value to Cit data member.
void SetTool(const TTool &value)
Assign a value to Tool data member.
const TEntrys & GetEntrys(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
bool IsEntrys(void) const
Check if variant Entrys is selected.
void SetContact(TContact &value)
Assign a value to Contact data member.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
END_EVENT_TABLE()
for(len=0;yy_str[len];++len)
int i
Functions used in the DO/DONE section affecting the top seq-entry.
Macro library for storing parsed macros.
static int version
Definition: mdb_load.c:29
CMinPanelContainer::OnRestoreWindow EVT_UPDATE_UI_RANGE(eCmdCloseDockPanel, eCmdWindowRestore, CMinPanelContainer::OnUpdateWindowCommand) CMinPanelContainer
CRef< CCmdComposite > GetPropagateDBLinkCmd(objects::CSeq_entry_Handle entry)
void GetViewObjects(IWorkbench *workbench, TConstScopedObjects &objects)
#define wxT(x)
Definition: muParser.cpp:41
mdb_mode_t mode
Definition: lmdb++.h:38
const struct ncbi::grid::netcache::search::fields::SIZE size
#define abs(a)
Definition: ncbi_heapmgr.c:130
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
Definition: njn_matrix.hpp:613
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
static int filenames
Definition: pcregrep.c:172
static const char * prefix[]
Definition: pcregrep.c:405
IGuiPackage * NCBIGBenchGetPackage()
Declare Package Entry Point.
static CRef< CUser_object > GetParams()
static const char * kFramePosX
static const char * kFrameHeight
static tuple< CRef< CGBProjectHandle >, CRef< CProjectItem > > LoadFileForSubmission(wxWindow *parent, CIRef< CProjectService > srv, CRef< CGBWorkspace > ws)
static bool EqualLoc(CRef< CSeq_loc > first, CRef< CSeq_loc > second)
static const char * sMacroLibraries[]
ON_EVENT_RANGE(CSelectionServiceEvent, CSelectionServiceEvent::eClientAttached, CSelectionServiceEvent::eSelectionChanged, &CSequenceEditingEventHandler::x_OnSelectionEvent) static const SwxMenuItemRec *CSeqEditPackage
static wxString IndexerTypeToName(int i)
static bool s_UpdateLocalFile(const string &url, const string &file_name)
static bool CompLoc(CRef< CSeq_loc > first, CRef< CSeq_loc > second)
static const char * kFramePosY
static const char * kFrameWidth
bool AddOrgToDefline(objects::CSeq_entry_Handle seh, CCmdComposite *composite)
bool AddModToDefline(objects::CSeq_entry_Handle entry, CCmdComposite *composite, const objects::CAutoDefAvailableModifier &mod, bool show_label)
#define EXT_POINT__PROJECT_ITEM_EXTENSION
#define EDIT_EACH_SEQFEATXREF_ON_SEQFEAT(Itr, Var)
#define FOR_EACH_SEQFEATXREF_ON_SEQFEAT(Itr, Var)
FOR_EACH_SEQFEATXREF_ON_SEQFEAT EDIT_EACH_SEQFEATXREF_ON_SEQFEAT.
static static static wxID_ANY
void FillShortColumns(CRef< objects::CSeq_table > values_table)
void AddValueToTable(CRef< CSeq_table > table, string subtype_name, string value, size_t row, edit::EExistingText existing_text=edit::eExistingText_replace_old)
static const char * kInternalIndexerRegistry
static const char * kInternalIndexerRegistryType
@ eCmdDescriptorPropagateDown
@ eCmdAutodefPopset
@ eCmdConvertCdsWithInternalStopToMiscFeat
@ eCmdRemoveLocalSeqIdsFromNuc
@ eCmdConvertAccessionToLocalIdsAll
@ eCmdCreateDescSource
@ eCmdAddLinkageToGaps
@ eCmdEditStructuredCommentPrefixSuffixMIMARKS3_0
@ eCmdLinkmRNACDSUnidirectional
@ eCmdLinkmRNACDSTranscriptID
@ eCmdGeneXrefsFromFeats
@ eCmdCreateSeqHistForTpa
@ eCmdAddNamedrRNA26S
@ eCmdSelectTarget
@ eCmdRetranslateCDSIgnoreStopExceptEnd_ext
@ eCmdRemoveNonsuppressingGeneXrefs
@ eCmdTruncateAuthorMiddleInitials
@ eCmdCreateDescRefGeneTracking
@ eCmdCreateStructuredCommentPrefixSuffixMIGS
@ eCmdCountryConflict
@ eCmdAddKeywordWithConstraint
@ eCmdTaxFixCleanup_ext
@ eCmdAutodefRefresh
@ eCmdRemoveAllStructuredComments
@ eCmdApplySourceQual
@ eCmdSplitQualifiersAtCommas
@ eCmdLinkmRNACDSOverlap
@ eCmdFixForTransSplicing
@ eCmdRemoveSeqHistAssembly
@ eCmdRemoveAlignments
@ eCmdRetranslateCDSObeyStop
@ eCmdConvertCdsWithInternalStopToMiscFeatUnverified
@ eCmdImportFeatureTable
@ eCmdUpdateSequenceClipboard
@ eCmdRemoveSourceQual
@ eCmdEditStructuredCommentPrefixSuffixFluData
@ eCmdSortUniqueCountTree
@ eCmdParseCollectionDateDayFirst
@ eCmdRemoveSequences_ext
@ eCmdConvertDescToFeatComment
@ eCmdAppendModToOrg
@ eCmdRemoveOrphanLocusGeneXrefs
@ eCmdRemoveDuplicateGOTerms
@ eCmdConvertCGPQual
@ eCmdValidateNoAlignments
@ eCmdMakeToolBarWindow
@ eCmdGeneralToLocalId
@ eCmdSpecificHostCleanup
@ eCmdLinkSelectedmRNACDS
@ eCmdRemoveOrphanedProteins
@ eCmdRemoveTextInsideStr
@ eCmdConvertSelectedGapsToKnown
@ eCmdTrimJunkInPrimerSeqs
@ eCmdConvertGapsBySize
@ eCmdEditStructuredCommentPrefixSuffixGenAssData
@ eCmdEditSeqEndsWithAlign
@ eCmdCreateDescStructuredComment
@ eCmdUpdateSequence_ext
@ eCmdReverseAuthorNames
@ eCmdCdsToMatPeptide
@ eCmdChangeSetClass
@ eCmdSwapSourceQual
@ eCmdDeltaSeqToRaw_ext
@ eCmdFixCapitalizationCountry
@ eCmdCDSGeneRangeErrorRestore
@ eCmdAddNamedrRNASmall
@ eCmdAutodefDefaultOptions
@ eCmdRemoveDescriptors
@ eCmdParseTextFromDefline
@ eCmdRemoveGenbankSeqIdsFromProt
@ eCmdFixOrgModInstitution
@ eCmdDeltaSeqToRaw
@ eCmdLinkmRNACDSLabelLocation
@ eCmdApplyRNA_ITS
@ eCmdSaveASN1File
@ eCmdRemoveBankitComment
@ eCmdRestoreFromFile
@ eCmdBulkGeneEdit
@ eCmdParseComment
@ eCmdUniqifyFeatureIds
@ eCmdFixupOrganismNames
@ eCmdRemoveTaxonFeatsAndBioSource
@ eCmdApplyRNAQual
@ eCmdBulkApplyGenCode
@ eCmdAddKeywordTPA_experimental
@ eCmdIndexerTypeSelection
@ eCmdEditSequence
@ eCmdConvertAuthorToConsortiumAll
@ eCmdDeleteStructuredCommentPrefixSuffixMIGS
@ eCmdDeleteStructuredCommentPrefixSuffixGenAssData
@ eCmdRemoveGenomeProjectId
@ eCmdEditFeatException
@ eCmdCreateDescGenomeAssemblyComment
@ eCmdAddNamedrRNA16S
@ eCmdUpdateMultiSeqClipboard
@ eCmdRemoveUnpublishedPublications
@ eCmdAddStructuredCommentKeyword
@ eCmdShowFeatureTable
@ eCmdPrefixHaplotToDefLine
@ eCmdConvertCdsWithGapsToMiscFeat
@ eCmdRemoveGeneralId
@ eCmdAddNamedrRNA18S
@ eCmdCorrectGenes
@ eCmdCreateDescComment
@ eCmdConvertAccessionToLocalIdsName
@ eCmdPropagateDBLink
@ eCmdAdjustmRNAForIntrons
@ eCmdBarcodeTool
@ eCmdConvertDescToFeatPubConstraint
@ eCmdEditStructuredCommentPrefixSuffixMIENSData
@ eCmdFuseJoinsInLocs
@ eCmdAutodefOptions
@ eCmdRemoveSegGaps
@ eCmdRmCultureNotes
@ eCmdAddTranslExcept
@ eCmdRemoveInPressPublications
@ eCmdLinkmRNACDSProteinID
@ eCmdNormalizeGeneQuals
@ eCmdAddAssemblyStructuredComment
@ eCmdClearFeatureIds
@ eCmdLowercaseQuals
@ eCmdCombineSelectedGenesIntoPseudogenes
@ eCmdAdjustConsensusSpliceSitesStrict
@ eCmdResynchronizePartialsCDS
@ eCmdFixNonReciprocalLinks
@ eCmdAddGlobalCodeBreak
@ eCmdApplyIndexerComments
@ eCmdRemoveSetsFromSet
@ eCmdBioseqFeatsRevComp
@ eCmdModifyStructuredComment
@ eCmdSortUniqueCountTree_ext
@ eCmdCompareWithBiosample
@ eCmdRecomputeIntervals
@ eCmdEditFeatQual
@ eCmdLoadSecondaryAccessions
@ eCmdRemoveDbXrefsBioSourceAndFeats
@ eCmdAddSequences
@ eCmdAddGenomeAssemblyStructuredComment
@ eCmdAdjustConsensusSpliceSitesStrict_ext
@ eCmdDeleteStructuredCommentPrefixSuffixMIMARKS
@ eCmdRemoveDuplicateStructuredComments
@ eCmdGlobalPubmedIdLookup
@ eCmdFixUsaAndStates
@ eCmdAdjustConsensusSpliceSitesConsensusEnds
@ eCmdCreateDescUnverified
@ eCmdConvertRNAQual
@ eCmdExonFromTRNA
@ eCmdCreateDescGenBankBlock
@ eCmdCdsFromGeneMrnaExon
@ eCmdApplyAddOther_ext
@ eCmdAdjustConsensusSpliceSitesRelaxed_ext
@ eCmdRemoveFeatures
@ eCmdConvertSecondProtNameToDesc
@ eCmdSuppressGenes
@ eCmdAddNamedrRNA28S
@ eCmdExtendCDSToStop
@ eCmdRemoveSequencesFromAlignments
@ eCmdRemoveCGPQual
@ eCmdCreateDescDBLink
@ eCmdConvertDescToFeatPub
@ eCmdImportFeatureTable_ext
@ eCmdRemoveUnreviewed
@ eCmdUpdateSequenceAccession
@ eCmdRmWrongQuals
@ eCmdClearKeywords
@ eCmdConvertSelectedGapsToUnknown
@ eCmdRemoveUnnecessaryGeneXrefs
@ eCmdTrimNsTerminal
@ eCmdImportFeatureTableClipboard
@ eCmdEditStructuredCommentPrefixSuffixiBol
@ eCmdAdjustFeaturesForGaps
@ eCmdRemoveTextOutsideString
@ eCmdFixProductNamesDefault
@ eCmdCreateStructuredCommentPrefixSuffixGenAnnData
@ eCmdShowFeatureTable_ext
@ eCmdSaveSubmissionFile
@ eCmdAdjustConsensusSpliceSitesRelaxed
@ eCmdExtendPartialsAll
@ eCmdAddFluComments
@ eCmdCreateProteinId
@ eCmdHelpReports_ext
@ eCmdStripAuthorSuffixes
@ eCmdGroupExplode
@ eCmdPrefixCloneToDefLine
@ eCmdAlignmentAssistant
@ eCmdSetTransgSrcDesc
@ eCmdFixCapitalizationAffiliation
@ eCmdDeleteStructuredCommentPrefixSuffixMIMS
@ eCmdConvertFeatToDescPub
@ eCmdCreateDescTPAAssembly
@ eCmdConvertAccessionToLocalIdsProt
@ eCmdEnableStrainForwarding
@ eCmdRawSeqToDeltaByNs_ext
@ eCmdSwapFeatQual
@ eCmdTableReader_ext
@ eCmdRetranslateCDSIgnoreStopExceptEnd
@ eCmdValidate_ext
@ eCmdEditFeatExperiment
@ eCmdRmIllegalQuals
@ eCmdPackageFeaturesOnParts
@ eCmdCountryFixupCap
@ eCmdEditFeatRevInt
@ eCmdSwapPrimerSeqName
@ eCmdDeleteStructuredCommentPrefixSuffixMIENSData
@ eCmdRemoveDbXrefsBioSource
@ eCmdConvertCdsToMiscFeat
@ eCmdEditingButtons
@ eCmdHelpSequences_ext
@ eCmdHelpEditingTools_ext
@ eCmdTestDialogView
@ eCmdConvertBadInference
@ eCmdRawSeqToDeltaByLoc
@ eCmdEditSelectedGaps
@ eCmdGeneFromOtherFeat
@ eCmdRemoveLocalSeqIdsFromProt
@ eCmdEditStructuredCommentPrefixSuffixAssemblyData
@ eCmdRemoveEmptyStructuredComments
@ eCmdCreateDescComment_ext
@ eCmdRemoveCddFeatDbxref
@ eCmdHelpComments_ext
@ eCmdAdjustrRNAForIntrons
@ eCmdPrefixStrainToDefLine
@ eCmdTrimOrganismNames
@ eCmdSubmitter_ext
@ eCmdInstantiateProteinTitles
@ eCmdRemoveSequences
@ eCmdCreateDescMolinfo
@ eCmdConsolidateLikeModsWithSemicolon
@ eCmdRemoveDupFeats
@ eCmdSplitCDSwithTooManyXs
@ eCmdAddCitSubForUpdate
@ eCmdmRNAFromGeneCdsExon
@ eCmdClearNomenclature
@ eCmdBulkMiscFeatEdit
@ eCmdExtendPartialsConstr
@ eCmdEditStructuredCommentPrefixSuffixHIVData
@ eCmdRemoveDupFeatsWithOptions_ext
@ eCmdRemoveProteinsAndRenormalizeNucProtSets
@ eCmdExportStructuredCommentsTable
@ eCmdEditFeatStrand
@ eCmdRemoveOrphanLocus_tagGeneXrefs
@ eCmdConvertAuthorToConstortiumWhereLastName
@ eCmdLinkmRNACDSProduct
@ eCmdConvertToDelayedGenProdSetQuals
@ eCmdExplodeRNAFeats
@ eCmdParseLocalToSrc
@ eCmdCreateDescAuthorizedAccess
@ eCmdRemoveDbXrefsGenes
@ eCmdRemoveSeqIdNamesFromProtFeats
@ eCmdRemProtTitles
@ eCmdAddControlRegion
@ eCmdRemoveEmptyGenomeProjectId
@ eCmdSplitStructuredCollections
@ eCmdConvertFeatToDescComment
@ eCmdResolveIntersectingFeats
@ eCmdCreateSeqHistForTpaDetailed
@ eCmdCreateStructuredCommentPrefixSuffixMIENSData
@ eCmdAdjustCDSForIntrons
@ eCmdSuspectProductRulesEditor
@ eCmdConvertComment
@ eCmdCombineAdjacentGaps
@ eCmdRemoveUnindexedFeatures
@ eCmdTaxFixCleanup
@ eCmdConvertDescToSecondProtName
@ eCmdAddKeywordTPA_inferential
@ eCmdMakeBadSpecificHostTable
@ eCmdRemoveCollidingPublications
@ eCmdAddMicrosatellite
@ eCmdTestFormView
@ eCmdRemoveDbXrefsCDS
@ eCmdRestoreRNAediting
@ eCmdPrefixCultivarToDefLine
@ eCmdPrefixAuthWithTax
@ eCmdWrongQualsToNote
@ eCmdRevCompSequences_ext
@ eCmdFixStructuredVouchers
@ eCmdGenusSpeciesFixup
@ eCmdWithdrawSequences
@ eCmdReorderStructuredComment
@ eCmdFixCapitalizationAuthors
@ eCmdAddNamedrRNA12S
@ eCmdRemoveAllGeneXrefs
@ eCmdRemovePublishedPublications
@ eCmdCreateDescTitle
@ eCmdConvertCdsWithInternalStopToMiscFeatViral
@ eCmdRemoveGiSeqIdsFromAll
@ eCmdRemoveDbXrefsRNA
@ eCmdEditStructuredCommentPrefixSuffixMIGS3_0
@ eCmdRemoveDbXrefsAllFeats
@ eCmdConvertFeatQual
@ eCmdJustRemoveProteins
@ eCmdCreateStructuredCommentPrefixSuffixMIMARKS
@ eCmdSplitDblinkQuals
@ eCmdAutodefNoMods
@ eCmdRemoveRNAQual
@ eCmdAddLinkageToGaps_ext
@ eCmdApplyCGPQual
@ eCmdRemoveTaxonFeats
@ eCmdHelpImport_ext
@ eCmdConvertDescToFeatSource
@ eCmdtRNAFromGene
@ eCmdRemoveGraphs
@ eCmdRemoveAuthorConsortiums
@ eCmdRemoveUnnecessaryExceptions
@ eCmdAddStrainSerotypeToNames
@ eCmdRawSeqToDeltaByAssemblyGapFeatures
@ eCmdMergePrimerSets
@ eCmdSequesterSets
@ eCmdTableReaderClipboard
@ eCmdConvertSourceQual
@ eCmdCreateStructuredCommentPrefixSuffixGenAssData
@ eCmdLinkmRNACDSLabel
@ eCmdRemoveDupFeatsWithOptions
@ eCmdApplyFeatQual
@ eCmdUpdateSequence
@ eCmdCreateLocusTagGene
@ eCmdConvertBadCdsAndRnaToMiscFeat
@ eCmdFixCapitalizationAll
@ eCmdFixiInPrimerSeqs
@ eCmdCreateStructuredCommentPrefixSuffixMIMS
@ eCmdConsolidateLikeModsWithoutSemicolon
@ eCmdRawSeqToDeltaByNs
@ eCmdImportGFF3_ext
@ eCmdEditFeatStrand_ext
@ eCmdSetGlobalRefGeneStatus
@ eCmdApplyAddOther
@ eCmdAddKeywordGDS
@ eCmdShowLinkedmRNACDS
@ eCmdLocalToGeneralId
@ eCmdBulkSourceEdit
@ eCmdParseStrainSerotypeFromNames
@ eCmdAddFeatureBetween
@ eCmdCreateDescPub
@ eCmdRemoveDupFeats_ext
@ eCmdAddNamedrRNA23S
@ eCmdCountryFixupNoCap
@ eCmdDeleteStructuredCommentPrefixSuffixGenAnnData
@ eCmdRetranslateCDSChooseFrame
@ eCmdIllegalQualsToNote
@ eCmdHelpFeatures_ext
@ eCmdExtendedCleanup
@ eCmdSplitPrimerSets
@ eCmdEditStructuredCommentPrefixSuffixMIGSData
@ eCmdRemoveLocalSeqIdsFromAll
@ eCmdReorderSeqById
@ eCmdCreateDescUnreviewed
@ eCmdFixCapitalizationTitles
@ eCmdSelectFeature
@ eCmdConvertFeatToDescSource
@ eCmdRemoveGenbankSeqIdsFromAll
@ eCmdUpdate_Replaced_EC_numbers
@ eCmdEditSourceQual
@ eCmdReassignFeatureIds
@ eCmdUnculTaxTool
@ eCmdFixProductNamesOptions
@ eCmdSelectTarget_ext
@ eCmdAddKeywordTPA_assembly
@ eCmdRecomputeIntervalsAndUpdateGenes
@ eCmdRemoveAllPublications
@ eCmdMergeBiosources
@ eCmdEditCdsFrame
@ eCmdRemoveAllFeatures
@ eCmdAddNamedrRNALarge
@ eCmdConvertFeatures
@ eCmdRemoveGeneXrefs
@ eCmdRemoveStructuredCommentKeyword
@ eCmdEditSequenceEnds
@ eCmdRemAllProtTitles
@ eCmdPrefixListToDefLine
@ eCmdRemoveUnverified
@ eCmdExonFromMRNA
@ eCmdSortUniqueCountText
@ eCmdCorrectRNAStrand
@ eCmdCorrectIntervalOrder
@ eCmdViewSortedProteins
@ eCmdConvertAccessionToLocalIdsNuc
@ eCmdCDSGeneRangeErrorSuppress
@ eCmdCheckForMixedStrands
@ eCmdValidateCheckInferences
@ eCmdUpdateMultiSequences
@ eCmdEditFeatInference
@ eCmdDiscrepancyList
@ eCmdSegregateSets
@ eCmdEditStructuredCommentPrefixSuffixMIMSData
@ eCmdAssignFeatureIds
@ eCmdGeneFeatFromXrefs
@ eCmdConvertRptUnitRangeToLoc
@ eCmdAddSecondary
@ eCmdParseCollectionDateMonthFirst
@ eCmdPrepareSeqSubmit
@ eCmdDisableStrainForwarding
@ eCmdRevCompSequences
@ eCmdUpdateTLSName
@ eCmdPrefixOrgToDefLine
@ eCmdLoadSecondaryAccessionsHistoryTakeover
@ eCmdApplyStructuredCommentField
@ eCmdFarPointerSeq
@ eCmdSaveDescriptors
@ eCmdFuseFeatures
@ eCmdRestoreAndConvertSeqSubmit
@ eCmdPrefixIsolateToDefLine
@ eCmdEditStructuredCommentPrefixSuffixMIMS3_0
@ eCmdLoadStructComments
@ eCmdAdjusttRNAForIntrons
@ eCmdCreateDescPub_ext
@ eCmdEditFeatPseudo
@ eCmdEditFeatLoc_ext
@ eCmdBioseqOnlyRevComp
@ eCmdCompareWithBiosampleFirstOnly
@ eCmdRemoveFeatQual
@ eCmdRemoveSeqAnnotIds
@ e_GenBankIndexer
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
#define row(bind, expected)
Definition: string_bind.c:73
@ eExistingText_replace_old
For example, if bases_to_check is 10 and max_bases_allowed_to_be_ambig is 5, then on each iteration w...
Definition: sequence.hpp:1314
SAnnotSelector –.
Definition: type.c:6
done
Definition: token1.c:1
#define WX_MENU_ITEM_EXT(cmd)
Definition: ui_command.hpp:324
#define WX_DEFINE_MENU(name)
New macros for defining menus for use with CUICommandRegistry.
Definition: ui_command.hpp:266
#define WX_SUBMENU(label)
Definition: ui_command.hpp:288
#define WX_SUBMENU_EXT(label)
Definition: ui_command.hpp:321
#define WX_MENU_CHECK_ITEM_INT(cmd)
Definition: ui_command.hpp:308
#define WX_END_MENU()
Definition: ui_command.hpp:294
#define WX_MENU_SEPARATOR_L(label)
Definition: ui_command.hpp:285
#define WX_SUBMENU_INT(label)
Definition: ui_command.hpp:299
#define WX_MENU_SEPARATOR_EXT()
Definition: ui_command.hpp:336
#define WX_MENU_ITEM_INT(cmd)
Definition: ui_command.hpp:302
#define WX_MENU_SEPARATOR_INT()
Definition: ui_command.hpp:314
#define WX_END_SUBMENU()
Definition: ui_command.hpp:291
CScope & GetScope()
CRef< CCmdComposite > GetRemoveDuplicateGOTermsCommand(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > GetSynchronizeProteinPartialsCommand(objects::CScope &scope, const objects::CSeq_feat &cds)
CRef< CCmdComposite > CleanupCommand(objects::CSeq_entry_Handle orig_seh, bool extended, bool do_tax)
void GetProductToCDSMap(objects::CScope &scope, map< objects::CBioseq_Handle, set< objects::CSeq_feat_Handle > > &product_to_cds)
CRef< CCmdComposite > GetDisableStrainForwardingCommand(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > GetRmCultureNotesCommand(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > SpecificHostCleanupCommand(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > GetNormalizeGeneQualsCommand(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > GetEnableStrainForwardingCommand(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > TaxonomyLookupCommand(objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > GetDeleteFeatureCommand(const objects::CSeq_feat_Handle &fh, bool remove_proteins=true)
static const char *const features[]
bool init_w_edit()
Definition: init.cpp:42
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
bool RunningInsideNCBI()
Definition: wx_utils.cpp:1335
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
void CorrectWindowRect(wxTopLevelWindow *win, wxRect &rc)
Definition: wx_utils.cpp:1026
#define const
Definition: zconf.h:232
Modified on Wed Apr 17 13:09:43 2024 by modify_doxy.py rev. 669887