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 47611 2023-11-17 18:39:39Z asztalos $
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 AddKeywordTPA_specialistdb( wxCommandEvent& event );
785  void AddKeywordWithConstraint( wxCommandEvent& event );
786  void EditSeqId( wxCommandEvent& event );
787  void RemoveLocalSeqIdsFromNuc(wxCommandEvent& event);
788  void RemoveLocalSeqIdsFromProt(wxCommandEvent& event);
789  void RemoveLocalSeqIdsFromAll(wxCommandEvent& event);
790  void RemoveGiSeqIdsFromAll(wxCommandEvent& event);
791  void RemoveGenbankSeqIdsFromProt(wxCommandEvent& event);
792  void RemoveGenbankSeqIdsFromAll(wxCommandEvent& event);
793  void RemoveSeqIdNamesFromProtFeats(wxCommandEvent& event);
794  void ConvertAccessionToLocalIdsAll(wxCommandEvent& event);
795  void ConvertAccessionToLocalIdsNuc(wxCommandEvent& event);
796  void ConvertAccessionToLocalIdsProt(wxCommandEvent& event);
797  void ConvertAccessionToLocalIdsName(wxCommandEvent& event);
798  void LocalToGeneralId(wxCommandEvent& event);
799  void GeneralToLocalId(wxCommandEvent& event);
800  void RemoveGeneralId( wxCommandEvent& event );
801  void RemoveUnnecessaryExceptions(wxCommandEvent& event);
802  void EditHistory( wxCommandEvent& event );
803  void ConvertToDelayedGenProdSetQuals( wxCommandEvent& event);
804  void ConvertRptUnitRangeToLoc( wxCommandEvent& event);
805  void ReorderSeqById( wxCommandEvent& event);
806  void LinkmRNACDS( wxCommandEvent& event );
807  void JustRemoveProteins( wxCommandEvent& event );
808  void RemoveProteinsAndRenormalizeNucProtSets( wxCommandEvent& event );
809  void RemoveOrphanedProteins( wxCommandEvent& event );
810  void GeneFeatFromXrefs( wxCommandEvent& event );
811  void GeneXrefsFromFeats( wxCommandEvent& event );
812  void RemoveAllGeneXrefs( wxCommandEvent& event );
813  void RemoveUnnecessaryGeneXrefs( wxCommandEvent& event );
814  void RemoveNonsuppressingGeneXrefs( wxCommandEvent& event );
815  void RemoveOrphanLocusGeneXrefs( wxCommandEvent& event );
816  void RemoveOrphanLocus_tagGeneXrefs( wxCommandEvent& event );
817  void RemoveGeneXrefs( wxCommandEvent& event );
818  void ExtendCDS( wxCommandEvent& event );
819  void TruncateCDS( wxCommandEvent& event );
820  void ExtendCDSToStop( wxCommandEvent& event );
821  void RecomputeIntervalsAndUpdateGenes(wxCommandEvent& event);
822  void RecomputeIntervals(wxCommandEvent& event);
823  void FixProductNamesDefault( wxCommandEvent& event );
824  void FixProductNamesOptions( wxCommandEvent& event );
825  void BulkApplyGenCode( wxCommandEvent& event );
826  void EditSeqEndsWithAlign( wxCommandEvent& event );
827  void EditSequenceEnds( wxCommandEvent& event );
828  void UpdateAlign( wxCommandEvent& event );
829  void CreateProteinId( wxCommandEvent& event );
830  void CreateLocusTagGene( wxCommandEvent& event );
831  void NormalizeGeneQuals(wxCommandEvent& event);
832  void GenusSpeciesFixup( wxCommandEvent& event );
833  void CountryConflict( wxCommandEvent& event );
834  void AddSecondary( wxCommandEvent& event );
835  void PackageFeaturesOnParts( wxCommandEvent& event );
836  void ShowFeatureTable ( wxCommandEvent& event );
837  void SaveDescriptors( wxCommandEvent& event );
838  void CreateSeqHistForTpaDetailed( wxCommandEvent& event );
839  void CreateSeqHistForTpa( wxCommandEvent& event );
840  void RemoveSeqHistAssembly( wxCommandEvent& event );
841  void CompareWithBiosample( wxCommandEvent& event );
842  void CompareWithBiosampleFirstOnly( wxCommandEvent& event );
843  void BarcodeTool( wxCommandEvent& event );
844  void ApplyFBOL(wxCommandEvent& event);
845  void RestoreLocalFile ( wxCommandEvent& event );
846  void FarPointerSeq( wxCommandEvent& event );
847  void ConvertBadCdsAndRnaToMiscFeat(wxCommandEvent& event);
848  void EditCdsFrame(wxCommandEvent& event);
849  void RestoreRNAediting(wxCommandEvent& event);
850  void ViewSortedProteins(wxCommandEvent& event);
851  void ConsolidateLikeModsWithSemicolon(wxCommandEvent& event);
852  void ConsolidateLikeModsWithoutSemicolon(wxCommandEvent& event);
853  void ConvertSecondProtNameToDesc(wxCommandEvent& event);
854  void ConvertDescToSecondProtName(wxCommandEvent& event);
855  void ConvertDescToFeatComment(wxCommandEvent& event);
856  void ConvertDescToFeatSource(wxCommandEvent& event);
857  void ConvertDescToFeatPub(wxCommandEvent& event);
858  void ConvertDescToFeatPubConstraint(wxCommandEvent& event);
859  void ConvertFeatToDescComment(wxCommandEvent& event);
860  void ConvertFeatToDescSource(wxCommandEvent& event);
861  void ConvertFeatToDescPub(wxCommandEvent& event);
862  void Duplicate(wxCommandEvent& event);
863  void ExportStructuredCommentsTable(wxCommandEvent& evt);
864  void LoadStructComments(wxCommandEvent& event);
865  void CorrectIntervalOrder( wxCommandEvent& event );
866  void SuspectProductRulesEditor(wxCommandEvent& event);
867  void CheckForMixedStrands(wxCommandEvent& event);
868  void EnableHupId(wxCommandEvent& event);
869  void IndexerTypeSelection(wxCommandEvent& event);
870  void FixForTransSplicing(wxCommandEvent& evt);
871  void RemoveDuplicateGoTerms(wxCommandEvent& evt);
872  void Help(wxCommandEvent& evt);
873  void UpdateTargetedLocusName(wxCommandEvent& evt);
874 
875 protected:
876  void x_OnSelectionEvent(CEvent* event);
877 
878 private:
881  wxString m_WorkDir;
887  vector<CRef<CSeq_loc> > m_CachedSelectedLocations;
889  bool m_IsAa;
890  bool m_IsSeq;
892  vector<CRef<CSeq_loc> > &x_GetSelectedLocations();
896  void SaveSettings(const string &regpath, wxWindow *dlg) const;
897  void LoadSettings(const string &regpath, wxWindow *dlg);
899 };
900 
902 {
904 }
905 
907 {
910  m_Workbench = wb;
911  m_attached = false;
912  m_disable_hup_check = false;
913  m_disable_id_check = false;
914  wxWindow* main_window = NULL;
915  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
916  if (wb_frame)
917  main_window = wb_frame->GetMainWindow();
918  CEditingBtnsPanel::GetInstance(main_window, m_Workbench, true);
919 }
920 
922 {
923  if (m_Workbench && m_attached)
924  {
926  if (service)
927  {
928  service->RemoveListener(this);
929  m_attached = false;
930  }
931  }
932 }
933 
935 {
936  m_SelObjects.clear();
938  if (service) {
939  service->GetActiveObjects(m_SelObjects);
940  if (m_SelObjects.empty())
941  {
943  }
945  }
946 }
947 
949 {
951  m_WorkDir.Clear();
954  if (!wb) return;
955  if (!m_attached)
956  {
957  m_SelObjects.clear();
959  if (service)
960  {
961  service->AddListener(this);
962  service->GetActiveObjects(m_SelObjects);
963  if (m_SelObjects.empty())
964  {
966  }
968  m_attached = true;
969  }
970  }
971 
973  if (objects.empty()) return;
975  const CSeq_submit* sub = dynamic_cast<const CSeq_submit*>((*it).object.GetPointer());
976  if (sub) {
977  m_SeqSubmit.Reset(sub);
978  }
979  if (!m_TopSeqEntry && it->object && it->scope) {
981  if (seh) {
982  m_TopSeqEntry = seh;
983  if (m_SeqSubmit) {
984  break;
985  }
986  }
987  }
988  }
989  if (!m_TopSeqEntry) return;
991  if (srv)
992  {
993  CRef<CGBWorkspace> ws = srv->GetGBWorkspace();
994  if (!ws) return;
995 
996  CGBDocument* doc = dynamic_cast<CGBDocument*>(ws->GetProjectFromScope(m_TopSeqEntry.GetScope()));
997  if (doc) {
999  m_WorkDir = doc->GetWorkDir();
1000  }
1001  }
1002 
1003 }
1004 
1006 {
1008 }
1009 
1010 
1012 {
1013  m_CachedSelectedLocations.clear();
1014  m_IsSeq = false;
1015 
1016  if (!m_Workbench) {
1017  return;
1018  }
1019 
1021  if (objects.empty()) return;
1022  size_t count = 0;
1024  const CObject* ptr = it->object.GetPointer();
1025 
1026  const CSeq_feat* seqfeat = dynamic_cast<const CSeq_feat*>(ptr);
1027  const CSeq_loc* seqloc = dynamic_cast<const CSeq_loc*>(ptr);
1028  const CBioseq* bioseq = dynamic_cast<const CBioseq*>(ptr);
1029  const CSeqdesc* seqdesc = dynamic_cast<const CSeqdesc*>(ptr);
1030  const CPubdesc* pubdesc = dynamic_cast<const CPubdesc*>(ptr);
1031 
1032  const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>(ptr);
1033  const CBioseq_set* bioseqset = dynamic_cast<const CBioseq_set*>(ptr);
1034 
1035  const CSeq_align* align = dynamic_cast<const CSeq_align*>(ptr);
1036  const CSeq_id* seq_id = dynamic_cast<const CSeq_id*>(ptr);
1037 
1038  if (seqfeat) {
1039  if (seqfeat->IsSetLocation()) {
1040  CRef<CSeq_loc> loc(new CSeq_loc());
1041  loc->Assign(seqfeat->GetLocation());
1042  m_CachedSelectedLocations.push_back(loc);
1043  }
1044  m_IsSeq = false;
1045  } else if (seq_id && !CSeqUtils::IsVDBAccession(seq_id->GetSeqIdString())) {
1046  CBioseq_Handle bsh = it->scope->GetBioseqHandle(*seq_id);
1047  if (bsh) {
1048  CRef<CSeq_id> new_id(new CSeq_id());
1049  new_id->Assign(*seq_id);
1050  CRef<CSeq_loc> loc(new CSeq_loc(*new_id, 0, bsh.GetInst_Length() - 1));
1051  m_CachedSelectedLocations.push_back(loc);
1052  m_IsSeq = true;
1053  if (count == 0)
1054  m_IsAa = bsh.IsAa();
1055  }
1056  } else if (seqloc) {
1057 
1058  if (seqloc->IsWhole()) {
1059  CRef<CSeq_id> new_id(new CSeq_id());
1060  new_id->Assign(seqloc->GetWhole());
1061  CBioseq_Handle bsh = it->scope->GetBioseqHandle(*new_id);
1062  if (bsh) {
1063  CRef<CSeq_loc> loc(new CSeq_loc(*new_id, 0, bsh.GetInst_Length() - 1));
1064  m_CachedSelectedLocations.push_back(loc);
1065  }
1066  } else {
1067  CRef<CSeq_loc> loc(new CSeq_loc());
1068  loc->Assign(*seqloc);
1069  m_CachedSelectedLocations.push_back(loc);
1070  }
1071  CBioseq_Handle bsh = it->scope->GetBioseqHandle(*seqloc);
1072  if (bsh)
1073  {
1074  m_IsSeq = true;
1075  if (count == 0)
1076  m_IsAa = bsh.IsAa();
1077  }
1078  count++;
1079  } else if (bioseq) {
1080  CRef<CSeq_loc> loc(new CSeq_loc());
1081  loc->SetInt().SetId().Assign(*(bioseq->GetId().front()));
1082  loc->SetInt().SetFrom(0);
1083  loc->SetInt().SetTo(bioseq->GetLength() - 1);
1084  m_CachedSelectedLocations.push_back(loc);
1085  m_IsSeq = true;
1086  if (count == 0)
1087  m_IsAa = bioseq->IsAa();
1088  } else if (seqdesc) {
1089  CSeq_entry_Handle seh = edit::GetSeqEntryForSeqdesc(it->scope, *seqdesc);
1090  if (!seh) {
1091  CScope::TTSE_Handles tses;
1093  if (!tses.empty())
1094  seh = tses.front();
1095  }
1096 
1097  CBioseq_CI bi(seh);
1098  while (bi) {
1099  CRef<CSeq_loc> loc(new CSeq_loc());
1100  loc->SetInt().SetId().Assign(*(bi->GetId().front().GetSeqId()));
1101  loc->SetInt().SetFrom(0);
1102  loc->SetInt().SetTo(bi->GetInst_Length() - 1);
1103  m_CachedSelectedLocations.push_back(loc);
1104  ++bi;
1105  }
1106  m_IsSeq = false;
1107  } else if (pubdesc) {
1108  CSeq_entry_Handle seh = GetSeqEntryForPubdesc(it->scope, *pubdesc);
1109  CBioseq_CI bi(seh);
1110  while (bi) {
1111  CRef<CSeq_loc> loc(new CSeq_loc());
1112  loc->SetInt().SetId().Assign(*(bi->GetId().front().GetSeqId()));
1113  loc->SetInt().SetFrom(0);
1114  loc->SetInt().SetTo(bi->GetInst_Length() - 1);
1115  m_CachedSelectedLocations.push_back(loc);
1116  ++bi;
1117  }
1118  m_IsSeq = false;
1119  } else if (annot) {
1120  if (annot->IsSetData() &&
1121  annot->GetData().IsFtable() &&
1122  !annot->GetData().GetFtable().empty() &&
1123  annot->GetData().GetFtable().front()->IsSetLocation()) {
1124 
1125  CRef<CSeq_loc> loc(new CSeq_loc());
1126  loc->Assign(annot->GetData().GetFtable().front()->GetLocation());
1127  m_CachedSelectedLocations.push_back(loc);
1128  }
1129  m_IsSeq = false;
1130  } else if (bioseqset) {
1131  if (bioseqset->IsSetClass() && bioseqset->GetClass() == CBioseq_set::eClass_nuc_prot)
1132  {
1133  const CBioseq& bseq = bioseqset->GetNucFromNucProtSet();
1134  CRef<CSeq_loc> loc(new CSeq_loc());
1135  loc->SetInt().SetId().Assign(*(bseq.GetId().front()));
1136  loc->SetInt().SetFrom(0);
1137  loc->SetInt().SetTo(bseq.GetLength() - 1);
1138  m_CachedSelectedLocations.push_back(loc);
1139  }
1140  else
1141  {
1142  CSeq_entry* seq = bioseqset->GetParentEntry();
1143  if (seq)
1144  {
1145  m_CachedSelectedLocations.clear();
1146  }
1147  }
1148  m_IsSeq = false;
1149  } else if (align) {
1150  CSeq_align::TDim entry_row = x_FindRelevantAlignRow(*align, dynamic_cast<const CSeq_id*>(objects.back().object.GetPointer()));
1151  CRef<CSeq_loc> loc = align->CreateRowSeq_loc(entry_row);
1152  m_CachedSelectedLocations.push_back(loc);
1153  m_IsSeq = true;
1154  if (count == 0)
1155  m_IsAa = it->scope->GetBioseqHandle(*loc).IsAa();
1156  }
1157 
1158  }
1159  if (count > 1)
1160  {
1161  m_IsSeq = false;
1162  }
1163  if (!m_TopSeqEntry && !m_CachedSelectedLocations.empty()) {
1164  CBioseq_Handle bsh = objects.front().scope->GetBioseqHandle(*(m_CachedSelectedLocations.front()->GetId()));
1165  if (bsh)
1167  }
1168 }
1169 
1171 {
1172  // the relevant row corresponds to the subject sequence, which is the second one by default
1173  CSeq_align::TDim row = 1;
1174  if (align.GetSegs().IsSpliced()) {
1175  // looking for genomic sequence, which is always 1 in spliced-segs
1176  row = 1;
1177  }
1178  if (id)
1179  {
1180  CSeq_align::TDim num_rows = align.CheckNumRows();
1181  for (CSeq_align::TDim i = 0; i < num_rows; i++)
1182  {
1183  const CSeq_id &row_id = align.GetSeq_id(i);
1184  if (row_id.Match(*id))
1185  {
1186  row = i;
1187  break;
1188  }
1189  }
1190  }
1191  return row;
1192 }
1193 
1195 {
1197  event.Enable(m_TopSeqEntry && m_CmdProccessor);
1198 }
1199 
1201 {
1203  {
1204  CRef<CSeq_id> id(new CSeq_id("MF358689", CSeq_id::fParse_Default));
1205  CBioseq_Handle bsh;
1206  try
1207  {
1208  bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*id);
1209  }
1210  catch (const exception&)
1211  {
1212  wxMessageBox(wxT("Error while attempting to connect to the ID server, restarting gbench is recommended"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
1213  m_disable_hup_check = true;
1214  }
1215  if (bsh)
1216  return true;
1217  }
1218  return false;
1219 }
1220 
1222 {
1225  {
1226  event.Enable(true);
1227  event.Check(TestHupIdEnabled());
1228  return;
1229  }
1230  event.Check(false);
1231  event.Enable(false);
1232 }
1233 
1235 {
1236  vector<CRef<CSeq_loc> >& locs = x_GetSelectedLocations();
1237 
1238  if (!RunningInsideNCBI() && (m_TopSeqEntry || !locs.empty()))
1239  {
1240  evt.Enable(true);
1241  return;
1242  }
1243 
1244  if (!m_IsSeq)
1245  {
1246  evt.Enable(false);
1247  return;
1248  }
1249 
1250 
1251  bool rval = false;
1252  bool ok_for_something = false;
1254  ITERATE(vector<CRef<CSeq_loc> >, lit, locs) {
1255  if (x_IsLocationOkForFeatCmd(subtype, *lit)) {
1256  rval = true;
1257  ok_for_something |= true;
1258  break;
1259  }
1261  ok_for_something |= true;
1262  }
1264  ok_for_something |= true;
1265  }
1266 
1267  }
1268  evt.Enable(rval);
1269 
1270  if (!ok_for_something && m_TopSeqEntry && !m_disable_id_check)
1271  {
1272  CRef<CSeq_id> id(new CSeq_id("U12345", CSeq_id::fParse_Default));
1273  CBioseq_Handle bsh;
1274  try
1275  {
1276  bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*id);
1277  }
1278  catch (const exception&)
1279  {
1280  wxMessageBox(wxT("Unable to connect to the ID server, restarting gbench is recommended"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
1281  m_disable_id_check = true;
1282  }
1283  }
1284 }
1285 
1286 
1287 
1288 // Implementation
1289 vector<CUICommand*> CSeqEditPackage::GetCommands()
1290 {
1291  vector<CUICommand*> commands;
1292  commands.push_back(new CUICommand(eCmdRemoveDescriptors, "Remove Descriptors", "Remove Descriptors from Selected Object", "RDSO"));
1293  commands.push_back(new CUICommand(eCmdRemoveFeatures, "Remove Features", "Remove Features from Selected Object", "RFSO"));
1294  commands.push_back(new CUICommand(eCmdFixForTransSplicing, "Fix For Trans-splicing", "Fix For Trans-splicing", "FFTS"));
1295  commands.push_back(new CUICommand(eCmdRemoveUnindexedFeatures, "Remove Unindexed Features", "Remove Unindexed Features", "RUIF"));
1296  commands.push_back(new CUICommand(eCmdApplyIndexerComments, "Apply Indexer Comments", "Apply Indexer Comments", "AICS"));
1297  commands.push_back(new CUICommand(eCmdRemoveSeqAnnotIds, "Remove Seq-annot IDs", "Remove Seq-annot IDs from Selected Object", "RSAID"));
1298  commands.push_back(new CUICommand(eCmdRemoveCddFeatDbxref, "Remove All CDD Features and DBxrefs", "Remove All CDD Features and Dbxrefs", "RACFAD"));
1299  commands.push_back(new CUICommand(eCmdRemoveBankitComment, "Remove Bankit Comments", "Remove Bankit Comments from Selected Object", "RBC"));
1300  commands.push_back(new CUICommand(eCmdRemoveDuplicateStructuredComments, "Remove Duplicate Structured Comments", "Remove Duplicate Structured Comments from Selected Object", "RDSC"));
1301  commands.push_back(new CUICommand(eCmdRemoveSequencesFromAlignments, "Remove Sequences from Alignments", "Remove Sequences From Alignments from Selected Object", "RSFASO"));
1302  commands.push_back(new CUICommand(eCmdRemoveSequences, "Remove Sequences from Record", "Remove Sequences from Selected Object", "RSSO"));
1303  commands.push_back(new CUICommand(eCmdRemoveSequences_ext, "Remove Sequences", "Remove Sequences from Selected Object", "RSSO"));
1304  commands.push_back(new CUICommand(eCmdJustRemoveProteins, "Just Remove Proteins", "Just Remove Proteins", "JRP"));
1305  commands.push_back(new CUICommand(eCmdRemoveProteinsAndRenormalizeNucProtSets, "And Renormalize Nuc-Prot Sets", "And Renormalize Nuc-Prot Sets", "RPRNPS"));
1306  commands.push_back(new CUICommand(eCmdRemoveOrphanedProteins, "Orphaned Proteins", "Orphaned Proteins", "ROP"));
1307  commands.push_back(new CUICommand(eCmdRemoveSet,"RemoveSet", "RemoveSet","RSET"));
1308  commands.push_back(new CUICommand(eCmdRemoveSetsFromSet,"Remove Sets in Set", "Remove Sets in Set", "RSIS"));
1309  commands.push_back(new CUICommand(eCmdRevCompSequences, "Bioseq RevComp by ID", "Reverse Complement Sequences from Selected Object", "RVCS"));
1310  commands.push_back(new CUICommand(eCmdRevCompSequences_ext, "Reverse Complement Sequences by Sequence ID", "Reverse Complement Sequences from Selected Object", "RVCS"));
1311  commands.push_back(new CUICommand(eCmdBioseqFeatsRevComp, "BioseqFeatsRevComp", "Reverse Complement Sequences and Features", "RVCSF"));
1312  commands.push_back(new CUICommand(eCmdBioseqOnlyRevComp,"BioseqOnlyRevComp","Reverse Complement Sequences and Graphs", "RVCSG"));
1313  commands.push_back(new CUICommand(eCmdUnculTaxTool,"Uncultured Tax Tool", "Uncultured Tax Tool", "UCTT"));
1314  commands.push_back(new CUICommand(eCmdMergeBiosources, "Merge Multiple BioSources On Sequence", "Merge Multiple BioSources On Sequence", "MMBS"));
1315  commands.push_back(new CUICommand(eCmdCompareWithBiosample, "All Records", "Compare with Biosample", "CWBS"));
1316  commands.push_back(new CUICommand(eCmdCompareWithBiosampleFirstOnly, "First Record Only", "Compare with Biosample", "CWBSFO"));
1317  commands.push_back(new CUICommand(eCmdConsolidateLikeModsWithSemicolon, "With semicolons", "With semicolons", "CLMS"));
1318  commands.push_back(new CUICommand(eCmdConsolidateLikeModsWithoutSemicolon, "Without semicolons", "Without semicolons", "CLMWS"));
1319  commands.push_back(new CUICommand(eCmdBarcodeTool, "BARCODE Discrepancy Tool", "BARCODE Discrepancy Tool", "BDISTL"));
1320  commands.push_back(new CUICommand(eCmdApplyFBOL, "Apply FBOL Dbxrefs", "Apply FBOL Dbxrefs", "AFBOL"));
1321  commands.push_back(new CUICommand(eCmdEditSequence, "Edit Sequence", "Edit Sequence", "EDSEQ"));
1322  commands.push_back(new CUICommand(eCmdAlignmentAssistant, "Alignment Assistant", "Alignment Assistant", "ALAS"));
1323  commands.push_back(new CUICommand(eCmdRemoveAlignments, "Remove Alignments", "Remove Alignments from Selected Object", "RASO"));
1324  commands.push_back(new CUICommand(eCmdRemoveGraphs, "Remove Graphs", "Remove Graphs from Selected Object", "RGSO"));
1325  commands.push_back(new CUICommand(eCmdRemoveGenomeProjectId, "Remove All Genome Project IDs", "Remove All Genome Project Ids from Selected Object", "RGPIDSO"));
1326  commands.push_back(new CUICommand(eCmdRemoveEmptyGenomeProjectId, "Remove Empty Genome Project IDs", "Remove Empty Genome Project Ids from Selected Object", "REGPIDSO"));
1327  commands.push_back(new CUICommand(eCmdTaxFixCleanup, "Tax_fix/Cleanup", "Fix Taxonomy and Perform Basic and Extended Cleanup", "TFCU"));
1328  commands.push_back(new CUICommand(eCmdTaxFixCleanup_ext, "Lookup Taxonomy and Cleanup Record", "Lookup Taxonomy and Cleanup Record", "TFCU"));
1329  commands.push_back(new CUICommand(eCmdSpecificHostCleanup, "Specific Host Cleanup", "Specific Host Cleanup", "SHCU"));
1330  commands.push_back(new CUICommand(eCmdExtendedCleanup, "SeriousSeqEntryCleanup", "Perform Basic and Extended Cleanup", "SSEC"));
1331  commands.push_back(new CUICommand(eCmdFixNonReciprocalLinks, "Fix Non-Reciprocal Links", "Fix Non-Reciprocal Feature ID Links", "FNRL"));
1332  commands.push_back(new CUICommand(eCmdDisableStrainForwarding, "Globally Disable Strain Forwarding", "Globally Disable Strain Forwarding", "GDSF"));
1333  commands.push_back(new CUICommand(eCmdEnableStrainForwarding, "Globally Enable Strain Forwarding", "Globally Disable Strain Forwarding", "GESF"));
1334  commands.push_back(new CUICommand(eCmdEditPubs, "Edit Publications", "Edit Publications", "EP"));
1335  commands.push_back(new CUICommand(eCmdGlobalPubmedIdLookup, "Global PubMedId Lookup", "Global PubMedId Lookup", "GPMIDL"));
1336  commands.push_back(new CUICommand(eCmdFixCapitalizationAll, "Fix All Capitalization", "Fix All Capitalization for Selected Object", "FACSO"));
1337  commands.push_back(new CUICommand(eCmdFixCapitalizationAuthors, "Fix Capitalization in Authors", "Fix Capitalization in Authors for Selected Object", "FCASO"));
1338  commands.push_back(new CUICommand(eCmdFixCapitalizationTitles, "Fix Capitalization in Titles", "Fix Capitalization in Titles for Selected Object", "FCTSO"));
1339  commands.push_back(new CUICommand(eCmdFixCapitalizationAffiliation, "Fix Capitalization in Affiliations", "Fix Capitalization in Affiliations for Selected Object", "FCAfSO"));
1340  commands.push_back(new CUICommand(eCmdFixCapitalizationCountry, "Fix Capitalization in Countries", "Fix Capitalization in Countries for Selected Object", "FCCSO"));
1341  commands.push_back(new CUICommand(eCmdRemoveUnpublishedPublications, "Remove Unpublished Publications", "Remove Unpublished Publications from Selected Object", "RUPSO"));
1342  commands.push_back(new CUICommand(eCmdRemoveInPressPublications, "Remove In Press Publications", "Remove In Press Publications from Selected Object", "RIPSO"));
1343  commands.push_back(new CUICommand(eCmdRemovePublishedPublications, "Remove Published Publications", "Remove Published Publications from Selected Object", "RPPSO"));
1344  commands.push_back(new CUICommand(eCmdRemoveCollidingPublications, "Remove Colliding Publications", "Remove Colliding Publications from Selected Object", "RCPSO"));
1345  commands.push_back(new CUICommand(eCmdRemoveAllPublications, "Remove All Publications", "Remove All Publications from Selected Object", "RAPSO"));
1346  commands.push_back(new CUICommand(eCmdRemoveAuthorConsortiums, "Remove Author Consortiums", "Remove Author Consortiums from Selected Object", "RACSO"));
1347  commands.push_back(new CUICommand(eCmdReverseAuthorNames, "Reverse Author Names", "Reverse Author Names for Selected Object", "RANSO"));
1348  commands.push_back(new CUICommand(eCmdStripAuthorSuffixes, "Strip Author Suffixes", "Strip Author Suffixes from Selected Object", "SASSO"));
1349  commands.push_back(new CUICommand(eCmdTruncateAuthorMiddleInitials, "Truncate Author Middle Initials", "Truncate Author Middle Initials from Selected Object", "TAMISO"));
1350  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"));
1351  commands.push_back(new CUICommand(eCmdConvertAuthorToConsortiumAll, "Convert All Authors to Consortium", "Convert All Authors To Consortium For Selected Object", "CAATCSO"));
1352  commands.push_back(new CUICommand(eCmdAddCitSubForUpdate, "Add Cit-sub for Update", "Add Cit-sub For Update for Selected Object", "ACSFUSO"));
1353  commands.push_back(new CUICommand(eCmdFixUsaAndStates, "Fix USA and States", "Fix USA and States for Selected Object", "FUSSO"));
1354  commands.push_back(new CUICommand(eCmdRetranslateCDSObeyStop, "Obey Stop Codon", "Retranslate CDS, obey stop codon", "RCDSOSC"));
1355  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"));
1356  commands.push_back(new CUICommand(eCmdRetranslateCDSIgnoreStopExceptEnd_ext, "Retranslate Coding Regions", "Retranslate CDS, Ignore Stop Codon Except at End of Complete CDS", "RCDSISCEAE"));
1357  commands.push_back(new CUICommand(eCmdRetranslateCDSChooseFrame, "Choose Frame with No Stop Codon", "Retranslate CDS, Choose Frame With No Stop Codon", "RCDSCF"));
1358  commands.push_back(new CUICommand(eCmdEditCdsFrame, "Edit Coding Region Frame", "Edit Coding Region Frame", "ECRF"));
1359  commands.push_back(new CUICommand(eCmdRestoreRNAediting, "Restore RNA Editing of CDS", "Restore RNA Editing", "RRNAE"));
1360  commands.push_back(new CUICommand(eCmdResynchronizePartialsCDS, "Resynchronize CDS Partials", "Resynchronize CDS Partials", "RCDSP"));
1361  commands.push_back(new CUICommand(eCmdAddTranslExcept, "Add Translational Exceptions with Comment", "Add Translational Exceptions with Comment", "ATEWC"));
1362  commands.push_back(new CUICommand(eCmdRemoveAllStructuredComments,"Remove All Structured Comments","Remove All Structured Comments from Selected Object","RASCSO"));
1363  commands.push_back(new CUICommand(eCmdRemoveEmptyStructuredComments,"Remove Empty Structured Comments","Remove Empty Structured Comments from Selected Object","RESCSO"));
1364  commands.push_back(new CUICommand(eCmdModifyStructuredComment,"Remove Structured Comment Field","Remove Structured Comment Field from Selected Object","RSCFSO"));
1365  commands.push_back(new CUICommand(eCmdSetGlobalRefGeneStatus, "Set Global RefGene Status", "Set Global RefGene Status", "SGRGS"));
1366  commands.push_back(new CUICommand(eCmdClearKeywords, "Clear Keywords", "Clear Keywords", "CLKW"));
1367  commands.push_back(new CUICommand(eCmdClearNomenclature, "Clear Nomenclature", "Clear Nomenclature", "CLNMC"));
1368  commands.push_back(new CUICommand(eCmdConvertToDelayedGenProdSetQuals,"Convert to Delayed Gen-Prod-Set Qualifiers", "Convert to Delayed Gen-Prod-Set Qualifiers", "CDGPSQ"));
1369  commands.push_back(new CUICommand(eCmdConvertRptUnitRangeToLoc, "Convert Repeat-region Rpt-unit-range to Location", "Convert repeat-region rpt-unit-range to location", "CRRL"));
1370  commands.push_back(new CUICommand(eCmdRemoveStructuredCommentKeyword,"Remove Structured Comment Keyword","Remove Structured Comment Keyword from Selected Object","RSCKSO"));
1371  commands.push_back(new CUICommand(eCmdAddStructuredCommentKeyword ,"Add Structured Comment Keyword","Add Structured Comment Keyword to Selected Object","ASCKSO"));
1372  commands.push_back(new CUICommand(eCmdAddKeywordGDS,"GDS", "Add Keyword GDS", "AKG"));
1373  commands.push_back(new CUICommand(eCmdAddKeywordTPA_inferential,"TPA:inferential","Add Keyword TPA:inferential", "AKTI"));
1374  commands.push_back(new CUICommand(eCmdAddKeywordTPA_experimental,"TPA:experimental","Add Keyword TPA:experimental","AKTE"));
1375  commands.push_back(new CUICommand(eCmdAddKeywordTPA_assembly,"TPA:assembly","Add Keyword TPA:assembly","AKTA"));
1376  commands.push_back(new CUICommand(eCmdAddKeywordTPA_specialistdb, "TPA:specialist_db", "Add Keyword: TPA:specialist_db", "AKTSDB"));
1377  commands.push_back(new CUICommand(eCmdAddKeywordWithConstraint, "With Constraint", "Add Keyword With Constraint", "AKWC"));
1378  commands.push_back(new CUICommand(eCmdAddGenomeAssemblyStructuredComment, "Add Genome Assembly Structured Comment", "Add Genome Assembly Structured Comment", "AGASC"));
1379  commands.push_back(new CUICommand(eCmdAddAssemblyStructuredComment, "Add Assembly Structured Comment", "Add Assembly Structured Comment", "AASC"));
1380  commands.push_back(new CUICommand(eCmdReorderStructuredComment,"Reorder Structured Comment","Reorder Structured Comment in Selected Object","RSCSO"));
1381  commands.push_back(new CUICommand(eCmdConvertComment,"Convert Structured Comment","Convert Structured Comment in Selected Object","CSCSO"));
1382  commands.push_back(new CUICommand(eCmdParseComment,"Parse Structured Comment","Parse Structured Comment in Selected Object","PSCSO"));
1383  commands.push_back(new CUICommand(eCmdExportStructuredCommentsTable, "Export Structured Comment Table", "Export Structured Comment Table", "ESCT"));
1384  commands.push_back(new CUICommand(eCmdLoadStructComments, "Load Structured Comments from Table", "Load Structured Comments from Table", "LSCT"));
1385  commands.push_back(new CUICommand(eCmdIllegalQualsToNote, "Convert Illegal Qualifiers to Note", "Convert Illegal Qualifiers to Note", "CIQN"));
1386  commands.push_back(new CUICommand(eCmdRmIllegalQuals,"Remove Illegal Qualifiers", "Remove Illegal Qualifiers", "RMIQ"));
1387  commands.push_back(new CUICommand(eCmdWrongQualsToNote,"Convert Wrong Qualifiers to Note", "Convert Wrong Qualifiers to Note", "CWQN"));
1388  commands.push_back(new CUICommand(eCmdConvertBadInference, "Convert Bad Inference Qualifiers to Notes", "Convert Bad Inference Qualifiers to Notes", "CBIN"));
1389  commands.push_back(new CUICommand(eCmdRmWrongQuals,"Remove Wrong Qualifiers", "Remove Wrong Qualifiers", "RMWQ"));
1390  commands.push_back(new CUICommand(eCmdRemoveDbXrefsCDS,"From CDSs", "Remove DbXrefs from CDSs","RMDBXR"));
1391  commands.push_back(new CUICommand(eCmdRemoveDbXrefsGenes,"From Genes", "Remove DbXrefs from Genes","RMDBXR"));
1392  commands.push_back(new CUICommand(eCmdRemoveDbXrefsRNA,"From RNAs", "Remove DbXrefs from RNAs","RMDBXR"));
1393  commands.push_back(new CUICommand(eCmdRemoveDbXrefsAllFeats,"From All Features", "Remove DbXrefs from All Features","RMDBXR"));
1394  commands.push_back(new CUICommand(eCmdRemoveDbXrefsBioSource,"From All BioSources","Remove DbXrefs from All BioSources", "RMDBXR"));
1395  commands.push_back(new CUICommand(eCmdRemoveDbXrefsBioSourceAndFeats, "From All Features and BioSources", "Remove DbXrefs from All Features and BioSources", "RMDBXR"));
1396  commands.push_back(new CUICommand(eCmdRemoveTaxonFeats, "From Features", "Remove Taxons From Features", "RMTFF"));
1397  commands.push_back(new CUICommand(eCmdRemoveTaxonFeatsAndBioSource, "From Features And BioSources", "Remove Taxons From Features And BioSources", "RMTFFBS"));
1398  commands.push_back(new CUICommand(eCmdGroupExplode, "Group Explode", "Group Explode", "GREX"));
1399  commands.push_back(new CUICommand(eCmdFindASN1, "Find ASN.1", "Find ASN.1", "FA1"));
1400  commands.push_back(new CUICommand(eCmdFuseFeatures, "Fuse Features", "Fuse Features", "FUFE"));
1401  commands.push_back(new CUICommand(eCmdFuseJoinsInLocs, "Fuse Joins in Locations", "Fuse Joins in Locations", "FJIL"));
1402  commands.push_back(new CUICommand(eCmdExplodeRNAFeats, "Explode RNA Features", "Explode RNA Features", "ERNAF"));
1403  commands.push_back(new CUICommand(eCmdAssignFeatureIds,"Assign Feature IDs", "Assign Feature IDs for Selected Object","AFIDSO"));
1404  commands.push_back(new CUICommand(eCmdClearFeatureIds,"Clear Feature IDs and Xrefs", "Clear Feature IDs for Selected Object","CFIDSO"));
1405  commands.push_back(new CUICommand(eCmdReassignFeatureIds,"Reassign Feature IDs", "Reassign Feature IDs for Selected Object","RFIDSO"));
1406  commands.push_back(new CUICommand(eCmdUniqifyFeatureIds,"Uniqify Feature IDs", "Uniqify Feature IDs for Selected Object","UFIDSO"));
1407  commands.push_back(new CUICommand(eCmdTrimJunkInPrimerSeqs,"Trim Junk in Primer Sequences","Trim Junk In Primer Seqs for Selected Object","TJIPSSO"));
1408  commands.push_back(new CUICommand(eCmdFixiInPrimerSeqs,"Fix i in Primer Sequences","Fix i in Primer Seqs for Selected Object","FIIPSSO"));
1409  commands.push_back(new CUICommand(eCmdPrefixAuthWithTax, "Prefix Authority with Organism", "Prefix Authority with Organism", "PAWO"));
1410  commands.push_back(new CUICommand(eCmdFocusSet, "Set", "BioSource is_focus is set", "SFSET"));
1411  commands.push_back(new CUICommand(eCmdFocusClear, "Clear", "BioSource is_focus is clear", "SFCLE"));
1412  commands.push_back(new CUICommand(eCmdSetTransgSrcDesc, "Set Transgenic on Source Descriptor", "Set Transgenic on Source Desc when Source Feat present", "STOSD"));
1413  commands.push_back(new CUICommand(eCmdSplitDblinkQuals, "Split DBLink Qualifiers at Commas", "Split DBLink Quals at Commas", "SDQAC"));
1414  commands.push_back(new CUICommand(eCmdFixOrgModInstitution,"Fix OrgMod Institution Code","Fix OrgMod Institution Code for Selected Object","FOMICSO"));
1415  commands.push_back(new CUICommand(eCmdFixStructuredVouchers, "Fix Structured Vouchers", "Fix Structured Vouchers", "FSTV"));
1416  commands.push_back(new CUICommand(eCmdSwapPrimerSeqName,"Swap Primer Sequence and Name","Swap Primer Seq and Name for Selected Object","SPSNSO"));
1417  commands.push_back(new CUICommand(eCmdMergePrimerSets,"Merge Primer Sets","Merge Primer Sets for Selected Object","MPSSO"));
1418  commands.push_back(new CUICommand(eCmdSplitPrimerSets,"Split Primer Sets by Position","Split Primer Sets by Position for Selected Object","SPSBPSO"));
1419  commands.push_back(new CUICommand(eCmdAppendModToOrg,"Append Modifier to Organism","Append Mod To Org for Selected Object","AMTOSO"));
1420  commands.push_back(new CUICommand(eCmdParseCollectionDateMonthFirst,"Parse Collection Date Month First","Parse Collection Date Month First for Selected Object","PCDMFSO"));
1421  commands.push_back(new CUICommand(eCmdParseCollectionDateDayFirst,"Parse Collection Date Day First","Parse Collection Date Day First for Selected Object","PCDDFSO"));
1422  commands.push_back(new CUICommand(eCmdCountryFixupCap,"Country Fixup Fix Capitalization after Colon","Country Fixup Fix Capitalization After Colon","CFFCAC"));
1423  commands.push_back(new CUICommand(eCmdCountryFixupNoCap,"Country Fixup Do Not Fix Capitalization after Colon","Country Fixup Do Not Fix Capitalization After Colon","CFDNFCAC"));
1424  commands.push_back(new CUICommand(eCmdVectorTrim, "Vector Search and Trim Tool", "Vector Search and Trim Tool", "VSTT"));
1425  commands.push_back(new CUICommand(eCmdSelectTarget, "Select Target", "Select Target", "ST"));
1426  commands.push_back(new CUICommand(eCmdSelectTarget_ext, "Select Specific Sequence by Sequence ID", "Select Specific Sequence by Sequence ID", "ST"));
1427  commands.push_back(new CUICommand(eCmdSelectFeature, "Select Features", "Select Features", "SF"));
1428  commands.push_back(new CUICommand(eCmdApplyCDS, "Add CDS", "Add CDS", "AC"));
1429  commands.push_back(new CUICommand(eCmdApplyAddRNA, "Add RNA", "Add RNA", "AR"));
1430  commands.push_back(new CUICommand(eCmdApplyAddOther, "Add Other Feature", "Add other Feature", "AOF"));
1431  commands.push_back(new CUICommand(eCmdApplyAddOther_ext, "Add Other Feature (Non CDS, RNA)", "Add other Feature", "AOF"));
1432  commands.push_back(new CUICommand(eCmdAddFeatureBetween, "Add Feature Between", "Add Feature Between", "AFB"));
1433  commands.push_back(new CUICommand(eCmdValidate, "Validate", "Validate", "V"));
1434  commands.push_back(new CUICommand(eCmdValidate_ext, "Validation Report", "Validate", "V"));
1435  commands.push_back(new CUICommand(eCmdValidateNoAlignments, "Validate No Alignments", "Validate no Alignments", "VNA"));
1436  commands.push_back(new CUICommand(eCmdValidateCheckInferences, "Validate Check Inferences", "Validate Check Inferences", "VCI"));
1437 // commands.back()->AddAccelerator(wxACCEL_NORMAL, 'v');
1438  commands.push_back(new CUICommand(eCmdSortUniqueCountText, "SUC (Sort Unique Count)", "Sort Unique Count", "SUC"));
1439  commands.push_back(new CUICommand(eCmdSortUniqueCountTree, "cSUC (Clickable SUC)", "Clickable Sort Unique Count", "SUC"));
1440  commands.push_back(new CUICommand(eCmdSortUniqueCountTree_ext, "FlatFile Summary", "Clickable Sort Unique Count", "SUC"));
1441  commands.push_back(new CUICommand(eCmdDiscrepancy, "Discrepancy Report", "Discrepancy Report", "DR"));
1442  commands.push_back(new CUICommand(eCmdOncaller, "Oncaller Report", "Oncaller Report", "OR"));
1443  commands.push_back(new CUICommand(eCmdSubmitter_ext, "Submitter Report", "Submitter Report", "SR"));
1444  commands.push_back(new CUICommand(eCmdMega, "Mega Report", "Mega Report", "MR"));
1445  commands.push_back(new CUICommand(eCmdDiscrepancyList, "List Discrepancy Tests", "List Discrepancy Tests", "LDT"));
1446  commands.push_back(new CUICommand(eCmdAutodefDefaultOptions, "Autodef", "Autodef Default Options", "ADO"));
1447  commands.push_back(new CUICommand(eCmdAutodefOptions, "Autodef Select Options", "Autodef Select Options", "ADSO"));
1448  commands.push_back(new CUICommand(eCmdAutodefMisc, "Autodef Misc Feats", "Autodef Misc Feats", "ADMF"));
1449  commands.push_back(new CUICommand(eCmdAutodefId, "Autodef ID", "Autodef ID", "ADID"));
1450  commands.push_back(new CUICommand(eCmdAutodefNoMods, "Autodef No Modifiers", "Autodef No Modifiers", "ADNM"));
1451  commands.push_back(new CUICommand(eCmdAutodefPopset, "Add Popset Titles", "Add Popset Titles", "ADPT"));
1452  commands.push_back(new CUICommand(eCmdAutodefRefresh, "Refresh DefLine with Previous Options", "Refresh Definition Line", "RDEFL"));
1453  commands.push_back(new CUICommand(eCmdInstantiateProteinTitles, "PT_Cleanup", "PT_Cleanup Protein Titles", "PTCU"));
1454  commands.push_back(new CUICommand(eCmdRemoveAllFeatures, "Remove All Features", "Remove All Features", "RAF"));
1455  commands.push_back(new CUICommand(eCmdRemoveDupFeats, "All Feature Types", "Remove Duplicate Features", "RDF"));
1456  commands.push_back(new CUICommand(eCmdRemoveDupFeats_ext, "Remove Duplicate Features", "Remove Duplicate Features", "RDF"));
1457  commands.push_back(new CUICommand(eCmdRemoveDupFeatsWithOptions, "Features with Options", "Remove Duplicate Feats With Options", "RDFWO"));
1458  commands.push_back(new CUICommand(eCmdRemoveDupFeatsWithOptions_ext, "Remove Duplicate Features with Options", "Remove Duplicate Feats With Options", "RDFWO"));
1459  commands.push_back(new CUICommand(eCmdResolveIntersectingFeats, "Resolve Intersecting Feature Locations", "Resolve Intersecting Feature Locations", "RIFL"));
1460  commands.push_back(new CUICommand(eCmdAddSequences, "Add Sequences", "Add Sequences", "AS"));
1461  commands.push_back(new CUICommand(eCmdApplySourceQual, "Apply Source Qualifier", "Apply Source Qual", "ASQ"));
1462  commands.push_back(new CUICommand(eCmdEditSourceQual, "Edit Source Qualifier", "Edit Source Qual", "ESQ"));
1463  commands.push_back(new CUICommand(eCmdConvertSourceQual, "Convert Source Qualifier", "Convert Source Qual", "CSQ"));
1464  commands.push_back(new CUICommand(eCmdSwapSourceQual, "Swap Source Qualifiers", "Swap Source Qual", "SSQ"));
1465  commands.push_back(new CUICommand(eCmdRemoveSourceQual, "Remove Source Qualifier", "Remove Source Qual", "RSQ"));
1466  commands.push_back(new CUICommand(eCmdApplyRNAQual, "Apply RNA Qualifier", "Apply RNA Qual", "ARQ"));
1467  commands.push_back(new CUICommand(eCmdEditRNAQual, "Edit RNA Qualifier", "Edit RNA Qual", "ERQ"));
1468  commands.push_back(new CUICommand(eCmdConvertRNAQual, "Convert RNA Qualifier", "Convert RNA Qual", "CRQ"));
1469  commands.push_back(new CUICommand(eCmdSwapRNAQual, "Swap RNA Qualifiers", "Swap RNA Qual", "SRQ"));
1470  commands.push_back(new CUICommand(eCmdRemoveRNAQual, "Remove RNA Qualifier", "Remove RNA Qual", "RRQ"));
1471  commands.push_back(new CUICommand(eCmdApplyCGPQual, "Apply CDS-Gene-Prot-mRNA Qualifier", "Apply CDS-Gene-Prot-mRNA Qual", "ACGPQ"));
1472  commands.push_back(new CUICommand(eCmdEditCGPQual, "Edit CDS-Gene-Prot-mRNA Qualifier", "Edit CDS-Gene-Prot-mRNA Qual", "ECGPQ"));
1473  commands.push_back(new CUICommand(eCmdConvertCGPQual, "Convert CDS-Gene-Prot-mRNA Qualifier", "Convert CDS-Gene-Prot-mRNA Qual", "CCGPQ"));
1474  commands.push_back(new CUICommand(eCmdSwapCGPQual, "Swap CDS-Gene-Prot-mRNA Qualifiers", "Swap CDS-Gene-Prot-mRNA Qual", "SCGPQ"));
1475  commands.push_back(new CUICommand(eCmdRemoveCGPQual, "Remove CDS-Gene-Prot-mRNA Qualifier", "Remove CDS-Gene-Prot-mRNA Qual", "RCGPQ"));
1476  commands.push_back(new CUICommand(eCmdApplyFeatQual, "Apply Feature Qualifier", "Apply Feature Qual", "AFQ"));
1477  commands.push_back(new CUICommand(eCmdEditFeatQual, "Edit Feature Qualifier", "Edit Feature Qual", "EFQ"));
1478  commands.push_back(new CUICommand(eCmdConvertFeatQual, "Convert Feature Qualifier", "Convert Feature Qual", "CFQ"));
1479  commands.push_back(new CUICommand(eCmdConvertSecondProtNameToDesc, "Second Protein Name to Description", "Second Protein Name to Description", "CSPND"));
1480  commands.push_back(new CUICommand(eCmdConvertDescToSecondProtName, "Protein Description to Second Name", "Protein Description to Second Name", "PDSN"));
1481  commands.push_back(new CUICommand(eCmdConvertDescToFeatComment, "Comment", "Convert Desc to Feat Comment", "CDFC"));
1482  commands.push_back(new CUICommand(eCmdConvertDescToFeatSource, "Source", "Concert Desc to Feat Source", "CDFS"));
1483  commands.push_back(new CUICommand(eCmdConvertDescToFeatPub, "All", "Convert Desc to Feat Pub", "CDFP"));
1484  commands.push_back(new CUICommand(eCmdConvertDescToFeatPubConstraint, "By Constraint", "Convert Desc to Feat Pub", "CDFPC"));
1485  commands.push_back(new CUICommand(eCmdConvertFeatToDescComment, "Comment", "Convert Feat to Desc Comment", "CFDC"));
1486  commands.push_back(new CUICommand(eCmdConvertFeatToDescSource, "Source", "Convert Feat to Desc Source", "CFDS"));
1487  commands.push_back(new CUICommand(eCmdConvertFeatToDescPub, "Publication", "Convert Feat to Desc Pub", "CFDP"));
1488  commands.push_back(new CUICommand(eCmdSwapFeatQual, "Swap Feature Qualifiers", "Swap Feature Qual", "SFQ"));
1489  commands.push_back(new CUICommand(eCmdRemoveFeatQual, "Remove Feature Qualifier", "Remove Feature Qual", "RFQ"));
1490  commands.push_back(new CUICommand(eCmdRemoveTextOutsideString, "Remove Text Outside String", "Remove Text Outside String", "RTOS"));
1491  commands.push_back(new CUICommand(eCmdParseText, "Parse Text", "Parse Text", "PT"));
1492  commands.push_back(new CUICommand(eCmdParseTextFromDefline, "Parse Text", "Parse Text", "PTDL"));
1493  commands.push_back(new CUICommand(eCmdParseLocalToSrc, "Parse Local ID to Source", "Parse Local ID to Src", "PLIDTS"));
1494  commands.push_back(new CUICommand(eCmdRemoveTextInsideStr, "Remove Text Inside String", "Remove Text Inside String", "RTIS"));
1495  commands.push_back(new CUICommand(eCmdLowercaseQuals, "Lowercase Qualifiers", "Lowercase Qualifiers", "LQ"));
1496  commands.push_back(new CUICommand(eCmdConvertFeatures, "Convert Features", "Convert Features", "CF"));
1497  commands.push_back(new CUICommand(eCmdCdsToMatPeptide, "Convert CDS to Mat-peptide", "Convert CDS to mat-peptide", "CDSTMP"));
1498  commands.push_back(new CUICommand(eCmdConvertCdsToMiscFeat, "Convert CDS to Misc-feature or Pseudogene", "Convert CDS to misc-feat or Pseudogene", "CCDSMF"));
1499  commands.push_back(new CUICommand(eCmdConvertCdsWithInternalStopToMiscFeat, "To Misc-feature", "Convert CDS with Internal Stop Codon to Misc_feat", "CCDSWIMF"));
1500  commands.push_back(new CUICommand(eCmdConvertCdsWithInternalStopToMiscFeatViral, "To Misc-feature (Viral)", "Convert CDS with Internal Stop Codon to Misc_feat (Viral)", "CCDSWIMFV"));
1501  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"));
1502  commands.push_back(new CUICommand(eCmdConvertCdsWithGapsToMiscFeat, "Convert CDS with Internal Gaps to misc-feat", "Convert CDS with Internal Gaps to misc-feat", "CCDSWGMF"));
1503  commands.push_back(new CUICommand(eCmdTableReader, "Table Reader", "Table Reader", "TR"));
1504  commands.push_back(new CUICommand(eCmdTableReader_ext, "Use Table Reader", "Table Reader", "TR"));
1505  commands.push_back(new CUICommand(eCmdTableReaderClipboard, "Table Reader from Clipboard", "Table Reader from Clipboard", "TRFC"));
1506  commands.push_back(new CUICommand(eCmdBulkSourceEdit, "Bulk Source Edit", "Bulk Source Edit", "BE"));
1507  commands.push_back(new CUICommand(eCmdBulkCdsEdit, "Bulk CDS Edit", "Bulk CDS Edit", "BCDSE"));
1508  commands.push_back(new CUICommand(eCmdBulkGeneEdit, "Bulk Gene Edit", "Bulk Gene Edit", "BGENEE"));
1509  commands.push_back(new CUICommand(eCmdBulkRnaEdit, "Bulk RNA Edit", "Bulk RNA Edit", "BRNAE"));
1510  commands.push_back(new CUICommand(eCmdBulkMiscFeatEdit, "Bulk Misc Feat Edit", "Bulk Misc Feat Edit", "BMISCFE"));
1511  commands.push_back(new CUICommand(eCmdCorrectGenes, "Correct Genes for CDSs or mRNAs", "Correct Genes for CDSs or mRNAs", "CGFCOM"));
1512  commands.push_back(new CUICommand(eCmdSegregateSets, "Segregate Sets", "Segregate Sets", "SEGSET"));
1513  commands.push_back(new CUICommand(eCmdSequesterSets, "Sequester Sets", "Sequester Sets", "SEQSET"));
1514  commands.push_back(new CUICommand(eCmdDescriptorPropagateDown, "Propagate Descriptors", "Propagate Descriptors", "PRDS"));
1515  commands.push_back(new CUICommand(eCmdReorderSeqById, "Reorder by ID", "Reorder by ID", "RBID"));
1516  commands.push_back(new CUICommand(eCmdCombineSelectedGenesIntoPseudogenes,"Combine Selected Genes into Pseudogenes", "Combine selected genes into pseudogenes","CSGPG"));
1517  commands.push_back(new CUICommand(eCmdWithdrawSequences, "Withdraw Sequences", "Withdraw Sequences", "WSEQ"));
1518  commands.push_back(new CUICommand(eCmdAddSet, "Add Set", "Add Set", "AS"));
1519  commands.push_back(new CUICommand(eCmdPropagateDBLink, "Propagate DBLink Descriptors", "Propagate DBLink Descriptors", "PDBLD"));
1520  commands.push_back(new CUICommand(eCmdChangeSetClass, "Convert Set Type", "Convert Set Type", "CST"));
1521  commands.push_back(new CUICommand(eCmdMolInfoEdit, "MolInfo Edit", "MolInfo Edit", "MIE"));
1522  commands.push_back(new CUICommand(eCmdExportTable,"Export Table", "Export Table", "ETBL"));
1523  commands.push_back(new CUICommand(eCmdParseStrainSerotypeFromNames, "Parse Strain, Serotype from Names", "Parse Strain, Serotype from Names", "PSSFN"));
1524  commands.push_back(new CUICommand(eCmdAddStrainSerotypeToNames, "Add Strain, Serotype to Names", "Add Strain Serotype to Names", "ASSTN"));
1525  commands.push_back(new CUICommand(eCmdFixupOrganismNames, "Fixup Organism Names", "Fixup Organism Names", "FON"));
1526  commands.push_back(new CUICommand(eCmdSplitQualifiersAtCommas, "Split Qualifiers at Commas", "Split Quals at Commas", "SQAC"));
1527  commands.push_back(new CUICommand(eCmdSplitStructuredCollections, "Split Structured Collections", "Split Structured Collections", "SSC"));
1528  commands.push_back(new CUICommand(eCmdTrimOrganismNames, "Trim Organism Names", "Trim Organism Names", "TON"));
1529  commands.push_back(new CUICommand(eCmdRemoveUnverified, "Remove Unverified", "Remove Unverified from Selected Object", "RUNVER"));
1530  commands.push_back(new CUICommand(eCmdRemoveUnreviewed, "Remove Unreviewed", "Remove Unreviewed from selected Object", "RUNREV"));
1531  commands.push_back(new CUICommand(eCmdAddNamedrRNA12S, "12S", "Add Named rRNA 12S", "ANR12S"));
1532  commands.push_back(new CUICommand(eCmdAddNamedrRNA16S, "16S", "Add Named rRNA 16S", "ANR16S"));
1533  commands.push_back(new CUICommand(eCmdAddNamedrRNA23S, "23S", "Add Named rRNA 23S", "ANR23S"));
1534  commands.push_back(new CUICommand(eCmdAddNamedrRNA18S, "18S", "Add Named rRNA 18S", "ANR18S"));
1535  commands.push_back(new CUICommand(eCmdAddNamedrRNA28S, "28S", "Add Named rRNA 28S", "ANR28S"));
1536  commands.push_back(new CUICommand(eCmdAddNamedrRNA26S, "26S", "Add Named rRNA 26S", "ANR26S"));
1537  commands.push_back(new CUICommand(eCmdAddNamedrRNASmall, "Small", "Add Named rRNA Small", "ANRSmall"));
1538  commands.push_back(new CUICommand(eCmdAddNamedrRNALarge, "Large", "Add Named rRNA Large", "ANRLarge"));
1539  commands.push_back(new CUICommand(eCmdAddControlRegion, "Control Region", "Add Control Region", "ACR"));
1540  commands.push_back(new CUICommand(eCmdAddMicrosatellite, "Microsatellite", "Add Microsatellite", "AM"));
1541  commands.push_back(new CUICommand(eCmdEditFeatEv, "Evidence", "Edit Feature Evidence", "EFE"));
1542  commands.push_back(new CUICommand(eCmdEditFeatLoc, "Location", "Edit Feature Location", "EFL"));
1543  commands.push_back(new CUICommand(eCmdEditFeatLoc_ext, "Edit Feature Location", "Edit Feature Location", "EFL"));
1544  commands.push_back(new CUICommand(eCmdEditFeatStrand, "Strand", "Edit Feature Location Strand", "EFLS"));
1545  commands.push_back(new CUICommand(eCmdEditFeatStrand_ext, "Edit Feature Strand", "Edit Feature Location Strand", "EFLS"));
1546  commands.push_back(new CUICommand(eCmdEditFeatRevInt, "Reverse Location Interval Order", "Reverse Location Interval Order", "RLIO"));
1547  commands.push_back(new CUICommand(eCmdEditFeatPseudo,"Pseudo", "Edit Feature Pseudo", "EFP"));
1548  commands.push_back(new CUICommand(eCmdEditFeatException, "Exceptions", "Edit Feature Exception", "EFE"));
1549  commands.push_back(new CUICommand(eCmdEditFeatExperiment, "Experiment", "Edit Feature Experiment", "EFEX"));
1550  commands.push_back(new CUICommand(eCmdEditFeatInference, "Inference", "Edit Feature Inference", "EFINF"));
1551  commands.push_back(new CUICommand(eCmdExtendPartialsConstr, "With Constraint", "Extend Partials With Constraint", "EPWC"));
1552  commands.push_back(new CUICommand(eCmdExtendPartialsAll, "All to Ends", "Extend Partials All to Ends", "EPAE"));
1553  commands.push_back(new CUICommand(eCmdGeneFromOtherFeat,"Gene Features from Other Features","Gene Features From Other Features","GFFOF"));
1554  commands.push_back(new CUICommand(eCmdGeneFeatFromXrefs, "Gene Features from Xrefs", "Gene Features From Xrefs", "GFFX"));
1555  commands.push_back(new CUICommand(eCmdGeneXrefsFromFeats, "Gene Xrefs from Features", "Gene Xrefs from Features", "GXFF"));
1556  commands.push_back(new CUICommand(eCmdRemoveAllGeneXrefs, "All Gene Xrefs", "All Gene Xrefs", "RAGX"));
1557  commands.push_back(new CUICommand(eCmdRemoveUnnecessaryGeneXrefs, "Unnecessary Gene Xrefs", "Unnecessary Gene Xrefs", "RUGX"));
1558  commands.push_back(new CUICommand(eCmdRemoveNonsuppressingGeneXrefs, "Non-Suppressing Gene Xrefs","Non-Suppressing Gene Xrefs","RNSGX")); ///?????
1559  commands.push_back(new CUICommand(eCmdRemoveOrphanLocusGeneXrefs, "Gene Xrefs with Orphan Gene Locus","Gene Xrefs with Orphan Gene Locus","ROLGX"));
1560  commands.push_back(new CUICommand(eCmdRemoveOrphanLocus_tagGeneXrefs, "Gene Xrefs with Orphan Locus-tag", "Gene Xrefs with Orphan Locus-tag", "ROLTGX"));
1561  commands.push_back(new CUICommand(eCmdRemoveGeneXrefs, "Choose Types and Constraint", "Choose Types and Constraint", "RGXTC"));
1562  commands.push_back(new CUICommand(eCmdRemoveDuplicateGOTerms, "Remove Duplicate GO Terms", "Remove Duplicate GeneOntology Terms", "RDGOT"));
1563  commands.push_back(new CUICommand(eCmdExtendCDS, "Extend Coding Region Ends", "Extend Coding Region Ends", "ECDSE"));
1564  commands.push_back(new CUICommand(eCmdTruncateCDS, "Truncate Proteins and CDSs at Stops", "Truncate Proteins and CDSs at Stops", "TPCDSS"));
1565  commands.push_back(new CUICommand(eCmdExtendCDSToStop, "Extend Proteins to Stops", "Extend Proteins to Stops", "EPROTS"));
1566  commands.push_back(new CUICommand(eCmdRecomputeIntervalsAndUpdateGenes, "And Update Genes", "And Update Genes", "RIUPG"));
1567  commands.push_back(new CUICommand(eCmdRecomputeIntervals, "Do Not Update Genes" , "Do Not Update Genes", "RINUPG"));
1568  commands.push_back(new CUICommand(eCmdCdsFromGeneMrnaExon, "CDS Features from Gene, mRNA or Exon", "CDS Features from Gene, mRNA, or exon", "CDSFME"));
1569  commands.push_back(new CUICommand(eCmdmRNAFromGeneCdsExon, "mRNA Features from Gene, CDS, or exon", "mRNA Features from Gene, CDS, or exon", "MRNAFGCE"));
1570  commands.push_back(new CUICommand(eCmdtRNAFromGene, "tRNA/rRNA features from Gene", "tRNA/rRNA features from Gene",""));
1571  commands.push_back(new CUICommand(eCmdExonFromCds,"CDS Intervals", "Exon Features from CDS Intervals", "EFCDS"));
1572  commands.push_back(new CUICommand(eCmdExonFromMRNA,"mRNA Intervals", "Exon features from mRNA intervals", "EFMRNA"));
1573  commands.push_back(new CUICommand(eCmdExonFromTRNA,"tRNA Intervals", "Exon features from tRNA intervals", "EFTRNA"));
1574  commands.push_back(new CUICommand(eCmdFixProductNamesDefault, "Default","Fix Product Names Default", "FPND"));
1575  commands.push_back(new CUICommand(eCmdFixProductNamesOptions, "With Options","Fix Product Names With Options", "FPNWO"));
1576  commands.push_back(new CUICommand(eCmdBulkApplyGenCode, "Batch Apply Genetic Code", "Batch Apply Genetic Code", "BAGC"));
1577  commands.push_back(new CUICommand(eCmdEditSeqEndsWithAlign,"Edit Sequence Ends with Alignment","Edit Sequence Ends with Alignment", "ESEWA"));
1578  commands.push_back(new CUICommand(eCmdEditSequenceEnds,"Edit Sequence Ends","Edit Sequence Ends", "ESE"));
1579  commands.push_back(new CUICommand(eCmdUpdateAlign, "Update Sequence Alignment", "Update SeqAlign", "UPSA"));
1580  commands.push_back(new CUICommand(eCmdSaveDescriptors, "Save Descriptors", "Save Descriptors", "SD"));
1581  commands.push_back(new CUICommand(eCmdCreateSeqHistForTpaDetailed, "Create Seq-hist for TPA Detailed", "Create Seq-hist for TPA detailed", "CSHTPAD"));
1582  commands.push_back(new CUICommand(eCmdCreateSeqHistForTpa, "Create Seq-hist for TPA", "Create Seq-hist for TPA", "CSHTPA"));
1583  commands.push_back(new CUICommand(eCmdRemoveSeqHistAssembly, "Remove Seq-Hist Assembly", "Remove Seq-Hist Assembly", "RSHA"));
1584  commands.push_back(new CUICommand(eCmdFarPointerSeq, "Far Pointer Sequences", "Far Pointer Sequences", "FPSEQ"));
1585  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"));
1586  commands.push_back(new CUICommand(eCmdCreateProteinId, "Create Protein IDs", "Create Protein IDs", "CPID"));
1587  commands.push_back(new CUICommand(eCmdCreateLocusTagGene, "Create Locus-tag Genes", "Create locus-tag genes", "CLTG"));
1588  commands.push_back(new CUICommand(eCmdNormalizeGeneQuals, "Normalize Gene Quals", "Copy gene qualifiers in xrefs on coding regions to parent genes", "NGQ"));
1589  commands.push_back(new CUICommand(eCmdGenusSpeciesFixup, "Genus-Species Fixup", "Genus-Species Fixup", "GSFU"));
1590  commands.push_back(new CUICommand(eCmdCountryConflict, "Lat-Lon Country Conflict Tool", "Lat-Lon Country Conflict Tool", "LLCCT"));
1591  commands.push_back(new CUICommand(eCmdDuplicate, "Duplicate", "Duplicate", "DUP"));
1592  commands.push_back(new CUICommand(eCmdCorrectIntervalOrder, "Correct Seq-loc Interval Order", "Correct Seq-loc Interval Order", "CLIO"));
1593  commands.push_back(new CUICommand(eCmdAddSecondary, "Add Secondary", "Add Secondary", "ADDS"));
1594  commands.push_back(new CUICommand(eCmdPackageFeaturesOnParts, "Package Features on Parts", "Package Features on Parts", "PFOP"));
1595  commands.push_back(new CUICommand(eCmdMakeBadSpecificHostTable, "Make Bad Specific-Host Table", "Make Bad Specific-Host Table", "MBSHT"));
1596  commands.push_back(new CUICommand(eCmdCorrectRNAStrand, "Correct RNA strandedness (Use SMART)", "Correct RNA strandedness", "CRSUS"));
1597  commands.push_back(new CUICommand(eCmdTrimNsRich, "Trim N-rich Sequence Ends", "Trim N-rich Sequence Ends", "TNR"));
1598  commands.push_back(new CUICommand(eCmdTrimNsTerminal, "Trim Terminal Ns", "Trim Terminal Ns", "TTN"));
1599  commands.push_back(new CUICommand(eCmdAddFluComments, "Add Flu Comments", "Add Flu Comments", "AFC"));
1600  commands.push_back(new CUICommand(eCmdLabelRna, "Label RNA", "Label RNA", "LRNA"));
1601  commands.push_back(new CUICommand(eCmdRemProtTitles, "All but RefSeq", "All but ReqSeq", "ABRS"));
1602  commands.push_back(new CUICommand(eCmdRemAllProtTitles, "All", "All", ""));
1603  commands.push_back(new CUICommand(eCmdApplyRNA_ITS, "Apply rRNA_ITS", "Apply rRNA_ITS", "ARNAITS"));
1604  commands.push_back(new CUICommand(eCmdEditingButtons, "Toolbar", "Sequin Special Editing Buttons", "SSEB"));
1605  commands.push_back(new CUICommand(eCmdMakeToolBarWindow, "Make ToolBar Window", "Make ToolBar Window", "MTBW"));
1606  commands.push_back(new CUICommand(eCmdEnableHupId, "Enable HUP-ID Loader", "Enable HUP-ID Loader", "", "", "", "", wxITEM_CHECK));
1607  commands.push_back(new CUICommand(eCmdIndexerTypeSelection, "Indexer Type", "Indexer Type", ""));
1608  commands.push_back(new CUICommand(eCmdTestDialogView, "Open Test DialogView", "Test DialogView", kEmptyStr));
1609  commands.push_back(new CUICommand(eCmdTestFormView, "Open Test FormView", "Test FormView", kEmptyStr));
1610  commands.push_back(new CUICommand(eCmdMacroEditor, "Macro Editor", "Macro Editor", "MACROE"));
1611  commands.push_back(new CUICommand(eCmdSuspectProductRulesEditor, "Suspect Product Rule Editor", "Suspect Product Rule Editor", "SPRE"));
1612  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesStrict, "Strict", "Adjust Consensus Splice Sites Strict", "ACSS"));
1613  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesStrict_ext, "Adjust CDS for Consensus Splice Sites (strict)", "Adjust Consensus Splice Sites Strict", "ACSS"));
1614  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesRelaxed, "Relaxed", "Adjust Consensus Splice Sites Relaxed", "ACSR"));
1615  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesRelaxed_ext, "Adjust CDS for Consensus Splice Sites (relaxed)", "Adjust Consensus Splice Sites Relaxed", "ACSR"));
1616  commands.push_back(new CUICommand(eCmdAdjustConsensusSpliceSitesConsensusEnds, "5' and 3' ends only", "Adjust Consensus Splice Sites Consensus Ends", "ACSENDS"));
1617  commands.push_back(new CUICommand(eCmdAdjustCDSForIntrons, "CDS", "Adjust CDS For Introns", "ACDSI"));
1618  commands.push_back(new CUICommand(eCmdAdjustrRNAForIntrons, "rRNA", "Adjust rRNA For Introns", "ARRNAI"));
1619  commands.push_back(new CUICommand(eCmdAdjusttRNAForIntrons, "tRNA", "Adjust tRNA For Introns", "ATRNAI"));
1620  commands.push_back(new CUICommand(eCmdAdjustmRNAForIntrons, "mRNA", "Adjust mRNA For Introns", "AMRNAI"));
1621  commands.push_back(new CUICommand(eCmdLatLonTool, "Lat-Lon Tool", "Lat-Lon Tool", "LLT"));
1622  commands.push_back(new CUICommand(eCmdCDSGeneRangeErrorSuppress, "Suppress", "CDS Gene Range Error Suppress", "CDSGRES"));
1623  commands.push_back(new CUICommand(eCmdCDSGeneRangeErrorRestore, "Restore", "CDS Gene Range Error Restore", "CDSGRER"));
1624  commands.push_back(new CUICommand(eCmdSuppressGenes, "Suppress Genes on Features", "Suppress Genes on Features", "SUPGF"));
1625  commands.push_back(new CUICommand(eCmdRemoveSegGaps, "Remove Seg Gaps", "Remove Seg Gaps", "RSEGGAPS"));
1626  commands.push_back(new CUICommand(eCmdRawSeqToDeltaByNs, "By Ns", "Raw Sequence To Delta By Ns", "RSDN"));
1627  commands.push_back(new CUICommand(eCmdRawSeqToDeltaByNs_ext, "Add Assembly Gaps to Sequence", "Add Assembly Gaps to Sequence" , "RSDN"));
1628  commands.push_back(new CUICommand(eCmdRawSeqToDeltaByLoc, "By Location", "By Location", "RSDL"));
1629  commands.push_back(new CUICommand(eCmdRawSeqToDeltaByAssemblyGapFeatures, "By Assembly_Gap Features", "By Assembly_Gap Features", ""));
1630  commands.push_back(new CUICommand(eCmdAdjustFeaturesForGaps, "Adjust Features for Gaps", "Adjust Features for Gaps", "AFFG"));
1631  commands.push_back(new CUICommand(eCmdDeltaSeqToRaw, "Delta Seq to Raw", "Delta Seq To Raw", "DSTR"));
1632  commands.push_back(new CUICommand(eCmdDeltaSeqToRaw_ext, "Remove Gap Features", "Remove Gap Features", "DSTR"));
1633  commands.push_back(new CUICommand(eCmdExpandGaps, "Expand Known Gaps to Include Flanking Ns", "Expand Known Gaps to Include Flanking Ns", "EKGFN"));
1634  commands.push_back(new CUICommand(eCmdConvertSelectedGapsToKnown, "To Known Length", "To Known Length", "CSGTK"));
1635  commands.push_back(new CUICommand(eCmdConvertSelectedGapsToUnknown, "To Unknown Length", "To Unknown Length", "CSGTU"));
1636  commands.push_back(new CUICommand(eCmdConvertGapsBySize, "Convert Known to Unknown (by Size)", "Convert Known to Unknown (by Size)", "CKTUS"));
1637  commands.push_back(new CUICommand(eCmdEditSelectedGaps, "Change Length of Selected Known Length Gaps", "Change Length of Selected Known Length Gaps", "CLSKG"));
1638  commands.push_back(new CUICommand(eCmdAddLinkageToGaps, "Add Linkage to All Gaps", "Add Linkage to All Gaps", "ALAG"));
1639  commands.push_back(new CUICommand(eCmdAddLinkageToGaps_ext, "Add Linkage Evidence to All Gaps", "Add Linkage to All Gaps", "ALAG"));
1640  commands.push_back(new CUICommand(eCmdCombineAdjacentGaps, "Combine Adjacent Gaps", "Combine Adjacent Gaps", "CAGAP"));
1641  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"));
1642  commands.push_back(new CUICommand(eCmdRmCultureNotes, "Remove Uncultured Notes", "Remove Uncultured Notes", "RUNN"));
1643  commands.push_back(new CUICommand(eCmdEditSeqId, "Edit Sequence IDs", "Edit Sequence IDs", "ESID"));
1644  commands.push_back(new CUICommand(eCmdRemoveLocalSeqIdsFromNuc, "From Nucleotides", "Remove Local Seq-id from Nucleotides", "RLIDN"));
1645  commands.push_back(new CUICommand(eCmdRemoveLocalSeqIdsFromProt, "From Proteins", "Remove Local Seq-id from Proteins", "RLIDP"));
1646  commands.push_back(new CUICommand(eCmdRemoveLocalSeqIdsFromAll, "From All Bioseqs", "Remove Local Seq-id from All Bioseqs", "RLIDA"));
1647  commands.push_back(new CUICommand(eCmdRemoveGiSeqIdsFromAll, "GI IDs from Bioseqs", "GI IDs from Bioseqs", "RGIB"));
1648  commands.push_back(new CUICommand(eCmdRemoveGenbankSeqIdsFromProt, "From Proteins", "From Proteins", "RGBP"));
1649  commands.push_back(new CUICommand(eCmdRemoveGenbankSeqIdsFromAll, "From All Bioseqs", "From All Bioseqs", "RGBA"));
1650  commands.push_back(new CUICommand(eCmdRemoveSeqIdNamesFromProtFeats, "Seq-ID Name From Prot Feats", "Seq-ID Name From Prot Feats", "RSINP"));
1651  commands.push_back(new CUICommand(eCmdConvertAccessionToLocalIdsAll, "For All Sequences", "For All Sequences", "CACCLA"));
1652  commands.push_back(new CUICommand(eCmdConvertAccessionToLocalIdsNuc, "For Nucleotide Sequences", "For Nucleotide Sequences", "CACCLN"));
1653  commands.push_back(new CUICommand(eCmdConvertAccessionToLocalIdsProt, "For Protein Sequences", "For Protein Sequences", "CACCLP"));
1654  commands.push_back(new CUICommand(eCmdConvertAccessionToLocalIdsName, "GenBank.name to LocalID", "GenBank.name to LocalID", "CNAML"));
1655  commands.push_back(new CUICommand(eCmdLocalToGeneralId, "LocalIDs to GeneralIDs", "Local Seq-id to General Seq-id", "LIDGID"));
1656  commands.push_back(new CUICommand(eCmdGeneralToLocalId, "GeneralIDs to LocalIDs", "GeneralIDs to LocalIDs", "GIDTOL"));
1657  commands.push_back(new CUICommand(eCmdRemoveGeneralId, "General IDs", "General IDs", "RGID"));
1658  commands.push_back(new CUICommand(eCmdRemoveUnnecessaryExceptions, "Remove Unnecessary Exceptions", "Remove Unnecessary Exceptions", "RUNE"));
1659  commands.push_back(new CUICommand(eCmdEditHistory, "Edit History", "Edit History", "EH"));
1660  commands.push_back(new CUICommand(eCmdUpdate_Replaced_EC_numbers,"Update Replaced EC Numbers", "Update Replaced EC Numbers", "URECN"));
1661  commands.push_back(new CUICommand(eCmdUpdateSequence, "Single Sequence", "Update Single Sequence", "USSSEQ"));
1662  commands.push_back(new CUICommand(eCmdUpdateSequence_ext, "Update Sequence", "Update Single Sequence", "USSSEQ"));
1663  commands.push_back(new CUICommand(eCmdUpdateSequenceClipboard, "Single Sequence (Clipboard)", "Update Single Sequence from Clipboard", "USSCLIP"));
1664  commands.push_back(new CUICommand(eCmdUpdateSequenceAccession, "Download Accession", "Update Single Sequence Accession", "USSACC"));
1665  commands.push_back(new CUICommand(eCmdUpdateMultiSequences, "Multiple Sequences", "Update Multiple Sequences from File", "UMSSFILE"));
1666  commands.push_back(new CUICommand(eCmdUpdateMultiSeqClipboard, "Multiple Sequences (Clipboard)", "Update Multiple Sequences from Clipboard", "UMSSCLIP"));
1667  commands.push_back(new CUICommand(eCmdImportFeatureTable, "Import Feature Table", "Import Feature Table", "IMPFTBL"));
1668  commands.push_back(new CUICommand(eCmdImportFeatureTable_ext, "5 Column Feature Table", "Import Feature Table", "IMPFTBL"));
1669  commands.push_back(new CUICommand(eCmdImportFeatureTableClipboard, "Import Feature Table from Clipboard", "Import Feature Table from Clipboard", "IMPFTBLC"));
1670  commands.push_back(new CUICommand(eCmdImportGFF3, "Import GFF3 File", "Import GFF3 File", "IMGFF"));
1671  commands.push_back(new CUICommand(eCmdImportGFF3_ext, "GFF3 File", "Import GFF3 File", "IMGFF"));
1672  commands.push_back(new CUICommand(eCmdLoadSecondaryAccessions, "Extra Accessions", "Extra Accessions", "LSAEA"));
1673  commands.push_back(new CUICommand(eCmdLoadSecondaryAccessionsHistoryTakeover, "History Takeover", "History Takeover", "LSAHT"));
1674  commands.push_back(new CUICommand(eCmdAddGlobalCodeBreak, "Add Global Code Break", "Add Global Code Break", "AGCB"));
1675  commands.push_back(new CUICommand(eCmdApplyStructuredCommentField, "Apply Structured Comment Field", "Apply Structured Comment Field", "ASTRCMNTFLD"));
1676  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixHIVData, "HIVData", "Replace Structured Comment to HIVData", "RSTRCMNT1"));
1677  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixFluData, "FluData", "Replace Structured Comment to FluData", "RSTRCMNT2"));
1678  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIGSData, "MIGSData", "Replace Structured Comment to MIGSData", "RSTRCMNT3"));
1679  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIMSData, "MIMSData", "Replace Structured Comment to MIMSData", "RSTRCMNT4"));
1680  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIENSData, "MIENSData", "Replace Structured Comment to MIENSData", "RSTRCMNT5"));
1681  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIMARKS3_0, "MIMARKS:3.0", "Replace Structured Comment to MIMARKS:3.0", "RSTRCMNT6"));
1682  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIGS3_0, "MIGS:3.0", "Replace Structured Comment to MIGS:3.0", "RSTRCMNT7"));
1683  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixMIMS3_0, "MIMS:3.0", "Replace Structured Comment to MIMS:3.0", "RSTRCMNT8"));
1684  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixAssemblyData, "AssemblyData", "Replace Structured Comment to AssemblyData", "RSTRCMNT9"));
1685  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixGenAssData, "GenomeAssemblyData", "Replace Structured Comment to GAssemblyData", "RSTRCMNT10"));
1686  commands.push_back(new CUICommand(eCmdEditStructuredCommentPrefixSuffixiBol, "iBOL", "Replace Structured Comment to iBOL", "RSTRCMNT11"));
1687  commands.push_back(new CUICommand(eCmdLinkSelectedmRNACDS, "Link Selected CDS and mRNA Pair", "Link Selected CDS and mRNA Pair", "LSCDSMRNAP"));
1688  commands.push_back(new CUICommand(eCmdLinkmRNACDSOverlap, "By Overlap", "Link CDS and mRNA by Overlap", "LCDSMRNAO"));
1689  commands.push_back(new CUICommand(eCmdLinkmRNACDSProduct, "By Product", "Link CDS and mRNA by Product", "LCDSMRNAP"));
1690  commands.push_back(new CUICommand(eCmdLinkmRNACDSLabel, "By Label", "Link CDS and mRNA by Label", "LCDSMRNALAB"));
1691  commands.push_back(new CUICommand(eCmdLinkmRNACDSLabelLocation, "By Label and Location", "Link CDS and mRNA by Label and Location", "LCDSMRNALABLOC"));
1692  commands.push_back(new CUICommand(eCmdLinkmRNACDSProteinID, "By Protein-ID Qualifier", "Link CDS and mRNA by protein-id qualifier", "LCDSMRNAPRQUAL"));
1693  commands.push_back(new CUICommand(eCmdLinkmRNACDSTranscriptID, "By Transcript-ID Qualifier", "Link CDS and mRNA by transcript-id qualifier", "LCDSMRNATRQUAL"));
1694  commands.push_back(new CUICommand(eCmdLinkmRNACDSUnidirectional, "From Unidirectional Xrefs", "Link CDS and mRNA from unidirectional Xrefs", "LSCDSMRNAUNID"));
1695  commands.push_back(new CUICommand(eCmdShowLinkedmRNACDS, "Show Linked CDS or mRNA Feature", "Show Linked CDS or mRNA Feature", "SLINKCDSMRNA"));
1696  commands.push_back(new CUICommand(eCmdShowFeatureTable, "Show Feature Table", "Show Feature Table", "SFEATTBL"));
1697  commands.push_back(new CUICommand(eCmdShowFeatureTable_ext, "Feature Table", "Show Feature Table", "SFEATTBL"));
1698  commands.push_back(new CUICommand(eCmdRestoreFromFile, "Restore from File", "Restore from Local File", "RFFILE"));
1699  commands.push_back(new CUICommand(eCmdRestoreAndConvertSeqSubmit, "Restore and Convert SeqSubmit", "Restore and Convert SeqSubmit", "RCVFFILE"));
1700  commands.push_back(new CUICommand(eCmdViewSortedProteins, "View Sorted Proteins (FASTA)", "View Sorted Proteins (FASTA)", "VSPF"));
1701  commands.push_back(new CUICommand(eCmdCheckForMixedStrands, "Check for Mixed Strands", "Check for Mixed Strands", "CMSTRAND"));
1702  commands.push_back(new CUICommand(eCmdPrepareSeqSubmit, "Genome Submission Wizard", "Prepare a Submission", "PREPASUB"));
1703  commands.push_back(new CUICommand(eCmdSaveSubmissionFile, "Save Submission File", "Save Submission File", "SSUBF"));
1704  commands.push_back(new CUICommand(eCmdSaveASN1File, "Save ASN.1 File", "Save ASN.1 File", "SVASN"));
1705  commands.push_back(new CUICommand(eCmdHelpReports_ext, "Help", "Help Reports", "HELPR"));
1706  commands.push_back(new CUICommand(eCmdHelpImport_ext, "Help", "Help Import", "HELPI"));
1707  commands.push_back(new CUICommand(eCmdHelpSequences_ext, "Help", "Help Sequences", "HELPS"));
1708  commands.push_back(new CUICommand(eCmdHelpFeatures_ext, "Help", "Help Features", "HELPF"));
1709  commands.push_back(new CUICommand(eCmdHelpComments_ext, "Help", "Help Comments", "HELPC"));
1710  commands.push_back(new CUICommand(eCmdHelpEditingTools_ext, "Help", "Help Editing Tools", "HELPET"));
1711  commands.push_back(new CUICommand(eCmdUpdateTLSName, "Update Targeted Locus Name", "Update Targeted Locus Name", "UPTLSNAME"));
1712 
1713 
1715 
1716  commands.push_back(new CUICommand(eCmdAddDefLine, "Add Definition Line", "Add Definition Line", "ADL"));
1717  commands.push_back(new CUICommand(eCmdPrefixOrgToDefLine, "Organism", "Prefix Defline With Organism", "PDLORG"));
1718  commands.push_back(new CUICommand(eCmdPrefixStrainToDefLine, "Strain", "Prefix Defline With Strain", "PDLSTR"));
1719  commands.push_back(new CUICommand(eCmdPrefixCloneToDefLine, "Clone", "Prefix Defline With Clone", "PDLCLO"));
1720  commands.push_back(new CUICommand(eCmdPrefixIsolateToDefLine, "Isolate", "Prefix Defline With Isolate", "PDLISO"));
1721  commands.push_back(new CUICommand(eCmdPrefixHaplotToDefLine, "Haplotype", "Prefix Defline With Haplotype", "PDLH"));
1722  commands.push_back(new CUICommand(eCmdPrefixCultivarToDefLine, "Cultivar", "Prefix Defline With Cultivar", "PDLCULT"));
1723  commands.push_back(new CUICommand(eCmdPrefixListToDefLine, "List", "Prefix Defline From List", "PDLLIST"));
1724 
1725  // annotate descriptors commands
1726  commands.push_back(new CUICommand(eCmdCreateDescTPAAssembly, "TPA Assembly", "TPA Assembly", "TPAA"));
1727  commands.push_back(new CUICommand(eCmdCreateDescStructuredComment, "Structured Comment", "Structured Comment", "SCD"));
1728  commands.push_back(new CUICommand(eCmdCreateDescRefGeneTracking, "RefGene Tracking", "RefGene Tracking", "RGT"));
1729  commands.push_back(new CUICommand(eCmdCreateDescDBLink, "DBLink", "DBLink", "DBLD"));
1730  commands.push_back(new CUICommand(eCmdCreateDescUnverified, "Unverified", "Unverified", "UVD"));
1731  commands.push_back(new CUICommand(eCmdCreateDescUnreviewed, "Unreviewed", "Unreviewed", "UNREV"));
1732  commands.push_back(new CUICommand(eCmdCreateDescAuthorizedAccess, "Authorized Access", "Authorized Access", "AAD"));
1733  commands.push_back(new CUICommand(eCmdCreateDescGenomeAssemblyComment, "Genome Assembly", "Genome Assembly", "GAD"));
1734  commands.push_back(new CUICommand(eCmdCreateDescGenBankBlock, "GenBank Block", "GenBank Block", "GBBD"));
1735  commands.push_back(new CUICommand(eCmdCreateDescComment, "Comment", "Comment", "CD"));
1736  commands.push_back(new CUICommand(eCmdCreateDescComment_ext, "Add Free Text Comment", "Comment", "CD"));
1737  commands.push_back(new CUICommand(eCmdCreateDescTitle, "Title", "Title", "TD"));
1738  commands.push_back(new CUICommand(eCmdCreateDescMolinfo, "Molecule Description", "Molinfo", "MIDD"));
1739  commands.push_back(new CUICommand(eCmdCreateDescSource, "Biological Source", "BioSource", "BSD"));
1740  commands.push_back(new CUICommand(eCmdCreateDescPub, "Publication Descriptor", "Publication", "PD"));
1741  commands.push_back(new CUICommand(eCmdCreateDescPub_ext, "Add Publication", "Publication", "PD"));
1742  commands.push_back(new CUICommand(eCmdSubmitter, "Submitter Report", "Submitter Report", "SDR"));
1743 
1744  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixMIMS, "Add", "MIMS Comment", "AMIMC"));
1745  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixMIGS, "Add", "MIGS Comment", "AMIGC"));
1746  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixMIMARKS, "Add", "MIMARKS Comment", "AMIMARC"));
1747  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixMIENSData, "Add", "MIENS Comment", "AMIENC"));
1748  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixGenAnnData, "Add", "Genome Annotation Comment", "AGANNC"));
1749  commands.push_back(new CUICommand(eCmdCreateStructuredCommentPrefixSuffixGenAssData, "Add", "Genome Assembly Comment", "AGASSC"));
1750  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixMIMS, "Remove", "MIMS Comment", "RMIMC"));
1751  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixMIGS, "Remove", "MIGS Comment", "RMIGC"));
1752  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixMIMARKS, "Remove", "MIMARKS Comment", "RMIMARC"));
1753  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixMIENSData, "Remove", "MIENS Comment", "RMIENC"));
1754  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixGenAnnData, "Remove", "Genome Annotation Comment", "RGANNC"));
1755  commands.push_back(new CUICommand(eCmdDeleteStructuredCommentPrefixSuffixGenAssData, "Remove", "Genome Assembly Comment", "RGASSC"));
1756 
1757  return commands;
1758 }
1759 
1760 BEGIN_EVENT_TABLE(CSequenceEditingEventHandler, wxEvtHandler)
2283 
2284 
2285 // Please do not make overlapping UPDATE_UI_RANGEs. Every time there is an overlapping range here a cute kitten dies in horror!!!
2287 
2289 
2291 
2294 
2297  CSelectionServiceEvent::eClientAttached, CSelectionServiceEvent::eSelectionChanged,
2298  &CSequenceEditingEventHandler::x_OnSelectionEvent)
2299 END_EVENT_MAP()
2300 
2301 static
2302 WX_DEFINE_MENU(kEditingMenu)
2303  WX_SUBMENU("&Edit")
2306  WX_SUBMENU_INT("Update Sequences")
2312  WX_END_SUBMENU()
2315  WX_END_SUBMENU()
2316  WX_MENU_SEPARATOR_L("Contribs")
2317  WX_SUBMENU_INT("Sea&rch")
2318  WX_SUBMENU_INT("&Validate")
2322  WX_END_SUBMENU()
2325  WX_END_SUBMENU()
2326 
2327  WX_SUBMENU_EXT("Submission")
2330  WX_SUBMENU_EXT("Reports")
2338  WX_END_SUBMENU()
2339  WX_SUBMENU_EXT("Import")
2345  WX_END_SUBMENU()
2346  WX_SUBMENU_EXT("Sequences")
2359  WX_END_SUBMENU()
2360  WX_SUBMENU_EXT("Add Features")
2361  WX_SUBMENU_EXT("gene/mRNA/CDS")
2370  WX_END_SUBMENU()
2371  WX_SUBMENU_EXT("Structural RNAs")
2378  WX_END_SUBMENU()
2379  WX_SUBMENU_EXT("Regulatory")
2386  WX_END_SUBMENU()
2387  WX_SUBMENU_EXT("Protein Features")
2392  WX_END_SUBMENU()
2393  WX_SUBMENU_EXT("Other Features")
2408  WX_END_SUBMENU()
2411  WX_END_SUBMENU()
2413  WX_SUBMENU_EXT("Comments")
2415  WX_SUBMENU_EXT("MIMS Comment")
2418  WX_END_SUBMENU()
2419  WX_SUBMENU_EXT("MIGS Comment")
2422  WX_END_SUBMENU()
2423  WX_SUBMENU_EXT("MIMARKS Comment")
2426  WX_END_SUBMENU()
2427  WX_SUBMENU_EXT("MIENS Comment")
2430  WX_END_SUBMENU()
2431  WX_SUBMENU_EXT("GenomeAnnotation Comment")
2434  WX_END_SUBMENU()
2435  WX_SUBMENU_EXT("GenomeDataAssembly Comment")
2438  WX_END_SUBMENU()
2441  WX_END_SUBMENU()
2442  WX_SUBMENU_EXT("Editing Tools")
2458  WX_END_SUBMENU()
2459  WX_END_SUBMENU()
2460 
2461  WX_SUBMENU_INT("Advan&ced Editing")
2462  WX_SUBMENU_INT("Def Line")
2463  WX_SUBMENU_INT("Automatic Def Line")
2471  WX_END_SUBMENU()
2473  WX_SUBMENU_INT("Prefix Def Line With")
2481  WX_END_SUBMENU()
2483  WX_END_SUBMENU()
2493  WX_SUBMENU_INT("Source Focus")
2496  WX_END_SUBMENU()
2504  WX_SUBMENU_INT("PCR Fixes")
2510  WX_END_SUBMENU()
2511  WX_SUBMENU_INT("Influenza Virus Names")
2515  WX_END_SUBMENU()
2522  WX_SUBMENU_INT("Compare with Biosample")
2525  WX_END_SUBMENU()
2527  WX_SUBMENU_INT("Parse Organism Modifiers")
2529  WX_END_SUBMENU()
2530  WX_SUBMENU_INT("Consolidate Like Modifiers")
2533  WX_END_SUBMENU()
2534  WX_END_SUBMENU()
2535  WX_SUBMENU_INT("&Apply")
2538  WX_SUBMENU_INT("Add Named rRNA")
2547  WX_END_SUBMENU()
2551  WX_SUBMENU_INT("Add Common Feature")
2554  WX_END_SUBMENU()
2569  WX_SUBMENU_INT("Add Keyword")
2577  WX_END_SUBMENU()
2578  WX_SUBMENU_INT("Load Secondary Accessions from File")
2581  WX_END_SUBMENU()
2583  WX_END_SUBMENU()
2584  WX_SUBMENU_INT("&Remove")
2598  WX_SUBMENU_INT("Remove Text")
2601  WX_END_SUBMENU()
2602  WX_SUBMENU_INT("Remove Duplicate")
2606  WX_END_SUBMENU()
2613  WX_SUBMENU_INT("Remove Titles")
2614  WX_SUBMENU_INT("Protein")
2617  WX_END_SUBMENU()
2618  WX_END_SUBMENU()
2623  WX_SUBMENU_INT("Remove Xrefs")
2624  WX_SUBMENU_INT("Db_xrefs")
2631  WX_END_SUBMENU()
2632  WX_SUBMENU_INT("Taxon Xrefs")
2635  WX_END_SUBMENU()
2636  WX_SUBMENU_INT("Gene Xrefs")
2643  WX_END_SUBMENU()
2644  WX_END_SUBMENU()
2647  WX_SUBMENU_INT("Remove Proteins")
2651  WX_END_SUBMENU()
2652  WX_SUBMENU_INT("Remove IDs, SeqIDs, GI_IDs, LOCUS")
2653  WX_SUBMENU_INT("Local")
2657  WX_END_SUBMENU()
2658  WX_SUBMENU_INT("GenBank")
2661  WX_END_SUBMENU()
2665  WX_END_SUBMENU()
2667  WX_END_SUBMENU()
2671  WX_SUBMENU_INT("Convert CDS with Internal Stop Codon")
2675  WX_END_SUBMENU()
2690  WX_SUBMENU_INT("Convert IDs, Accessions, or GenBank.names")
2693  WX_SUBMENU_INT("Accession to LocalIDs")
2698  WX_END_SUBMENU()
2699  WX_END_SUBMENU()
2700  WX_SUBMENU_INT("Convert Second Protein Name and Description")
2703  WX_END_SUBMENU()
2704  WX_SUBMENU_INT("Convert Descriptors and Features")
2705  WX_SUBMENU_INT("Descriptor to Feature")
2708  WX_SUBMENU_INT("Publication")
2711  WX_END_SUBMENU()
2712  WX_END_SUBMENU()
2713  WX_SUBMENU_INT("Convert Full Length Feature to Descriptor")
2717  WX_END_SUBMENU()
2718  WX_END_SUBMENU()
2719  WX_END_SUBMENU()
2720  WX_SUBMENU_INT("&Edit")
2728  WX_SUBMENU_INT("Edit Feature")
2739  WX_END_SUBMENU()
2740  WX_SUBMENU_INT("Bulk Edit")
2746  WX_END_SUBMENU()
2747  WX_SUBMENU_INT("Extend Partial Features")
2750  WX_END_SUBMENU()
2762  WX_END_SUBMENU()
2763  WX_SUBMENU_INT("Authors and Publications")
2766  WX_SUBMENU_INT("Fix Capitalization")
2772  WX_END_SUBMENU()
2773  WX_SUBMENU_INT("Remove Publications")
2779  WX_END_SUBMENU()
2784  WX_SUBMENU_INT("Convert Author to Consortium")
2787  WX_END_SUBMENU()
2790  WX_END_SUBMENU()
2791  WX_SUBMENU_INT("CDS, Protein, and RNA")
2792  WX_SUBMENU_INT("Retranslate Coding Regions")
2796  WX_END_SUBMENU()
2800  WX_SUBMENU_INT("Adjust CDS for Consensus Splice Sites")
2804  WX_END_SUBMENU()
2805  WX_SUBMENU_INT("Adjust Features for Introns")
2810  WX_END_SUBMENU()
2814  WX_SUBMENU_INT("Recompute Suggested Intervals")
2817  WX_END_SUBMENU()
2818  WX_SUBMENU_INT("Fix Product Name Capitalization")
2821  WX_END_SUBMENU()
2824  WX_END_SUBMENU()
2825  WX_SUBMENU_INT("Structured Comments")
2827  WX_SUBMENU_INT("Edit Structured Comment Prefix-Suffix")
2839  WX_END_SUBMENU()
2853  WX_END_SUBMENU()
2854  WX_SUBMENU_INT("Cleanup and Fixup")
2861  WX_END_SUBMENU()
2862  WX_SUBMENU_INT("Display")
2868  WX_END_SUBMENU()
2869  WX_SUBMENU_INT("Desktop")
2885  WX_SUBMENU_INT("Utilities")
2889  WX_END_SUBMENU()
2890  WX_SUBMENU_INT("Indexer")
2892  WX_END_SUBMENU()
2893  WX_END_SUBMENU()
2894  WX_SUBMENU_INT("Link")
2895  WX_SUBMENU_INT("Feature IDs")
2901  WX_END_SUBMENU()
2902  WX_SUBMENU_INT("Create CDS-mRNA Links")
2910  WX_END_SUBMENU()
2913  WX_END_SUBMENU()
2914  WX_SUBMENU_INT("Projects")
2925  WX_END_SUBMENU()
2926  WX_SUBMENU_INT("Make Features and Fuse")
2937  WX_SUBMENU_INT("Exon features from")
2941  WX_END_SUBMENU()
2942  WX_END_SUBMENU()
2943  WX_SUBMENU_INT("Normalize, Map, Package")
2944  WX_SUBMENU_INT("CDSGeneRangeError")
2947  WX_END_SUBMENU()
2950  WX_END_SUBMENU()
2951  WX_SUBMENU_INT("Gap Sequences")
2952  WX_SUBMENU_INT("Raw Sequence To Delta")
2956  WX_END_SUBMENU()
2959  WX_SUBMENU_INT("Convert Selected Gaps")
2962  WX_END_SUBMENU()
2970  WX_END_SUBMENU()
2980 #ifdef _DEBUG
2984 #endif
2985  WX_SUBMENU_INT("Select")
2987  WX_END_SUBMENU()
2988  WX_SUBMENU_INT("Locus-tags")
2992  WX_END_SUBMENU()
2995  WX_END_SUBMENU()
2996  WX_SUBMENU_INT("&Annotate")
2997  WX_SUBMENU_INT("Genes and Named Regions")
3014  WX_END_SUBMENU()
3015  WX_SUBMENU_INT("Coding Regions and Transcripts")
3023  WX_END_SUBMENU()
3024  WX_SUBMENU_INT("Structural RNAs")
3030  WX_END_SUBMENU()
3031  WX_SUBMENU_INT("Bibliographic and Comments")
3034  WX_END_SUBMENU()
3035  WX_SUBMENU_INT("Sites and Bonds")
3043  WX_END_SUBMENU()
3044  WX_SUBMENU_INT("Remaining Features")
3063  WX_END_SUBMENU()
3064  WX_SUBMENU_INT("Batch Feature Apply")
3072  WX_END_SUBMENU()
3073  WX_SUBMENU_INT("Batch Feature Edit")
3078  WX_END_SUBMENU()
3079  WX_SUBMENU_INT("Publications")
3082  WX_END_SUBMENU()
3083  WX_SUBMENU_INT("Descriptors")
3097  WX_END_SUBMENU()
3099  WX_END_SUBMENU()
3100 WX_END_MENU()
3101 
3102 const SwxMenuItemRec* CSeqEditPackage::GetMenuDef() const
3103 {
3104  return kEditingMenu;
3105 }
3106 
3107 
3108 
3109 
3110 void CSequenceEditingEventHandler::RemoveDescriptors(wxCommandEvent& evt)
3111 {
3112  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3113  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3115  if (dlg.ShowModal() == wxID_OK)
3116  {
3117  CRef<CCmdComposite> cmd = dlg.GetCommand();
3118  if (cmd) m_CmdProccessor->Execute(cmd);
3119  dlg.Close();
3120  }
3121 }
3122 
3124 {
3125  if (!m_Workbench) return;
3126  wxWindow* main_window = NULL;
3127  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
3128  if (wb_frame)
3129  main_window = wb_frame->GetMainWindow();
3130  CRemoveFeaturesDlg *dlg = new CRemoveFeaturesDlg(main_window, m_Workbench);
3131  dlg->Show(true);
3132 }
3133 
3135 {
3136  if (!m_Workbench) return;
3137  wxWindow* main_window = NULL;
3138  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
3139  if (wb_frame)
3140  main_window = wb_frame->GetMainWindow();
3141  CApplyIndexerComments *dlg = new CApplyIndexerComments(main_window, m_Workbench);
3142  dlg->Show(true);
3143 }
3144 
3145 
3146 
3148 {
3149  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3150  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3151 
3153 }
3154 
3156 {
3157  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3158  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3159  CRemoveSeqAnnot worker;
3160  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Seq-Annot Ids",CSeq_annot::C_Data::e_Ids))
3161  event.Skip();
3162 }
3163 
3165 {
3166  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3167  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3168  CRemoveBankitComment worker;
3169  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Bankit Comment"))
3170  event.Skip();
3171 }
3172 
3173 
3175 {
3176  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3177  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3179  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Duplicate Structured Comment"))
3180  event.Skip();
3181 }
3182 
3184 {
3185  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3186  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3187 
3189  if (dlg.ShowModal() == wxID_OK)
3190  {
3192  if (cmd) m_CmdProccessor->Execute(cmd);
3193  dlg.Close();
3194  }
3195 }
3196 
3198 {
3199  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3200  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3201 
3202  wxWindow* main_window = NULL;
3203  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
3204  if (wb_frame)
3205  main_window = wb_frame->GetMainWindow();
3206 
3207  CRemoveSequencesDlg dlg(main_window, m_TopSeqEntry);
3208  if (dlg.ShowModal() == wxID_OK) {
3210  if (cmd) {
3212  }
3213  }
3214 }
3215 
3217 {
3218  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3219  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3220 
3221  CRemoveSeqAnnot worker;
3222  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Alignments",CSeq_annot::C_Data::e_Align))
3223  event.Skip();
3224 }
3225 
3227 {
3228  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3229  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3230 
3231  CRemoveSeqAnnot worker;
3232  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Graphs",CSeq_annot::C_Data::e_Graph))
3233  event.Skip();
3234 }
3235 
3237 {
3238  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3239  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3240 
3241  CRemoveGenomeProjectsDB worker;
3242  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove GenomeProjectsDB"))
3243  event.Skip();
3244 }
3245 
3247 {
3248  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3249  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3250 
3252  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Empty GenomeProjectsDB"))
3253  event.Skip();
3254 }
3255 
3256 
3258 {
3259  CRef<CCmdComposite> cmd = CleanupCommand (m_TopSeqEntry, true, (evt.GetId() == eCmdTaxFixCleanup || evt.GetId() == eCmdTaxFixCleanup_ext));
3260  if (cmd) {
3262  }
3263 }
3264 
3265 
3267 {
3269  if (cmd) {
3271  }
3272 }
3273 
3274 
3275 // Requested in GB-7591
3277 {
3280  copy->Assign(*entry);
3281 
3283  CScope scope2(*objmgr);
3284  scope2.AddDefaults();
3285  CSeq_entry_Handle new_seh = scope2.AddTopLevelSeqEntry(*copy);
3286 
3287  CCleanup::RepairXrefs(new_seh);
3288 
3289  CRef<CCmdComposite> cmd(new CCmdComposite("Cleanup"));
3291  cmd->AddCommand(*clean);
3292  if (cmd) {
3294  }
3295 }
3296 
3297 
3299 {
3300  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3301  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3302 
3304  if (cmd) {
3306  }
3307 }
3308 
3309 
3311 {
3312  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3313  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3314 
3316  if (cmd) {
3318  }
3319 }
3320 
3321 
3322 void CSequenceEditingEventHandler::EditPubs( wxCommandEvent& evt )
3323 {
3324  CEditPubDlg * dlg = new CEditPubDlg(NULL, m_Workbench);
3325 
3326  dlg->Show(true);
3327 }
3328 
3329 
3331 {
3332  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3333  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3334 
3335  CFixAllCap worker;
3337  if (cmd) {
3339  }
3340 }
3341 
3343 {
3344  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3345  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3346 
3347  CFixAuthorCap worker;
3349  if (cmd) {
3351  }
3352 }
3353 
3355 {
3356  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3357  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3358 
3359  CFixTitleCap worker;
3361  if (cmd) {
3363  }
3364 }
3365 
3367 {
3368  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3369  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3370 
3371  CFixAffilCap worker;
3373  if (cmd) {
3375  }
3376 }
3377 
3379 {
3380  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3381  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3382 
3383  CFixCountryCap worker;
3385  if (cmd) {
3387  }
3388 }
3389 
3391 {
3392  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3393  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3394 
3395  CRemoveUnpublishedPubs worker;
3397  if (cmd) {
3399  }
3400 }
3401 
3403 {
3404  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3405  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3406 
3407  CRemoveInPressPubs worker;
3409  if (cmd) {
3411  }
3412 }
3413 
3415 {
3416  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3417  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3418 
3419  CRemovePublishedPubs worker;
3421  if (cmd) {
3423  }
3424 }
3425 
3427 {
3428  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3429  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3430 
3431  CRemoveCollidingPubs worker;
3433  if (cmd) {
3435  }
3436 }
3437 
3438 
3440 {
3441  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3442  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3443 
3444  CRemoveAllPubs worker;
3446  if (cmd) {
3448  }
3449 }
3450 
3452 {
3453  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3454  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3455 
3456  CRemoveAuthorConsortium worker;
3458  if (cmd) {
3460  }
3461 }
3462 
3464 {
3465  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3466  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3467 
3468  CReverseAuthorNames worker;
3470  if (cmd) {
3472  }
3473 }
3474 
3476 {
3477  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3478  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3479 
3480  CStripAuthorSuffix worker;
3482  if (cmd) {
3484  }
3485 }
3486 
3488 {
3489  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3490  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3491 
3492  CFixAuthorInitials worker;
3494  if (cmd) {
3496  }
3497 }
3498 
3500 {
3501  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3502  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3503 
3505  worker.SetConstraint("consortium");
3507  if (cmd) {
3509  }
3510 }
3511 
3513 {
3514  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3515  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3516 
3519  if (cmd) {
3521  }
3522 }
3523 
3525 {
3526  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3527  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3528 
3529  CAddCitSubForUpdate worker;
3530  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Cit-sub for update"))
3531  event.Skip();
3532 }
3533 
3535 {
3536  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3537  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3538 
3539  CFixUSA worker;
3541  if (cmd) {
3543  }
3544 }
3545 
3547 {
3548  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3549  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3550 
3551  CRef<CMiscSeqTableColumn> col(new CMiscSeqTableColumn("CDS comment"));
3552  vector<CConstRef<CObject> > objs = col->GetObjects(m_TopSeqEntry, "", CRef<edit::CStringConstraint>(NULL));
3553  if (objs.size() == 0) {
3554  wxMessageBox(wxT("No coding regions found!"), wxT("Error"),
3555  wxOK | wxICON_ERROR, NULL);
3556  return;
3557  }
3558 
3559  bool any_change = false;
3560  CRef<CCmdComposite> cmd(new CCmdComposite("Resynch partials"));
3561  ITERATE(vector<CConstRef<CObject> >, it, objs) {
3562  const CSeq_feat* f = dynamic_cast<const CSeq_feat* >((*it).GetPointer());
3563  CRef<CSeq_feat> new_feat(new CSeq_feat());
3564  new_feat->Assign(*f);
3567  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(fh, *new_feat)));
3568  any_change = true;
3569  }
3570 
3572  if (synch) {
3573  cmd->AddCommand(*synch);
3574  any_change = true;
3575  }
3576  }
3577 
3578  if (any_change) {
3580  } else {
3581  wxMessageBox(wxT("No effect!"), wxT("Error"),
3582  wxOK | wxICON_ERROR, NULL);
3583  }
3584 
3585 }
3586 
3587 
3589 {
3590  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3591  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3592 
3593  CRetranslateCDS worker;
3594  switch (evt.GetId())
3595  {
3598  worker.apply( m_TopSeqEntry, m_CmdProccessor, "Retranslate coding regions", CRetranslateCDS::eRetranslateCDSIgnoreStopExceptEnd); break;
3599  case eCmdRetranslateCDSObeyStop : worker.apply( m_TopSeqEntry, m_CmdProccessor, "Retranslate coding regions", CRetranslateCDS::eRetranslateCDSObeyStop); break;
3601  default : break;
3602  }
3603 
3604 }
3605 
3606 
3608 {
3610  dlg->Show(true);
3611 }
3612 
3613 
3615 {
3616  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3617  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3618 
3620  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove All Structured Comments"))
3621  event.Skip();
3622 }
3623 
3625 {
3626  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3627  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3628 
3630  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Empty Structured Comments"))
3631  event.Skip();
3632 }
3633 
3635 {
3636  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3637  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3638 
3639  CModifyStructuredComment worker;
3640  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Structured Comment Field"))
3641  event.Skip();
3642 }
3643 
3645 {
3646  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3647  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3648 
3650  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Structured Comment Keyword"))
3651  event.Skip();
3652 }
3653 
3655 {
3656  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3657  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3658 
3660  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Structured Comment Keyword"))
3661  event.Skip();
3662 }
3663 
3664 void CSequenceEditingEventHandler::AddKeywordGDS( wxCommandEvent& event )
3665 {
3666  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3667  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3668 
3669  CAddConstKeyword worker;
3670  worker.SetKeyword("GDS");
3671  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Keyword GDS"))
3672  event.Skip();
3673 }
3674 
3676 {
3677  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3678  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3679 
3680  CAddConstKeyword worker;
3681  worker.SetKeyword("TPA:inferential");
3682  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Keyword TPA:inferential"))
3683  event.Skip();
3684 }
3685 
3687 {
3688  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3689  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3690 
3691  CAddConstKeyword worker;
3692  worker.SetKeyword("TPA:experimental");
3693  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Keyword TPA:experimental"))
3694  event.Skip();
3695 }
3696 
3698 {
3699  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3700  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3701 
3702  CAddConstKeyword worker;
3703  worker.SetKeyword("TPA:assembly");
3704  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Add Keyword TPA:assembly"))
3705  event.Skip();
3706 }
3707 
3709 {
3710  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3711  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3712 
3713  CAddConstKeyword worker;
3714  worker.SetKeyword("TPA:specialist_db");
3715  if (!worker.apply(m_TopSeqEntry, m_CmdProccessor, "Add Keyword TPA:specialist_db"))
3716  event.Skip();
3717 }
3718 
3720 {
3723  CAECRFrame * dlg = new CAECRFrame(NULL, m_Workbench);
3724  dlg->SetInitParameters(aecr_action_type, aecr_field_type, ncbi::kGenbankBlockKeyword);
3725  CallAfter(&CSequenceEditingEventHandler::ShowAfter, dlg);
3726 }
3727 
3729 {
3731  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3732 
3733  CRef<CSeqdesc> seqdesc(new CSeqdesc());
3734  seqdesc->SetUser().Assign(*edit::CGenomeAssemblyComment::MakeEmptyUserObject());
3735 
3737  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
3738  if (!orig_locs.empty())
3739  {
3740  CBioseq_Handle bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*orig_locs.front());
3741  seh = bsh.GetSeq_entry_Handle();
3742  }
3743 
3744  CIRef<IEditObject> editor(new CEditObjectSeq_desc(*seqdesc, seh, m_TopSeqEntry.GetScope(), true));
3745  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
3746  edit_dlg->SetUndoManager(m_CmdProccessor);
3747  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
3748  edit_dlg->SetEditorWindow(editorWindow);
3749  edit_dlg->SetEditor(editor);
3750  edit_dlg->SetWorkDir(m_WorkDir);
3751  edit_dlg->Show(true);
3752 }
3753 
3754 
3756 {
3757  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3758  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3759 
3761  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Reorder Structured Comment"))
3762  event.Skip();
3763 }
3764 
3766 {
3767  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3768  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3769 
3770  CConvertComment worker;
3771  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Convert Comment to Structured Comment", "::"," "))
3772  event.Skip();
3773 }
3774 
3775 void CSequenceEditingEventHandler::ParseComment( wxCommandEvent& event )
3776 {
3777  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3778  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3779 
3780  CConvertComment worker;
3781  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Parse Comment to Structured Comment", "=",";"))
3782  event.Skip();
3783 }
3784 
3786 {
3787  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3788  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3789 
3790  CAssignFeatureId worker;
3791  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Assign Feature Ids"))
3792  event.Skip();
3793 }
3794 
3796 {
3797  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3798  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3799 
3800  CClearFeatureId worker;
3801  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Clear Feature Ids"))
3802  event.Skip();
3803 }
3804 
3806 {
3807  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3808  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3809 
3810  CReassignFeatureId worker;
3811  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Reassign Feature Ids"))
3812  event.Skip();
3813 }
3814 
3816 {
3817  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3818  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3819 
3820  CUniqifyFeatureId worker;
3821  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Uniqify Feature Ids"))
3822  event.Skip();
3823 }
3824 
3826 {
3827  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3828  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3829 
3830  CPCRPrimerTrimJunk worker;
3832  if (cmd) {
3834  }
3835 }
3836 
3838 {
3839  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3840  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3841 
3842  CPCRPrimerFixI worker;
3844  if (cmd) {
3846  }
3847 }
3848 
3849 void CSequenceEditingEventHandler :: ItemAction(wxCommandEvent& event, CRef <CItem> item, const string& title)
3850 {
3852  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3853  if (!(item.GetPointer()) || !(item->apply(m_TopSeqEntry, m_CmdProccessor, title)) )
3854  event.Skip();
3855 };
3856 
3858 {
3859  ItemAction(event, CRef <CItem> (new CRmvCddFeatDbxref), "Remove All CDD Features and Dbxrefs");
3860 };
3861 
3863 {
3864  ItemAction(event, CRef <CItem> (new CPrefixAuthority), "Prefix Authority with Organism");
3865 };
3866 
3867 void CSequenceEditingEventHandler :: FocusSet(wxCommandEvent& event )
3868 {
3869  ItemAction(event, CRef <CItem> (new CSrcFocusSet()), "Set");
3870 };
3871 
3873 {
3874  ItemAction(event, CRef <CItem> (new CSrcFocusClear()), "Clear");
3875 };
3876 
3878 {
3879  ItemAction(event, CRef <CItem> (new CSetTransgSrcDesc()), "Set Transgenic on Source Desc");
3880 };
3881 
3883 {
3884  ItemAction(event, CRef <CItem> (new CSplitDblinkQuals()), "Split DBLink Quals at Commas");
3885 };
3886 
3888 {
3889  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3890  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3891 
3892  CFixOrgModInst worker;
3894  if (cmd) {
3896  }
3897 }
3898 
3900 {
3901  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3902  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3903 
3904  CSwapPrimerNameSeq worker;
3906  if (cmd) {
3908  }
3909 }
3910 
3912 {
3913  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3914  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3915 
3916  CMergePrimerSets worker;
3918  if (cmd) {
3920  }
3921 }
3922 
3924 {
3925  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3926  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3927 
3928  CSplitPrimerSets worker;
3930  if (cmd) {
3932  }
3933 }
3934 
3936 {
3937  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3938  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3939 
3941  if (dlg.ShowModal() == wxID_OK)
3942  {
3944  if (cmd) m_CmdProccessor->Execute(cmd);
3945  dlg.Close();
3946  }
3947 }
3948 
3950 {
3951  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3952  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3953 
3956  if (cmd) {
3958  }
3959 }
3960 
3962 {
3963  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3964  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3965 
3968  if (cmd) {
3970  }
3971 }
3972 
3974 {
3975  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3976  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
3977 
3978  CCountryFixup worker;
3980  if (cmd) {
3982  }
3983 }
3984 
3986 {
3987  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
3988  if (!m_TopSeqEntry || !m_CmdProccessor) return;
3989 
3990  CCountryFixup worker;
3992  if (cmd) {
3994  }
3995 }
3996 
3997 void CSequenceEditingEventHandler::VectorTrim( wxCommandEvent& event )
3998 {
3999  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4000  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4001 
4002  wxWindow* main_window = NULL;
4003  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
4004  if (wb_frame)
4005  main_window = wb_frame->GetMainWindow();
4006 
4007  CVectorTrimDlg* dlg = new CVectorTrimDlg(main_window, m_TopSeqEntry, m_CmdProccessor);
4008  dlg->Show();
4009 }
4010 
4011 void CSequenceEditingEventHandler::SelectTarget( wxCommandEvent& event )
4012 {
4014  dlg->Show();
4015 }
4016 
4017 void CSequenceEditingEventHandler::AddCDS( wxCommandEvent& event )
4018 {
4019  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4020  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4021 
4023  m_Workbench);
4025  dlg->Show(true);
4026 /* if (dlg.ShowModal() == wxID_OK)
4027  {
4028  CRef<CCmdComposite> cmd = dlg.GetCommand();
4029  if (cmd) {
4030  m_CmdProccessor->Execute(cmd);
4031  } else {
4032  string errmsg = dlg.GetErrorMessage();
4033  if (!NStr::IsBlank(errmsg)) {
4034  wxString error = ToWxString(errmsg);
4035  wxMessageBox(error, wxT("Error"),
4036  wxOK | wxICON_ERROR, NULL);
4037  }
4038  }
4039  dlg.Close();
4040  }
4041 */
4042 }
4043 
4044 
4045 void CSequenceEditingEventHandler::AddRNA( wxCommandEvent& event )
4046 {
4047  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4048  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4049 
4051  m_Workbench);
4053  dlg->Show(true);
4054  /* if (dlg.ShowModal() == wxID_OK)
4055  {
4056  CRef<CCmdComposite> cmd = dlg.GetCommand();
4057  if (cmd) {
4058  m_CmdProccessor->Execute(cmd);
4059  } else {
4060  string errmsg = dlg.GetErrorMessage();
4061  if (!NStr::IsBlank(errmsg)) {
4062  wxString error = ToWxString(errmsg);
4063  wxMessageBox(error, wxT("Error"),
4064  wxOK | wxICON_ERROR, NULL);
4065  }
4066  }
4067  dlg.Close();
4068  }*/
4069 }
4070 
4071 
4073 {
4074  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4075  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4076 
4077  CBulkFeatureAddDlgStd *dlg = new CBulkFeatureAddDlgStd(wxTheApp->GetTopWindow(), m_TopSeqEntry,
4078  m_Workbench);
4080  dlg->Show(true);
4081 }
4082 
4083 
4084 void CSequenceEditingEventHandler::Validate( wxCommandEvent& evt )
4085 {
4086  CRef<CUser_object> params(new CUser_object());
4087  switch (evt.GetId())
4088  {
4089  case eCmdValidate:
4090  case eCmdValidate_ext:
4093  break;
4097  break;
4101  break;
4102  default:
4103  break;
4104  }
4105 
4106  wxWindow* main_window = NULL;
4107  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
4108  if (wb_frame)
4109  main_window = wb_frame->GetMainWindow();
4110 
4111  CValidateFrame::GetInstance(main_window, m_Workbench, params);
4112 }
4113 
4114 
4116 {
4117  wxWindow* main_window = NULL;
4118  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
4119  if (wb_frame)
4120  main_window = wb_frame->GetMainWindow();
4121  IRefreshCntrl * suc_refresh = new CSUCRefreshCntrl(m_Workbench);
4122  CGenericReportDlg* report = new CGenericReportDlg(main_window, m_Workbench, wxID_ANY, _("SUC"));
4123  report->SetRefresh(suc_refresh);
4124  report->RefreshData();
4125  report->Show(true);
4126 }
4127 
4129 {
4130  wxWindow* main_window = NULL;
4131  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
4132  if (wb_frame)
4133  main_window = wb_frame->GetMainWindow();
4134 
4136  dlg->Show(true);
4137 }
4138 
4139 
4141 {
4143  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4144 
4146 }
4147 
4148 
4150 {
4152  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4153 
4155 }
4156 
4157 
4159 {
4161  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4162 
4164 }
4165 
4166 
4168 {
4170  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4171 
4173 }
4174 
4175 
4177 {
4179  dlg->Show(true);
4180 }
4181 
4182 
4183 void CSequenceEditingEventHandler::TestDialogView(wxCommandEvent& /*event*/)
4184 {
4185  if (!m_TopSeqEntry) return;
4186 
4190 }
4191 
4192 void CSequenceEditingEventHandler::TestFormView( wxCommandEvent& /*event*/ )
4193 {
4194  if (!m_TopSeqEntry) return;
4195 
4199 }
4200 
4201 void CSequenceEditingEventHandler::AddSequences( wxCommandEvent& event )
4202 {
4203  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4204  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4205 
4206  CAddSequences worker;
4208 }
4209 
4210 
4212 {
4215  switch (evt.GetId()) {
4216  case eCmdApplySourceQual:
4217  aecr_action_type = CAECRFrame::eActionType_Apply;
4218  aecr_field_type = CAECRFrame::eFieldType_Source;
4219  break;
4220  case eCmdEditSourceQual:
4221  aecr_action_type = CAECRFrame::eActionType_Edit;
4222  aecr_field_type = CAECRFrame::eFieldType_Source;
4223  break;
4224  case eCmdConvertSourceQual:
4225  aecr_action_type = CAECRFrame::eActionType_Convert;
4226  aecr_field_type = CAECRFrame::eFieldType_Source;
4227  break;
4228  case eCmdSwapSourceQual:
4229  aecr_action_type = CAECRFrame::eActionType_Swap;
4230  aecr_field_type = CAECRFrame::eFieldType_Source;
4231  break;
4232  case eCmdRemoveSourceQual:
4233  aecr_action_type = CAECRFrame::eActionType_Remove;
4234  aecr_field_type = CAECRFrame::eFieldType_Source;
4235  break;
4236  case eCmdApplyRNAQual:
4237  aecr_action_type = CAECRFrame::eActionType_Apply;
4238  aecr_field_type = CAECRFrame::eFieldType_RNA;
4239  break;
4240  case eCmdEditRNAQual:
4241  aecr_action_type = CAECRFrame::eActionType_Edit;
4242  aecr_field_type = CAECRFrame::eFieldType_RNA;
4243  break;
4244  case eCmdConvertRNAQual:
4245  aecr_action_type = CAECRFrame::eActionType_Convert;
4246  aecr_field_type = CAECRFrame::eFieldType_RNA;
4247  break;
4248  case eCmdSwapRNAQual:
4249  aecr_action_type = CAECRFrame::eActionType_Swap;
4250  aecr_field_type = CAECRFrame::eFieldType_RNA;
4251  break;
4252  case eCmdRemoveRNAQual:
4253  aecr_action_type = CAECRFrame::eActionType_Remove;
4254  aecr_field_type = CAECRFrame::eFieldType_RNA;
4255  break;
4256  case eCmdApplyCGPQual:
4257  aecr_action_type = CAECRFrame::eActionType_Apply;
4258  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4259  break;
4260  case eCmdEditCGPQual:
4261  aecr_action_type = CAECRFrame::eActionType_Edit;
4262  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4263  break;
4264  case eCmdConvertCGPQual:
4265  aecr_action_type = CAECRFrame::eActionType_Convert;
4266  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4267  break;
4268  case eCmdSwapCGPQual:
4269  aecr_action_type = CAECRFrame::eActionType_Swap;
4270  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4271  break;
4272  case eCmdRemoveCGPQual:
4273  aecr_action_type = CAECRFrame::eActionType_Remove;
4274  aecr_field_type = CAECRFrame::eFieldType_CDSGeneProt;
4275  break;
4276  case eCmdApplyFeatQual:
4277  aecr_action_type = CAECRFrame::eActionType_Apply;
4278  aecr_field_type = CAECRFrame::eFieldType_Feature;
4279  break;
4280  case eCmdEditFeatQual:
4281  aecr_action_type = CAECRFrame::eActionType_Edit;
4282  aecr_field_type = CAECRFrame::eFieldType_Feature;
4283  break;
4284  case eCmdConvertFeatQual:
4285  aecr_action_type = CAECRFrame::eActionType_Convert;
4286  aecr_field_type = CAECRFrame::eFieldType_Feature;
4287  break;
4288  case eCmdSwapFeatQual:
4289  aecr_action_type = CAECRFrame::eActionType_Swap;
4290  aecr_field_type = CAECRFrame::eFieldType_Feature;
4291  break;
4292  case eCmdRemoveFeatQual:
4293  aecr_action_type = CAECRFrame::eActionType_Remove;
4294  aecr_field_type = CAECRFrame::eFieldType_Feature;
4295  break;
4297  aecr_action_type = CAECRFrame::eActionType_RemoveTextOutside;
4298  aecr_field_type = CAECRFrame::eFieldType_Misc;
4299  break;
4300  default:
4301  return;
4302  break;
4303  }
4304  wxMenu* menu = dynamic_cast<wxMenu*>(evt.GetEventObject());
4305  wxString title;
4306  if (menu)
4307  title = menu->GetLabelText(evt.GetId());
4308  CAECRFrame * dlg = new CAECRFrame(NULL, m_Workbench);
4309  dlg->SetInitParameters(aecr_action_type, aecr_field_type, kEmptyStr, title);
4310  CallAfter(&CSequenceEditingEventHandler::ShowAfter, dlg);
4311 }
4312 
4314 {
4315  dlg->Show();
4316 }
4317 
4319 {
4321  switch (evt.GetId()) {
4322  case eCmdEditFeatLoc:
4323  case eCmdEditFeatLoc_ext:
4325  break;
4326  case eCmdEditFeatEv:
4328  break;
4329  case eCmdEditFeatStrand:
4332  break;
4333  case eCmdEditFeatRevInt:
4335  break;
4336  case eCmdEditFeatPseudo:
4338  break;
4339  case eCmdEditFeatException:
4341  break;
4344  break;
4345  case eCmdEditFeatInference:
4347  break;
4348  default:
4349  break;
4350  }
4351  dlg->Show(true);
4352 }
4353 
4354 
4355 void CSequenceEditingEventHandler::ParseText( wxCommandEvent& evt )
4356 {
4358  if (evt.GetId() == eCmdParseTextFromDefline) {
4359  dlg->SetFromFieldType(CParseTextDlg::eFieldType_Misc); // CFieldNamePanel
4361  }
4362 
4363  dlg->Show(true);
4364 }
4365 
4367 {
4369  dlg->Show(true);
4370 }
4371 
4373 {
4375  dlg->Show(true);
4376 }
4377 
4378 static const char* kFrameWidth = "Frame Width";
4379 static const char* kFrameHeight = "Frame Height";
4380 static const char* kFramePosX = "Frame Position X";
4381 static const char* kFramePosY = "Frame Position Y";
4382 
4383 
4384 void CSequenceEditingEventHandler::SaveSettings(const string &regpath, wxWindow *dlg) const
4385 {
4386  if (regpath.empty() || !dlg)
4387  return;
4388 
4390  CRegistryWriteView view = gui_reg.GetWriteView(regpath);
4391 
4392  view.Set(kFrameWidth, dlg->GetScreenRect().GetWidth());
4393  view.Set(kFrameHeight, dlg->GetScreenRect().GetHeight());
4394  view.Set(kFramePosX, dlg->GetScreenPosition().x);
4395  view.Set(kFramePosY, dlg->GetScreenPosition().y);
4396 }
4397 
4398 
4399 void CSequenceEditingEventHandler::LoadSettings(const string &regpath, wxWindow *dlg)
4400 {
4401  if (regpath.empty() || !dlg)
4402  return;
4403 
4405  CRegistryReadView view = gui_reg.GetReadView(regpath);
4406 
4407  int width = view.GetInt(kFrameWidth, -1);
4408  int height = view.GetInt(kFrameHeight, -1);
4409  if (width >= 0 && height >= 0)
4410  dlg->SetSize(wxSize(width,height));
4411 
4412  int pos_x = view.GetInt(kFramePosX, -1);
4413  int pos_y = view.GetInt(kFramePosY, -1);
4414 
4415  if (pos_x >= 0 && pos_y >= 0) {
4416  int max_x = 0;
4417  for (unsigned i = 0; i < wxDisplay::GetCount(); i++) // also see gui/widgets/wx/wx_utils.cpp:CorrectWindowRect() for alternative window position validation
4418  {
4419  wxDisplay display(i);
4420  max_x += display.GetGeometry().GetWidth();
4421  }
4422  if (pos_x + width > max_x)
4423  pos_x = wxGetDisplaySize().GetWidth()-width-5;
4424 
4425  if (pos_y + height > wxGetDisplaySize().GetHeight())
4426  pos_y = wxGetDisplaySize().GetHeight()-height-5;
4427 
4428  dlg->SetPosition(wxPoint(pos_x,pos_y));
4429  }
4430  wxTopLevelWindow* top_win = dynamic_cast<wxTopLevelWindow*>(dlg);
4431  if (top_win)
4432  {
4433  wxRect rc = dlg->GetRect();
4434  CorrectWindowRect(top_win, rc);
4435  dlg->SetSize(rc);
4436  dlg->Move(rc.GetLeftTop());
4437  }
4438 }
4439 
4441 {
4442  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4443  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4444 
4445  CQualTableLoadManager* qual_mgr = NULL;
4446 
4447  CRef<CFileLoadWizard> fileManager(new CFileLoadWizard());
4448  vector<string> format_ids;
4449  format_ids.push_back("file_loader_qual_table");
4450  fileManager->LoadFormats(format_ids);
4451  fileManager->SetWorkDir(m_WorkDir);
4452 
4453  for( size_t i = 0; i < fileManager->GetFormatManagers().size(); ++i ) {
4454  const IFileLoadPanelClient* mgr = fileManager->GetFormatManagers()[0].GetPointerOrNull();
4455 
4456  if ("file_loader_qual_table" == mgr->GetFileLoaderId()) {
4457  const CQualTableLoadManager* const_qual_mgr = dynamic_cast<const CQualTableLoadManager*>(mgr);
4458  if (const_qual_mgr) {
4459  qual_mgr = const_cast<CQualTableLoadManager*>(const_qual_mgr);
4460  qual_mgr->SetTopLevelEntry(m_TopSeqEntry);
4461  qual_mgr->SetServiceLocator(m_Workbench);
4462  }
4463  }
4464  }
4465 
4466  vector<CIRef<IOpenObjectsPanelClient> > loadManagers;
4467  loadManagers.push_back(CIRef<IOpenObjectsPanelClient>(fileManager.GetPointer()));
4468 
4469  COpenObjectsDlg dlg(NULL);
4470  dlg.SetSize(760, 940);
4471  dlg.Centre(wxBOTH | wxCENTRE_ON_SCREEN);
4472  dlg.SetMinSize(wxSize(760, 750));
4473  dlg.SetRegistryPath("Dialogs.Edit.OpenTables");
4474  dlg.SetManagers(loadManagers);
4475  LoadSettings("Dialogs.Edit.OpenTables", &dlg);
4476 
4477  if (dlg.ShowModal() == wxID_OK) {
4478  qual_mgr->x_GetColumnIdPanel()->x_TableReaderMacro();
4479  }
4480  SaveSettings("Dialogs.Edit.OpenTables", &dlg);
4481 }
4482 
4484 {
4485  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4486  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4487 
4488  CQualTableLoadManager* qual_mgr = NULL;
4489 
4490  vector< CIRef<IFileLoadPanelClientFactory> > file_formats;
4491  GetExtensionAsInterface("file_load_panel_client", file_formats);
4492  CIRef<IFileLoadPanelClient> format_manager;
4493 
4494  for (size_t i = 0; i < file_formats.size(); ++i) {
4495  if (file_formats[i]->GetFileLoaderId() == "file_loader_qual_table") {
4496  format_manager.Reset(file_formats[i]->CreateInstance());
4497 
4498  if ("file_loader_qual_table" == format_manager->GetFileLoaderId()) {
4499  const CQualTableLoadManager* const_qual_mgr = dynamic_cast<const CQualTableLoadManager*>(format_manager.GetPointer());
4500  if (const_qual_mgr) {
4501  qual_mgr = const_cast<CQualTableLoadManager*>(const_qual_mgr);
4502  qual_mgr->SetTopLevelEntry(m_TopSeqEntry);
4503  qual_mgr->SetServiceLocator(m_Workbench);
4504  }
4505  }
4506  }
4507  }
4508 
4509 
4510  string fname;
4511  if (wxTheClipboard->Open())
4512  {
4513  wxTextDataObject data;
4514  if (wxTheClipboard->IsSupported( wxDF_UNICODETEXT ))
4515  wxTheClipboard->GetData( data );
4516  if (data.GetText().length() == 0) {
4517  wxMessageBox("No data in clipboard for table");
4518  wxTheClipboard->Close();
4519  return;
4520  }
4521 
4523  f.AsOutputFile(CTmpFile::eIfExists_ReturnCurrent) << data.GetText();
4524  fname = f.GetFileName();
4525  wxTheClipboard->Close();
4526  }
4527 
4528  vector<wxString> fnames;
4529  fnames.push_back(ToWxString(fname));
4530 
4531  // This also causes windows to be created it seems, and so it must happen after
4532  // create is called....
4533  qual_mgr->SetFilenames(fnames);
4534 
4536  dlg.SetSize(760, 940);
4537  dlg.Centre(wxBOTH|wxCENTRE_ON_SCREEN);
4538  dlg.SetMinSize(wxSize(760, 750));
4539  dlg.SetRegistryPath("Dialogs.Edit.OpenTables");
4540  LoadSettings("Dialogs.Edit.OpenTables", &dlg);
4541 
4542  if (dlg.ShowModal() == wxID_OK) {
4543  qual_mgr->x_GetColumnIdPanel()->x_TableReaderMacro();
4544  }
4545  CFile tmp_file(fname);
4546  tmp_file.Remove();
4547 
4548  SaveSettings("Dialogs.Edit.OpenTables", &dlg);
4549 }
4550 
4551 void CSequenceEditingEventHandler::BulkEdit( wxCommandEvent& event )
4552 {
4553  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4554  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4555 
4556  try
4557  {
4559  dlg.SetWorkDir(m_WorkDir);
4560  if (dlg.ShowModal() == wxID_OK) {
4563  //dlg.Close();
4564  }
4565  } catch (CException&) {}
4566 }
4567 
4568 void CSequenceEditingEventHandler::BulkCdsEdit( wxCommandEvent& event )
4569 {
4570  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4571  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4572 
4573 
4575 
4576  try
4577  {
4578  CBulkCDS dlg(NULL, seh,m_Workbench, m_SeqSubmit);
4579 
4580  bool done = false;
4581  while (!done) {
4582  if (dlg.ShowModal() == wxID_OK) {
4584  if (cmd) {
4586  //dlg.Close();
4587  done = true;
4588  } else {
4589  wxString error = ToWxString(dlg.GetErrorMessage());
4590  wxMessageBox(error, wxT("Error"),
4591  wxOK | wxICON_ERROR, NULL);
4592  }
4593  } else {
4594  done = true;
4595  }
4596  }
4597  } catch (CException&) {}
4598 }
4599 
4600 void CSequenceEditingEventHandler::BulkGeneEdit( wxCommandEvent& event )
4601 {
4602  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4603  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4604 
4606 
4607  try
4608  {
4610 
4611  bool done = false;
4612  while (!done) {
4613  if (dlg.ShowModal() == wxID_OK) {
4615  if (cmd) {
4617  //dlg.Close();
4618  done = true;
4619  } else {
4620  wxString error = ToWxString(dlg.GetErrorMessage());
4621  wxMessageBox(error, wxT("Error"),
4622  wxOK | wxICON_ERROR, NULL);
4623  }
4624  } else {
4625  done = true;
4626  }
4627  }
4628  } catch (CException&) {}
4629 
4630 }
4631 
4632 void CSequenceEditingEventHandler::BulkRnaEdit( wxCommandEvent& event )
4633 {
4634  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4635  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4636 
4638 
4639  try {
4640  CBulkRna dlg(NULL, seh,m_Workbench, m_SeqSubmit);
4641 
4642  bool done = false;
4643  while (!done) {
4644  if (dlg.ShowModal() == wxID_OK) {
4646  if (cmd) {
4648  //dlg.Close();
4649  done = true;
4650  } else {
4651  wxString error = ToWxString(dlg.GetErrorMessage());
4652  wxMessageBox(error, wxT("Error"),
4653  wxOK | wxICON_ERROR, NULL);
4654  }
4655  } else {
4656  done = true;
4657  }
4658  }
4659  } catch (const CException&) {}
4660 }
4661 
4663 {
4664  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4665  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4666 
4668 
4669  try {
4671 
4672  bool done = false;
4673  while (!done) {
4674  if (dlg.ShowModal() == wxID_OK) {
4676  if (cmd) {
4678  //dlg.Close();
4679  done = true;
4680  }
4681  else {
4682  wxString error = ToWxString(dlg.GetErrorMessage());
4683  wxMessageBox(error, wxT("Error"),
4684  wxOK | wxICON_ERROR, NULL);
4685  }
4686  }
4687  else {
4688  done = true;
4689  }
4690  }
4691  }
4692  catch (const CException&) {}
4693 }
4694 
4696 {
4697  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4698  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4700  if (dlg.ShowModal() == wxID_OK)
4701  {
4703  if (cmd)
4704  {
4706  }
4707  dlg.Close();
4708  }
4709 }
4710 
4711 
4712 void CSequenceEditingEventHandler::CorrectGenes( wxCommandEvent& event )
4713 {
4715  dlg->Show(true);
4716 }
4717 
4718 
4720 {
4721  return first->Compare(*second, CSeq_loc::fCompare_Default);
4722 }
4723 
4724 
4726 {
4727  return first->Equals(*second);
4728 }
4729 
4730 void CSequenceEditingEventHandler::Autodef(wxCommandEvent& evt)
4731 {
4732  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4733  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4734 
4735  int event_id = evt.GetId();
4736 
4737  switch (event_id) {
4739  {
4740  SAutodefParams params;
4744  }
4745  break;
4746  case eCmdAutodefOptions:
4747  {
4748  SAutodefParams params;
4750  CAutodefDlg dlg(NULL);
4751  dlg.SetParams(&params);
4752  if (dlg.ShowModal() == wxID_OK)
4753  {
4754  dlg.PopulateParams(params);
4756  if (dlg.OnlyTargeted()) {
4757  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
4758  vector<CRef<CSeq_loc> > cpy = orig_locs;
4759  vector<CRef<CSeq_loc> >::iterator lit = cpy.begin();
4760  while (lit != cpy.end()) {
4762  if (!b || b.IsAa()) {
4763  lit = cpy.erase(lit);
4764  } else {
4765  ++lit;
4766  }
4767  }
4768 
4769  if (cpy.empty()) {
4770  dlg.Close();
4771  return;
4772  }
4773  stable_sort(cpy.begin(), cpy.end(), CompLoc);
4774  cpy.erase( unique( cpy.begin(), cpy.end(), EqualLoc), cpy.end() );
4775 
4776  cmd.Reset(new CCmdComposite("Autodef"));
4777  ITERATE(vector<CRef<CSeq_loc> >, b, cpy) {
4780  if (subcmd) {
4781  cmd->AddCommand(*subcmd);
4782  }
4783  }
4784  } else {
4786  }
4788  dlg.Close();
4789  }
4790 
4791  }
4792  break;
4793  case eCmdAutodefMisc:
4794  {
4795  SAutodefParams params;
4797  params.m_MiscFeatRule = 1;
4800  }
4801  break;
4802  case eCmdAutodefId:
4803  {
4804  SAutodefParams params;
4808  }
4809  break;
4810  case eCmdAutodefNoMods:
4811  {
4812  SAutodefParams params;
4815  }
4816  break;
4817  case eCmdAutodefPopset:
4818  {
4819  SAutodefParams params;
4821  CAutodefDlg dlg(NULL);
4822  dlg.SetParams(&params);
4823  dlg.ShowSourceOptions(false);
4824  if (dlg.ShowModal() == wxID_OK)
4825  {
4826  dlg.PopulateParams(params);
4829  dlg.Close();
4830  }
4831  }
4832  break;
4833  case eCmdAutodefRefresh:
4834  {
4835  CRef<CCmdComposite> cmd = macro::CMacroFunction_RefreshDefline::s_RefreshDeflineCommand(m_TopSeqEntry);
4836  if (cmd) m_CmdProccessor->Execute(cmd);
4837  }
4838  break;
4839  }
4840 }
4841 
4842 
4843 void CSequenceEditingEventHandler::PT_Cleanup (wxCommandEvent& event)
4844 {
4845  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4846  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4848  if (cmd) {
4850  }
4851 }
4852 
4853 
4855 {
4856  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
4857  if (!m_TopSeqEntry || !m_CmdProccessor) return;
4858 
4860  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Parse Strain Serotype from Names");
4861  if (composite) {
4862  m_CmdProccessor->Execute(composite);
4863  }
4864 }
4865 
4867 {
4869  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4870 
4872  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Add Strain Serotype to Names");
4873  if (composite) {
4874  m_CmdProccessor->Execute(composite);
4875  }
4876 }
4877 
4878 
4880 {
4882  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4883 
4885  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Fixup Organism Names");
4886  if (composite) {
4887  m_CmdProccessor->Execute(composite);
4888  }
4889 }
4890 
4891 
4893 {
4895  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4896 
4898  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Split Quals at Commas");
4899  if (composite) {
4900  m_CmdProccessor->Execute(composite);
4901  }
4902 }
4903 
4905 {
4907  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4908 
4910  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Split Structured Collections at Semicolon");
4911  if (composite) {
4912  m_CmdProccessor->Execute(composite);
4913  }
4914 }
4915 
4916 
4918 {
4920  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4921 
4923  CRef<CCmdComposite> composite = worker.GetCommand(m_TopSeqEntry, "Trim Organism Names");
4924  if (composite) {
4925  m_CmdProccessor->Execute(composite);
4926  }
4927 }
4928 
4930 {
4932  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4933 
4934  string rna_name;
4935  switch (event.GetId()){
4936  case eCmdAddNamedrRNA12S:
4937  rna_name = "12S ribosomal RNA";
4938  break;
4939  case eCmdAddNamedrRNA16S:
4940  rna_name = "16S ribosomal RNA";
4941  break;
4942  case eCmdAddNamedrRNA23S:
4943  rna_name = "23S ribosomal RNA";
4944  break;
4945  case eCmdAddNamedrRNA18S:
4946  rna_name = "18S ribosomal RNA";
4947  break;
4948  case eCmdAddNamedrRNA28S:
4949  rna_name = "28S ribosomal RNA";
4950  break;
4951  case eCmdAddNamedrRNA26S:
4952  rna_name = "26S ribosomal RNA";
4953  break;
4954  case eCmdAddNamedrRNASmall:
4955  rna_name = "small subunit ribosomal RNA";
4956  break;
4957  case eCmdAddNamedrRNALarge:
4958  rna_name = "large subunit ribosomal RNA";
4959  break;
4960  }
4961  bool ispartial5 = true;
4962  bool ispartial3 = true;
4963  CRef<CCmdComposite> composite = AddNamedrRna(m_TopSeqEntry, rna_name, ispartial5, ispartial3);
4964  if (composite){
4965  m_CmdProccessor->Execute(composite);
4966  }
4967 }
4968 
4970 {
4972  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4973 
4975  if (composite){
4976  m_CmdProccessor->Execute(composite);
4977  }
4978 }
4979 
4981 {
4983  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
4984 
4986  if (composite){
4987  m_CmdProccessor->Execute(composite);
4988  }
4989 }
4990 
4991 
4993 {
4994  bool rval = false;
4996 
4997  if ( (m_IsSeq && m_IsAa && allowed_type == CSeqFeatData::eFeatureLocationAllowed_ProtOnly) ||
4999  (m_IsSeq && allowed_type == CSeqFeatData::eFeatureLocationAllowed_Any) )
5000  rval = true;
5001 
5002  return rval;
5003 }
5004 
5006 {
5007  CRef<CSeq_loc> loc;
5008 
5009  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
5010  if (orig_locs.empty())
5011  {
5012  if (!RunningInsideNCBI())
5013  wxMessageBox(wxT("No data loaded"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5014  return loc;
5015  }
5016 
5017  if (!m_TopSeqEntry && !m_CachedSelectedLocations.empty()) {
5018  CBioseq_Handle bsh = m_SelObjects.front().scope->GetBioseqHandle(*(m_CachedSelectedLocations.front()->GetId()));
5020  }
5021  if (!m_TopSeqEntry)
5022  {
5023  if (!RunningInsideNCBI())
5024  wxMessageBox(wxT("No data loaded"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5025  return loc;
5026  }
5027 
5028  if (m_IsSeq)
5029  {
5030  ITERATE(vector<CRef<CSeq_loc> >, lit, orig_locs)
5031  {
5032  if (x_IsLocationOkForFeatCmd(subtype, *lit))
5033  {
5034  loc = *lit;
5035  break;
5036  }
5037  }
5038  }
5039 
5040  if (!loc)
5041  {
5042  if (!RunningInsideNCBI())
5043  {
5046  {
5047  wxMessageBox(wxT("Please select a protein bioseq to create a ") + wxString(CSeqFeatData::SubtypeValueToName(subtype)), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5048  }
5049  else if (allowed_type == CSeqFeatData::eFeatureLocationAllowed_NucOnly)
5050  {
5051  wxMessageBox(wxT("Please select a nucleotide bioseq to create a ") + wxString(CSeqFeatData::SubtypeValueToName(subtype)), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5052  }
5053  else
5054  {
5055  wxMessageBox(wxT("Please select a bioseq to create a ") + wxString(CSeqFeatData::SubtypeValueToName(subtype)), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5056  }
5058  dlg->Show();
5059  }
5060  }
5061  return loc;
5062 }
5063 
5065 {
5067  CRef<CSeq_loc> loc = GetFeatureLocation(subtype);
5068  if (!loc)
5069  return;
5070 
5072  feat->SetLocation().Assign(*loc);
5073 
5076 
5077 
5078  CIRef<IEditObject> editor(new CEditObjectSeq_feat(*feat, seh, m_TopSeqEntry.GetScope(), true));
5079  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
5080  edit_dlg->SetUndoManager(m_CmdProccessor);
5081  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
5082  edit_dlg->SetEditorWindow(editorWindow);
5083  edit_dlg->SetEditor(editor);
5084  edit_dlg->Show(true);
5085 }
5086 
5088 {
5090  CRef<CSeq_loc> loc = GetFeatureLocation(subtype);
5091  if (!loc)
5092  return;
5093 
5095  feat->SetLocation().Assign(*loc);
5096 
5097  string regulatory_class;
5098  switch(evt.GetId())
5099  {
5100  case eCmdCreateRegulatory_promoter : regulatory_class = "promoter"; break;
5101  case eCmdCreateRegulatory_enhancer : regulatory_class = "enhancer"; break;
5102  case eCmdCreateRegulatory_ribosome_binding_site : regulatory_class = "ribosome_binding_site"; break;
5103  case eCmdCreateRegulatory_riboswitch : regulatory_class = "riboswitch"; break;
5104  case eCmdCreateRegulatory_terminator : regulatory_class = "terminator"; break;
5105  default : break;
5106  }
5107  if (!regulatory_class.empty())
5108  {
5109  CRef<CGb_qual> q(new CGb_qual());
5110  q->SetQual("regulatory_class");
5111  q->SetVal(regulatory_class);
5112  feat->SetQual().push_back(q);
5113  }
5114 
5115 
5118 
5119 
5120  CIRef<IEditObject> editor(new CEditObjectSeq_feat(*feat, seh, m_TopSeqEntry.GetScope(), true));
5121  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
5122  edit_dlg->SetUndoManager(m_CmdProccessor);
5123  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
5124  edit_dlg->SetEditorWindow(editorWindow);
5125  edit_dlg->SetEditor(editor);
5126  edit_dlg->Show(true);
5127 }
5128 
5129 
5131 {
5133  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5134 
5135  CRef<CSeqdesc> seqdesc(new CSeqdesc());
5136  switch (evt.GetId()) {
5138  seqdesc->SetUser().SetType().SetStr("TpaAssembly");
5139  break;
5142  break;
5144  seqdesc->SetUser().SetType().SetStr("RefGeneTracking");
5145  break;
5146  case eCmdCreateDescDBLink:
5148  break;
5151  break;
5154  break;
5156  seqdesc->SetUser().SetType().SetStr("AuthorizedAccess");
5157  break;
5159  seqdesc->SetUser().Assign(*edit::CGenomeAssemblyComment::MakeEmptyUserObject());
5160  break;
5162  seqdesc->SetGenbank();
5163  break;
5164  case eCmdCreateDescComment:
5166  seqdesc->SetComment();
5167  break;
5168  case eCmdCreateDescTitle:
5169  seqdesc->SetTitle();
5170  break;
5171  case eCmdCreateDescMolinfo:
5172  seqdesc->SetMolinfo();
5173  break;
5174  case eCmdCreateDescSource:
5175  {{
5176  CRef<CBioSource> bioSource(new CBioSource());
5177  seqdesc->SetSource(*bioSource);
5178  }}
5179  break;
5180  case eCmdCreateDescPub:
5181  case eCmdCreateDescPub_ext:
5182  {{
5183  CRef<CPubdesc> pubdesc(new CPubdesc());
5184  seqdesc->SetPub(*pubdesc);
5185  }}
5186  break;
5187  default:
5188  break;
5189  }
5190 
5192  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
5193  if (!orig_locs.empty())
5194  {
5195  CBioseq_Handle bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*orig_locs.front());
5196  seh = bsh.GetSeq_entry_Handle();
5197  }
5198 
5199  CIRef<IEditObject> editor(new CEditObjectSeq_desc(*seqdesc, seh, m_TopSeqEntry.GetScope(), true));
5200  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
5201  edit_dlg->SetUndoManager(m_CmdProccessor);
5202  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
5203  edit_dlg->SetEditorWindow(editorWindow);
5204  edit_dlg->SetEditor(editor);
5205  edit_dlg->SetWorkDir(m_WorkDir);
5206  edit_dlg->Show(true);
5207 }
5208 
5209 
5211 {
5212  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5213  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5214 
5215  CRemoveUnverified worker;
5216  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Unverified"))
5217  event.Skip();
5218 }
5219 
5221 {
5223  if (!m_TopSeqEntry || !m_CmdProccessor) return;
5224 
5225  CRemoveUnreviewed worker;
5228 }
5229 
5230 void CSequenceEditingEventHandler::AddDefLine ( wxCommandEvent& event)
5231 {
5233  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5234 
5236  dlg->Show(true);
5237 }
5238 
5240 {
5242  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5243 
5244  bool show_label = true;
5245  switch (event.GetId()){
5246  case eCmdPrefixOrgToDefLine:{
5247  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Organism Name to Definition Line"));
5248  if (AddOrgToDefline(m_TopSeqEntry, composite))
5249  m_CmdProccessor->Execute(composite);
5250  break;
5251  }
5253  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Strain to Definition Line"));
5255  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5256  m_CmdProccessor->Execute(composite);
5257  break;
5258  }
5260  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Clone to Definition Line"));
5262  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5263  m_CmdProccessor->Execute(composite);
5264  break;
5265  }
5267  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Isolate to Definition Line"));
5269  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5270  m_CmdProccessor->Execute(composite);
5271  break;
5272  }
5274  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Haplotype to Definition Line"));
5276  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5277  m_CmdProccessor->Execute(composite);
5278  break;
5279  }
5281  CRef<CCmdComposite> composite(new CCmdComposite("Prefix Cultivar to Definition Line"));
5283  if (AddModToDefline(m_TopSeqEntry, composite, modifier, show_label))
5284  m_CmdProccessor->Execute(composite);
5285  break;
5286  }
5288  SAutodefParams params;
5289  unsigned int found = ConfigureParamsForPrefixCombo(params, m_TopSeqEntry);
5290  CPrefixDeflinedlg dlg(NULL, m_TopSeqEntry, found);
5291  if (found > 0){
5292  dlg.SetParams(&params);
5293  dlg.PopulateModifierCombo();
5294  }
5295  if (dlg.ShowModal() == wxID_OK){
5296  CRef<CCmdComposite> composite = dlg.GetCommand();
5297  if (composite){
5298  m_CmdProccessor->Execute(composite);
5299  }
5300  dlg.Close();
5301  }
5302  break;
5303  }
5304  }
5305 }
5306 
5308 {
5310  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5311 
5312  CMakeBadSpecificHostTable collector;
5313  collector.MakeTable(m_TopSeqEntry);
5314 }
5315 
5316 
5318 {
5320  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5321 
5323  dlg->Show(true);
5324 }
5325 
5326 void CSequenceEditingEventHandler::ApplyRNA_ITS ( wxCommandEvent& event)
5327 {
5329  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5330 
5332  dlg->Show(true);
5333 }
5334 
5335 void CSequenceEditingEventHandler::EditingButtons ( wxCommandEvent& event )
5336 {
5337  wxWindow* main_window = NULL;
5338  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5339  if (wb_frame)
5340  main_window = wb_frame->GetMainWindow();
5342 }
5343 
5344 void CSequenceEditingEventHandler::TrimNsRich( wxCommandEvent& event )
5345 {
5347  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5348 
5349  wxWindow* main_window = NULL;
5350  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5351  if (wb_frame)
5352  main_window = wb_frame->GetMainWindow();
5353 
5354  CTrimN worker;
5355  worker.apply(m_TopSeqEntry,m_CmdProccessor,"Trim Ns Rich", main_window, m_WorkDir);
5356 }
5357 
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 
5369  trim_rules.push_back(CSequenceAmbigTrimmer::STrimRule{ 1, 0 });
5370 
5371  CTrimN worker;
5372  worker.apply(m_TopSeqEntry,m_CmdProccessor,"Trim Ns Terminal", main_window, m_WorkDir, trim_rules);
5373 }
5374 
5375 void CSequenceEditingEventHandler::LabelRna( wxCommandEvent& event )
5376 {
5378  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5379 
5380  wxWindow* main_window = NULL;
5381  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5382  if (wb_frame)
5383  main_window = wb_frame->GetMainWindow();
5384 
5385  CLabelRna worker;
5386  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Label RNA", main_window))
5387  event.Skip();
5388 }
5389 
5390 void CSequenceEditingEventHandler::RemProtTitles( wxCommandEvent& event )
5391 {
5393  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5394 
5395  CRemProtTitles worker;
5396  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor,"Remove Protein Titles"))
5397  event.Skip();
5398 }
5399 
5401 {
5403  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5404 
5405  CRemAllProtTitles worker;
5406  if (!worker.apply(m_TopSeqEntry,m_CmdProccessor))
5407  event.Skip();
5408 }
5409 
5410 void CSequenceEditingEventHandler::SegregateSets( wxCommandEvent& event )
5411 {
5412  wxWindow* main_window = NULL;
5413  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5414  if (wb_frame)
5415  main_window = wb_frame->GetMainWindow();
5416  CSegregateSets* dlg = new CSegregateSets(main_window, m_TopSeqEntry, m_CmdProccessor);
5417  dlg->Show(true);
5418 }
5419 
5420 void CSequenceEditingEventHandler::SequesterSets( wxCommandEvent& event )
5421 {
5422  wxWindow* main_window = NULL;
5423  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5424  if (wb_frame)
5425  main_window = wb_frame->GetMainWindow();
5427  dlg->Show(true);
5428 }
5429 
5431 {
5433  if (dlg.ShowModal() == wxID_OK)
5434  {
5436  if (cmd)
5437  {
5438  vector<string> names = dlg.GetNames();
5440  if (!names.empty())
5441  {
5442  CRef<CCmdComposite> rm_from_align_cmd( new CCmdComposite("Remove from alignments") );
5444  m_CmdProccessor->Execute(rm_from_align_cmd);
5445  }
5446  event.SetId(eCmdValidate);
5447  Validate(event);
5448  }
5449  }
5450 }
5451 
5452 void CSequenceEditingEventHandler::AddSet( wxCommandEvent& event )
5453 {
5455  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5456  CChooseSetClassDlg dlg(NULL);
5457  if (dlg.ShowModal() == wxID_OK)
5458  {
5459  CBioseq_set::EClass new_class = dlg.GetClass();
5461  if (cmd) m_CmdProccessor->Execute(cmd);
5462  }
5463 }
5464 
5465 
5467 {
5469  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5470 
5471  if (!m_TopSeqEntry.IsSet()) {
5472  return;
5473  }
5474 
5476  if (dlg.ShowModal() == wxID_OK)
5477  {
5478  bool error = false;
5481  error);
5482  if (error) {
5483  wxMessageBox(wxT("Set structure no longer matches"), wxT("Error"),
5484  wxOK | wxICON_ERROR, NULL);
5485  } else if (cmd) {
5487  } else {
5488  wxMessageBox(wxT("No changes requested"), wxT("Error"),
5489  wxOK | wxICON_ERROR, NULL);
5490  }
5491  }
5492 }
5493 
5495 {
5497  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5499  if (cmd) m_CmdProccessor->Execute(cmd);
5500 }
5501 
5502 void CSequenceEditingEventHandler::MacroEditor( wxCommandEvent& event )
5503 {
5504  wxWindow* main_window = NULL;
5505  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5506  if (wb_frame)
5507  main_window = wb_frame->GetMainWindow();
5508 
5509  CRef<IGuiCoreHelper> gui_core_helper(new CGuiCoreHelper(m_Workbench));
5510  CMacroFlowEditor::GetInstance(main_window, gui_core_helper);
5511 }
5512 
5514 {
5515  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5516  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5517 
5519  if (dlg.ShowModal() == wxID_OK)
5520  {
5522  if (cmd) m_CmdProccessor->Execute(cmd);
5523  }
5524 }
5525 
5527 {
5528  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5529  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5530 
5532  dlg.apply(m_TopSeqEntry,m_CmdProccessor,"BioseqFeatsRevComp", true, true, true);
5533 }
5534 
5536 {
5537  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5538  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5539 
5541  dlg.apply(m_TopSeqEntry,m_CmdProccessor,"BioseqOnlyRevComp", true, false, true);
5542 }
5543 
5544 void CSequenceEditingEventHandler::UnculTaxTool( wxCommandEvent& event )
5545 {
5546  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5547  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5548 
5549  wxWindow* main_window = NULL;
5550  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5551  if (wb_frame)
5552  main_window = wb_frame->GetMainWindow();
5553  try
5554  {
5555  CUnculTaxTool *dlg = new CUnculTaxTool(main_window, m_TopSeqEntry, m_Workbench);
5556  dlg->Show(true);
5557  } catch (CException&) {}
5558 }
5559 
5561 {
5563  dlg->Show(true);
5564 }
5565 
5567 {
5569  dlg->ApplyToAllAndDie();
5570 }
5571 
5573 {
5575  dlg->Show(true);
5576 }
5577 
5579 {
5580  wxWindow* main_window = NULL;
5581  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5582  if (wb_frame)
5583  main_window = wb_frame->GetMainWindow();
5585  dlg->Show(true);
5586 }
5587 
5588 
5590 {
5592  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5593 
5594  CAddFluComments worker;
5596 }
5597 
5598 
5600 {
5601  CLowerQuals* dlg = new CLowerQuals(NULL, m_Workbench);
5602  dlg->Show(true);
5603 }
5604 
5606 {
5608  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5609 
5610  CRef<CCmdComposite> adjust_cds(new CCmdComposite("Adjust for consensus splice sites"));
5611  for (CBioseq_CI b_iter(m_TopSeqEntry, CSeq_inst::eMol_na); b_iter; ++b_iter) {
5612 
5613  bool good_seq = false;
5614  switch (event.GetId()) {
5618  break;
5622  break;
5625  break;
5626  }
5627  if (good_seq) {
5628  if (event.GetId() == eCmdAdjustConsensusSpliceSitesConsensusEnds) {
5629  for (CFeat_CI feat(*b_iter, SAnnotSelector(CSeqFeatData::e_Cdregion)); feat; ++feat) {
5631  CRef<CCmdComposite> cmd = worker.GetCommandToAdjustCDSEnds(feat->GetMappedFeature());
5632  if (cmd) {
5633  adjust_cds->AddCommand(*cmd);
5634  }
5635  }
5636  }
5637  else {
5638  for (CFeat_CI feat(*b_iter, SAnnotSelector(CSeqFeatData::e_Cdregion)); feat; ++feat) {
5640  CRef<CCmdComposite> cmd = worker.GetCommand(feat->GetMappedFeature());
5641  if (cmd) {
5642  adjust_cds->AddCommand(*cmd);
5643  }
5644  }
5645  }
5646  }
5647  }
5648 
5649  m_CmdProccessor->Execute(adjust_cds);
5650 }
5651 
5652 
5654 {
5656  bool similar = true;
5657  bool nonfunctional = false;
5658  bool unverified = false;
5659  dlg->ApplyToAllAndDie(similar,nonfunctional,unverified);
5660 }
5661 
5663 {
5665  bool similar = false;
5666  bool nonfunctional = true;
5667  bool unverified = false;
5668  dlg->ApplyToAllAndDie(similar,nonfunctional,unverified);
5669 }
5670 
5672 {
5674  bool similar = true;
5675  bool nonfunctional = false;
5676  bool unverified = true;
5677  dlg->ApplyToAllAndDie(similar,nonfunctional,unverified);
5678 }
5679 
5680 
5682 {
5684  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5685 
5686  CRef<CCmdComposite> cmd(new CCmdComposite("Combine Selected Genes into Pseudogene"));
5687 
5689  if (objects.empty()) return;
5690 
5691  vector<const CSeq_feat*> genes;
5693  const CObject* ptr = it->object.GetPointer();
5694  const CSeq_feat* seqfeat = dynamic_cast<const CSeq_feat*>(ptr);
5695  if (seqfeat && seqfeat->IsSetData() && seqfeat->GetData().IsGene())
5696  {
5697  genes.push_back(seqfeat);
5698  }
5699  }
5700  if (genes.size() != 2)
5701  {
5702  wxMessageBox(_("Please select two gene features to combine. Use Ctrl+Left mouse click"), wxT("Error"), wxOK | wxICON_ERROR, NULL);
5703  return;
5704  }
5705  CScope &scope = m_TopSeqEntry.GetScope();
5706  CRef<CSeq_feat> new_feat(new CSeq_feat());
5707  new_feat->Assign(*genes[0]);
5708  new_feat->SetPseudo(true);
5709  new_feat->SetLocation().Add(genes[1]->GetLocation());
5711  new_loc->SetPartialStart(false, eExtreme_Biological);
5712  new_loc->SetPartialStop(false, eExtreme_Biological);
5713  new_feat->SetLocation(*new_loc);
5714  new_feat->SetPartial(false);
5715  vector<string> locus;
5716  if (genes[1]->GetData().GetGene().IsSetLocus())
5717  locus.push_back(genes[1]->GetData().GetGene().GetLocus());
5718  if (genes[0]->GetData().GetGene().IsSetLocus())
5719  locus.push_back(genes[0]->GetData().GetGene().GetLocus());
5720  new_feat->SetComment(NStr::Join(locus,";"));
5722  GetProductToCDSMap(scope, product_to_cds);
5723  CBioseq_Handle bsh = scope.GetBioseqHandle(new_feat->GetLocation());
5725  cmd->AddCommand(*CRef<CCmdCreateFeat>(new CCmdCreateFeat(seh, *new_feat)));
5726  cmd->AddCommand(*GetDeleteFeatureCommand(scope.GetSeq_featHandle(*genes[0]), true, product_to_cds));
5727  cmd->AddCommand(*GetDeleteFeatureCommand(scope.GetSeq_featHandle(*genes[1]), true, product_to_cds));
5728  CConstRef<CSeq_feat> cds1 = sequence::GetOverlappingCDS(genes[0]->GetLocation(), scope);
5729  CConstRef<CSeq_feat> cds2 = sequence::GetOverlappingCDS(genes[1]->GetLocation(), scope);
5730  cmd->AddCommand(*GetDeleteFeatureCommand(scope.GetSeq_featHandle(*cds1), true, product_to_cds));
5731  cmd->AddCommand(*GetDeleteFeatureCommand(scope.GetSeq_featHandle(*cds2), true, product_to_cds));
5733 }
5734 
5736 {
5738  dlg->Show(true);
5739 }
5740 
5741 
5742 void CSequenceEditingEventHandler::LatLonTool( wxCommandEvent& event )
5743 {
5744  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5745  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5746 
5747  try
5748  {
5750 
5751  bool done = false;
5752  while (!done) {
5753  if (dlg.ShowModal() == wxID_OK) {
5755  if (cmd) {
5757  done = true;
5758  } else {
5759  wxString error = ToWxString(dlg.GetErrorMessage());
5760  wxMessageBox(error, wxT("Error"),
5761  wxOK | wxICON_ERROR, NULL);
5762  }
5763  } else {
5764  done = true;
5765  }
5766  }
5767  } catch (CException&) {}
5768 }
5769 
5771 {
5772  CRef<CCmdComposite> cmd(new CCmdComposite("CDSGeneRangeError Suppress"));
5773  for (CFeat_CI feat_ci(m_TopSeqEntry); feat_ci; ++feat_ci)
5774  {
5775  const CSeq_feat& orig = feat_ci->GetOriginalFeature();
5778  bool gene_xref = false;
5780  {
5781  if ((*xref)->IsSetData() && (*xref)->GetData().IsGene())
5782  gene_xref = true;
5783  }
5784  if (!contained && overlapping && !gene_xref)
5785  {
5786  CRef<CSeq_feat> new_feat(new CSeq_feat());
5787  new_feat->Assign(orig);
5789  xref->SetData().SetGene();
5790  new_feat->SetXref().push_back(xref);
5791  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(feat_ci->GetSeq_feat_Handle(), *new_feat)));
5792  }
5793  }
5795 }
5796 
5798 {
5799  CRef<CCmdComposite> cmd(new CCmdComposite("CDSGeneRangeError Restore"));
5800  for (CFeat_CI feat_ci(m_TopSeqEntry); feat_ci; ++feat_ci)
5801  {
5802  const CSeq_feat& orig = feat_ci->GetOriginalFeature();
5805  bool gene_xref = false;
5807  {
5808  if ((*xref)->IsSetData() && (*xref)->GetData().IsGene())
5809  gene_xref = true;
5810  }
5811  if (!contained && overlapping && gene_xref)
5812  {
5813  CRef<CSeq_feat> new_feat(new CSeq_feat());
5814  new_feat->Assign(orig);
5815  CSeq_feat::TXref::iterator seq_feat_xref;
5816  EDIT_EACH_SEQFEATXREF_ON_SEQFEAT(xref,*new_feat)
5817  {
5818  if ((*xref)->IsSetData() && (*xref)->GetData().IsGene())
5819  seq_feat_xref = xref;
5820  }
5821  new_feat->SetXref().erase(seq_feat_xref);
5822  if (new_feat->GetXref().empty())
5823  new_feat->ResetXref();
5824  cmd->AddCommand(*CRef<CCmdChangeSeq_feat>(new CCmdChangeSeq_feat(feat_ci->GetSeq_feat_Handle(), *new_feat)));
5825  }
5826  }
5828 }
5829 
5831 {
5832  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
5833  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5834 
5836  if (dlg.ShowModal() == wxID_OK)
5837  {
5838  dlg.SaveTable(m_WorkDir);
5839  }
5840 }
5841 
5842 void CSequenceEditingEventHandler::RemoveSegGaps( wxCommandEvent& event )
5843 {
5845  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5846 
5847  CRef<CCmdComposite> cmd(new CCmdComposite("Remove Seg Gaps"));
5848  // So far, handle DENSEG type only
5850  CAlign_CI align_ci(m_TopSeqEntry, align_sel);
5851  for ( ; align_ci; ++align_ci) {
5852  CRef<CSeq_align> new_align(new CSeq_align());
5853  new_align->Assign(align_ci.GetOriginalSeq_align());
5854 
5855  bool modified = macro::CMacroFunction_RemoveSegGaps::s_RemoveSegGaps(*new_align);
5856  if (modified) {
5857  CIRef<IEditCommand> chgAlign( new CCmdChangeAlign( align_ci.GetSeq_align_Handle(), *new_align ));
5858  cmd->AddCommand(*chgAlign);
5859  }
5860  }
5862 }
5863 
5864 void CSequenceEditingEventHandler::EditSequence( wxCommandEvent& event )
5865 {
5866  wxWindow* main_window = NULL;
5867  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5868  if (wb_frame)
5869  main_window = wb_frame->GetMainWindow();
5870 
5873  if (sel_srv)
5874  {
5875  sel_srv->GetActiveObjects(objects);
5876  }
5877  if (objects.empty())
5878  {
5880  }
5881 
5882  if(objects.empty())
5883  {
5884  wxMessageBox(wxT("No objects found"), wxT("Error"), wxOK | wxICON_ERROR);
5885  return;
5886  }
5887 
5889  if (!scope)
5890  {
5891  wxMessageBox(wxT("Cannot determine scope"), wxT("Error"), wxOK | wxICON_ERROR);
5892  return;
5893  }
5894  const CSeq_loc* loc = NULL;
5895  size_t count = 0;
5896  for (auto &o : objects)
5897  {
5898  const CSeq_loc* obj_loc = dynamic_cast<const CSeq_loc*>(o.object.GetPointer());
5899  if (!obj_loc)
5900  continue;
5901  if (!loc)
5902  loc = obj_loc;
5903  count++;
5904  }
5905 
5906  if (!loc)
5907  {
5908  wxMessageBox(wxT("The selection is not a bioseq"), wxT("Error"), wxOK | wxICON_ERROR);
5909  return;
5910  }
5911  if (count > 1)
5912  {
5913  wxMessageBox(wxT("Multiple bioseqs in scope, opening the first one only"), wxT("Warning"), wxOK | wxICON_ERROR);
5914  }
5915  int from = 0;
5916  CRef<CSeq_loc> whole_loc;
5917  if (!loc->IsWhole())
5918  {
5919  from = loc->GetStart(eExtreme_Positional) + 1;
5920  CBioseq_Handle bsh = scope->GetBioseqHandle(*loc);
5921  whole_loc = bsh.GetRangeSeq_loc(0,0);
5922  }
5923  if (whole_loc)
5924  loc = whole_loc.GetPointer();
5925  CEditSequence *dlg = NULL;
5926  try
5927  {
5928  dlg = new CEditSequence( main_window, loc, *scope, m_CmdProccessor, from);
5929  dlg->Show(true);
5930  } catch (CException&)
5931  {
5932  if (dlg)
5933  dlg->Destroy();
5934  wxMessageBox(wxT("No bioseq selected"), wxT("Error"), wxOK | wxICON_ERROR);
5935  }
5936 
5937 }
5938 
5940 {
5942  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5943 
5944  CRawSeqToDeltaByN dlg(NULL);
5945  if (dlg.ShowModal() == wxID_OK)
5946  {
5947  dlg.apply(m_TopSeqEntry, m_CmdProccessor, "Raw Sequences to Delta by Ns");
5948  }
5949 }
5950 
5952 {
5954  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5955 
5956  wxWindow* main_window = NULL;
5957  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
5958  if (wb_frame)
5959  main_window = wb_frame->GetMainWindow();
5960 
5961  CRawSeqToDeltaSeqByLoc dlg(main_window, m_TopSeqEntry);
5962  if (dlg.ShowModal() == wxID_OK)
5963  {
5964  CRef<CCmdComposite> cmd = dlg.apply("Raw Sequences to Delta by Loc");
5965  if (cmd)
5967  }
5968 }
5969 
5971 {
5973  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5974 
5976  if (cmd) m_CmdProccessor->Execute(cmd);
5977 }
5978 
5980 {
5982  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
5983 
5984  CUpdateReplacedECNumbers worker;
5985  worker.apply(m_TopSeqEntry, m_CmdProccessor, "Update Replaced EC numbers");
5986 }
5987 
5989 {
5991  if (!m_TopSeqEntry || !m_CmdProccessor) return;
5992 
5993  CSeqUpdateWorker worker;
5994  switch (event.GetId()) {
5995  case eCmdUpdateSequence:
5998  break;
6001  break;
6004  break;
6005  }
6006  if (RunningInsideNCBI()) {
6008  } else {
6010  }
6011 }
6012 
6014 {
6016  if (!m_TopSeqEntry || !m_CmdProccessor) return;
6017 
6018  CSeqUpdateWorker worker;
6019  switch (event.GetId()) {
6022  break;
6025  break;
6026  }
6028 }
6029 
6031 {
6032  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6033  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6034 
6036  dlg->Show(true);
6037 }
6038 
6040 {
6042  if (!m_TopSeqEntry || !m_CmdProccessor) return;
6043 
6044  //CImportFeatTable::ShowTableInfo(); // show informative message
6046  CIRef<IEditCommand> cmd = worker.ImportFeaturesFromFile(m_WorkDir, "file_loader_5col");
6047  if (!cmd)
6048  return;
6049 
6051 }
6052 
6053 void CSequenceEditingEventHandler::ImportGFF3(wxCommandEvent& event)
6054 {
6056  if (!m_TopSeqEntry || !m_CmdProccessor) return;
6057 
6058  //CImportFeatTable::ShowTableInfo(); // show informative message
6060  CIRef<IEditCommand> cmd = worker.ImportFeaturesFromFile(m_WorkDir, "file_loader_gff");
6061  if (!cmd)
6062  return;
6063 
6065 }
6066 
6068 {
6070  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6071 
6072  //CImportFeatTable::ShowTableInfo(); // show informative message
6075  if (!cmd)
6076  return;
6077 
6079 }
6080 
6082 {
6084  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6085 
6087 }
6088 
6090 {
6092  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6093 
6095 }
6096 
6098 {
6100  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6101 
6103 }
6104 
6106 {
6108 }
6109 
6111 {
6113 }
6114 
6115 void CSequenceEditingEventHandler::FindASN1( wxCommandEvent& evt )
6116 {
6118  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6119 
6120  wxWindow* main_window = NULL;
6121  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6122  if (wb_frame)
6123  main_window = wb_frame->GetMainWindow();
6125  dlg->Show(true);
6126 }
6127 
6129 {
6130  wxWindow* main_window = NULL;
6131  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6132  if (wb_frame)
6133  main_window = wb_frame->GetMainWindow();
6134  CFuseFeaturesDlg * dlg = new CFuseFeaturesDlg(main_window, m_Workbench);
6135  dlg->Show(true);
6136 }
6137 
6139 {
6141 }
6142 
6144 {
6145  wxWindow* main_window = NULL;
6146  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6147  if (wb_frame)
6148  main_window = wb_frame->GetMainWindow();
6149  CRmDupFeaturesDlg * dlg = new CRmDupFeaturesDlg(main_window, m_Workbench);
6150  dlg->Show(true);
6151 }
6152 
6154 {
6157  CAECRFrame * dlg = new CAECRFrame(NULL, m_Workbench);
6158  dlg->SetInitParameters(aecr_action_type, aecr_field_type);
6159  CallAfter(&CSequenceEditingEventHandler::ShowAfter, dlg);
6160 }
6161 
6163 {
6165  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6166 
6167 
6168  string strcomment_dbname;
6169  switch (evt.GetId()){
6171  strcomment_dbname.assign("HIVDatabase");
6172  break;
6174  strcomment_dbname.assign("FluData");
6175  break;
6177  strcomment_dbname.assign("MIGS-Data");
6178  break;
6180  strcomment_dbname.assign("MIMS-Data");
6181  break;
6183  strcomment_dbname.assign("MIENS-Data");
6184  break;
6186  strcomment_dbname.assign("MIMARKS:3.0-Data");
6187  break;
6189  strcomment_dbname.assign("MIGS:3.0-Data");
6190  break;
6192  strcomment_dbname.assign("MIMS:3.0-Data");
6193  break;
6195  strcomment_dbname.assign("Assembly-Data");
6196  break;
6198  strcomment_dbname.assign("Genome-Assembly-Data");
6199  break;
6201  strcomment_dbname.assign("International Barcode of Life (iBOL)Data");
6202  break;
6203 
6204  }
6205 
6207  vector<CConstRef<CObject> > objs = col->GetObjects(m_TopSeqEntry, kEmptyStr, CRef<edit::CStringConstraint>(NULL));
6208  if (objs.size() == 0) {
6209  wxMessageBox(wxT("No structured comments found!"), wxT("Error"),
6210  wxOK | wxICON_ERROR, NULL);
6211  return;
6212  }
6213 
6214  bool any_change = false;
6215  CRef<CCmdComposite> cmd(new CCmdComposite("Edit Structured Comment DB name"));
6216  ITERATE(vector<CConstRef<CObject> >, it, objs) {
6217  CRef<CObject> new_obj = col->GetNewObject(*it);
6218  col->SetVal(*new_obj, strcomment_dbname, edit::eExistingText_replace_old);
6219  CRef<CCmdComposite> ecmd = col->GetReplacementCommand(*it, new_obj,
6220  m_TopSeqEntry.GetScope(), "Edit Structured Comment Dbname Values");
6221  if (ecmd) {
6222  cmd->AddCommand(*ecmd);
6223  any_change = true;
6224  }
6225  }
6226 
6227  if (any_change) {
6229  } else {
6230  wxMessageBox(wxT("No effect!"), wxT("Error"),
6231  wxOK | wxICON_ERROR, NULL);
6232  }
6233 }
6234 
6236 {
6238  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6239 
6241 }
6242 
6243 
6245 {
6247  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6248 
6250 }
6251 
6253 {
6255  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6256 
6258 }
6259 
6261 {
6263  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6264 
6266 }
6267 
6268 
6270 {
6272  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6273 
6275 }
6276 
6278 {
6280  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6281 
6283 }
6284 
6286 {
6288  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6289 
6291 }
6292 
6294 {
6296  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6297 
6299 }
6300 
6302 {
6303  wxWindow* main_window = NULL;
6304  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6305  if (wb_frame)
6306  main_window = wb_frame->GetMainWindow();
6307  CCdsFromGeneMrnaExon * dlg = new CCdsFromGeneMrnaExon(main_window, m_Workbench);
6308  dlg->Show(true);
6309 }
6310 
6312 {
6313  wxWindow* main_window = NULL;
6314  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6315  if (wb_frame)
6316  main_window = wb_frame->GetMainWindow();
6317  CmRNAFromGeneCdsExon * dlg = new CmRNAFromGeneCdsExon(main_window, m_Workbench);
6318  dlg->Show(true);
6319 }
6320 
6322 {
6323  wxWindow* main_window = NULL;
6324  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6325  if (wb_frame)
6326  main_window = wb_frame->GetMainWindow();
6327  CtRNAFromGene * dlg = new CtRNAFromGene(main_window, m_Workbench);
6328  dlg->Show(true);
6329 }
6330 
6332 {
6333  wxWindow* main_window = NULL;
6334  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6335  if (wb_frame)
6336  main_window = wb_frame->GetMainWindow();
6337  CCdsToMatPeptide * dlg = new CCdsToMatPeptide(main_window, m_Workbench);
6338  dlg->Show(true);
6339 }
6340 
6341 void CSequenceEditingEventHandler::SelectFeature( wxCommandEvent& event )
6342 {
6343  wxWindow* main_window = NULL;
6344  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6345  if (wb_frame)
6346  main_window = wb_frame->GetMainWindow();
6347  CSelectFeatures * dlg = new CSelectFeatures(main_window, m_Workbench);
6348  dlg->Show();
6349 }
6350 
6351 
6352 void CSequenceEditingEventHandler::RemoveSet( wxCommandEvent& event )
6353 {
6355 }
6356 
6358 {
6360 }
6361 
6362 void CSequenceEditingEventHandler::EditSeqId( wxCommandEvent& event )
6363 {
6364  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6365  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6366  wxWindow* main_window = NULL;
6367  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6368  if (wb_frame)
6369  main_window = wb_frame->GetMainWindow();
6370 
6371  CEditSeqId dlg(main_window, m_TopSeqEntry);
6372  if (dlg.ShowModal() == wxID_OK)
6373  {
6375  if (cmd)
6377  CRef<CCmdComposite> del_original_ids = dlg.GetRemoveOriginalIdCommand();
6378  if (del_original_ids)
6379  m_CmdProccessor->Execute(del_original_ids);
6380  dlg.Close();
6381  }
6382 }
6383 
6384 
6385 void CSequenceEditingEventHandler::EditHistory( wxCommandEvent& event )
6386 {
6387  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6388  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6389 
6390  CBioseq_Handle bsh;
6391  vector<CRef<CSeq_loc> > &locs = x_GetSelectedLocations();
6392  if (!locs.empty()) {
6393  try
6394  {
6395  bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*locs.front());
6396  } catch (CException&) {}
6397  }
6398 
6399  if (!bsh)
6400  return;
6401 
6402  wxWindow* main_window = NULL;
6403  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6404  if (wb_frame)
6405  main_window = wb_frame->GetMainWindow();
6406 
6407  try
6408  {
6409  CEditHistory dlg(main_window, bsh);
6410 
6411  if (dlg.ShowModal() == wxID_OK)
6412  {
6414  if (cmd)
6415  {
6417  }
6418  }
6419  } catch (CException&) {}
6420 }
6421 
6423 {
6424  wxWindow* main_window = NULL;
6425  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6426  if (wb_frame)
6427  main_window = wb_frame->GetMainWindow();
6428  CExonFromCds * dlg = new CExonFromCds(main_window, m_Workbench, CSeqFeatData::eSubtype_cdregion, "Exon from CDS");
6429  dlg->Show(true);
6430 }
6431 
6433 {
6434  wxWindow* main_window = NULL;
6435  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6436  if (wb_frame)
6437  main_window = wb_frame->GetMainWindow();
6438  CExonFromCds * dlg = new CExonFromCds(main_window, m_Workbench, CSeqFeatData::eSubtype_mRNA, "Exon from mRNA");
6439  dlg->Show(true);
6440 }
6441 
6443 {
6444  wxWindow* main_window = NULL;
6445  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6446  if (wb_frame)
6447  main_window = wb_frame->GetMainWindow();
6448  CExonFromCds * dlg = new CExonFromCds(main_window, m_Workbench, CSeqFeatData::eSubtype_tRNA, "Exon from tRNA");
6449  dlg->Show(true);
6450 }
6451 
6452 
6454 {
6455  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6456  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6457  wxWindow* main_window = NULL;
6458  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6459  if (wb_frame)
6460  main_window = wb_frame->GetMainWindow();
6461 
6462  CSetGlobalRefGeneStatus dlg(main_window, m_TopSeqEntry);
6463  if (dlg.ShowModal() == wxID_OK)
6464  {
6466  if (cmd)
6467  {
6469  }
6470  }
6471 }
6472 
6473 void CSequenceEditingEventHandler::ClearKeywords( wxCommandEvent& event )
6474 {
6475  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6476  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6477  wxWindow* main_window = NULL;
6478  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6479  if (wb_frame)
6480  main_window = wb_frame->GetMainWindow();
6481 
6482  CClearKeywords dlg(main_window, m_TopSeqEntry);
6483  if (dlg.ShowModal() == wxID_OK)
6484  {
6486  if (cmd)
6487  {
6489  }
6490  }
6491 }
6492 
6494 {
6496  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6497 
6499 }
6500 
6502 {
6504  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6505 
6507 }
6508 
6510 {
6512  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6513 
6515  if (cmd)
6516  {
6518  }
6519 }
6520 
6521 void CSequenceEditingEventHandler::LinkmRNACDS( wxCommandEvent& event )
6522 {
6524  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6525 
6526  CmRNACDSLinker worker(m_TopSeqEntry);
6527  switch (event.GetId()){
6530  break;
6533  break;
6536  break;
6537  case eCmdLinkmRNACDSLabel:
6538  worker.LinkByLabel(m_CmdProccessor);
6539  break;
6542  break;
6544  m_CmdProccessor->Execute(CCmdFeatIdXrefsFromQualifiers::Create(m_TopSeqEntry, { "protein_id", "orig_protein_id" }));
6545  break;
6547  m_CmdProccessor->Execute(CCmdFeatIdXrefsFromQualifiers::Create(m_TopSeqEntry, { "transcript_id", "orig_transcript_id" }));
6548  break;
6551  break;
6552  case eCmdShowLinkedmRNACDS:
6553  {
6554  vector<CConstRef<CObject> > objs = worker.GetReferencedmRNA_CDS(m_SelObjects);
6555  if (!objs.empty()) {
6558  evt.AddObjectSelection(objs);
6559  service->Broadcast(evt, NULL);
6560  }
6561  break;
6562  }
6563  default:
6564  ;
6565  }
6566 }
6567 
6569 {
6570  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6571  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6572 
6574  if (cmd) {
6576  }
6577 }
6578 
6580 {
6581  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6582  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6583 
6585  if (cmd) {
6587  }
6588 }
6589 
6591 {
6592  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6593  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6594 
6596  if (cmd) {
6598  }
6599 }
6600 
6601 void CSequenceEditingEventHandler::DeltaSeqToRaw( wxCommandEvent& event )
6602 {
6603  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6604  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6606 }
6607 
6608 
6610 {
6611  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6612  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6613 
6615  if (cmd) {
6617  }
6618 }
6619 
6621 {
6622  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6623  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6624 
6626  if (cmd) {
6628  }
6629 }
6630 
6632 {
6633  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6634  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6635 
6637  if (cmd) {
6639  }
6640 }
6641 
6643 {
6644  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6645  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6646 
6648  if (cmd) {
6650  }
6651 }
6652 
6654 {
6655  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6656  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6657 
6659  if (cmd) {
6661  }
6662 }
6663 
6665 {
6666  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6667  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6668 
6670  if (cmd) {
6672  }
6673 }
6674 
6676 {
6677  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6678  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6679 
6681  if (cmd) {
6683  }
6684 }
6685 
6687 {
6688  if (!m_Workbench) return;
6689  wxWindow* main_window = NULL;
6690  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6691  if (wb_frame)
6692  main_window = wb_frame->GetMainWindow();
6693  CRemoveGeneXrefs *dlg = new CRemoveGeneXrefs(main_window, m_Workbench);
6694  dlg->Show(true);
6695 }
6696 
6697 void CSequenceEditingEventHandler::ExtendCDS( wxCommandEvent& event )
6698 {
6699  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6700  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6701 
6703  if (cmd) {
6705  }
6706 }
6707 
6708 void CSequenceEditingEventHandler::TruncateCDS( wxCommandEvent& event )
6709 {
6710  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6711  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6712 
6713  wxWindow* main_window = NULL;
6714  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6715  if (wb_frame)
6716  main_window = wb_frame->GetMainWindow();
6717 
6718  CTruncateCDS dlg(main_window, m_TopSeqEntry);
6719  if (dlg.ShowModal() == wxID_OK)
6720  {
6722  if (cmd)
6723  {
6725  }
6726  }
6727 }
6728 
6730 {
6731  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6732  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6733 
6735  if (cmd)
6736  {
6738  }
6739 }
6740 
6742 {
6743  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6744  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6745 
6746  wxWindow* main_window = NULL;
6747  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6748  if (wb_frame)
6749  main_window = wb_frame->GetMainWindow();
6750 
6751  CFixProductNames dlg(main_window, m_TopSeqEntry);
6752  if (dlg.ShowModal() == wxID_OK)
6753  {
6755  if (cmd)
6756  {
6758  }
6759  }
6760 }
6761 
6763 {
6764  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6765  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6766 
6767  wxWindow* main_window = NULL;
6768  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6769  if (wb_frame)
6770  main_window = wb_frame->GetMainWindow();
6771 
6772  CApplyGCode dlg(main_window, m_TopSeqEntry);
6773  if (dlg.ShowModal() == wxID_OK)
6774  {
6776  if (cmd)
6777  {
6780  if (cleanup)
6782  string error;
6784  if (retranslate)
6785  m_CmdProccessor->Execute(retranslate);
6786  }
6787  }
6788 }
6789 
6791 {
6792  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6793  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6794 
6795  wxWindow* main_window = NULL;
6796  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6797  if (wb_frame)
6798  main_window = wb_frame->GetMainWindow();
6799 
6800  CEditSeqEndsWithAlign dlg(main_window, m_TopSeqEntry);
6801  if (dlg.ShowModal() == wxID_OK)
6802  {
6804  if (cmd)
6805  {
6807  }
6808  }
6809 }
6810 
6811 void CSequenceEditingEventHandler::UpdateAlign( wxCommandEvent& event )
6812 {
6813  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6814  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6815 
6816  wxWindow* main_window = NULL;
6817  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6818  if (wb_frame)
6819  main_window = wb_frame->GetMainWindow();
6820 
6821  CUpdateAlign worker;
6822  worker.apply(m_TopSeqEntry, m_CmdProccessor, main_window);
6823 }
6824 
6826 {
6827  wxWindow* main_window = NULL;
6828  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6829  if (wb_frame)
6830  main_window = wb_frame->GetMainWindow();
6832  dlg->Show(true);
6833 }
6834 
6836 {
6837  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6838  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6839 
6840  wxWindow* main_window = NULL;
6841  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6842  if (wb_frame)
6843  main_window = wb_frame->GetMainWindow();
6844 
6846 }
6847 
6849 {
6850  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6851  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6852 
6853  wxWindow* main_window = NULL;
6854  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6855  if (wb_frame)
6856  main_window = wb_frame->GetMainWindow();
6857 
6859 }
6860 
6862 {
6863  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6864  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6865 
6867  if (cmd)
6868  {
6870  }
6871 }
6872 
6874 {
6875  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6876  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6877 
6878  CGenusSpeciesFixup worker;
6880  if (cmd)
6881  {
6883  }
6884 }
6885 
6887 {
6888  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6889  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6890 
6891  wxWindow* main_window = NULL;
6892  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6893  if (wb_frame)
6894  main_window = wb_frame->GetMainWindow();
6895 
6896  try
6897  {
6898  CCountryConflict dlg(main_window, m_TopSeqEntry);
6899 
6900  if (dlg.ShowModal() == wxID_OK)
6901  {
6903  if (cmd)
6904  {
6906  } else {
6907  wxString error = ToWxString(dlg.GetErrorMessage());
6908  wxMessageBox(error, wxT("Error"),
6909  wxOK | wxICON_ERROR, NULL);
6910  }
6911  }
6912 
6913  } catch (CException&) {}
6914 }
6915 
6916 void CSequenceEditingEventHandler::AddSecondary( wxCommandEvent& event )
6917 {
6918  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6919  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6920 
6921  wxWindow* main_window = NULL;
6922  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6923  if (wb_frame)
6924  main_window = wb_frame->GetMainWindow();
6925 
6927  vector<CRef<CSeq_loc> > &locs = x_GetSelectedLocations();
6928  if (locs.size() == 1) {
6929  try
6930  {
6931  seh = m_TopSeqEntry.GetScope().GetBioseqHandle(*locs.front()).GetSeq_entry_Handle();
6932  } catch (CException&) {}
6933  }
6934 
6935  CAddSecondary dlg(main_window, seh);
6936 
6937  if (dlg.ShowModal() == wxID_OK)
6938  {
6940  if (cmd)
6941  {
6943  }
6944  }
6945 
6946 }
6947 
6949 {
6950  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6951  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6952 
6954  if (cmd)
6955  {
6957  }
6958 }
6959 
6961 {
6962  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6963  if (!m_TopSeqEntry || !m_CmdProccessor) return;
6964 
6965  wxWindow* main_window = NULL;
6966  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6967  if (wb_frame)
6968  main_window = wb_frame->GetMainWindow();
6969 
6970  CFeatureTblFr* frame = new CFeatureTblFr(main_window, m_Workbench);
6971  frame->SetWorkDir(m_WorkDir);
6972  frame->Show(true);
6973 }
6974 
6976 {
6978  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6979 
6980  CFixStructuredVouchers worker;
6982  if (cmd)
6983  {
6985  }
6986 }
6987 
6989 {
6990  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
6991  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
6992 
6993  wxWindow* main_window = NULL;
6994  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
6995  if (wb_frame)
6996  main_window = wb_frame->GetMainWindow();
6997 
6998 
6999  CEditSequenceEnds dlg(main_window, m_TopSeqEntry);
7000 
7001  if (dlg.ShowModal() == wxID_OK)
7002  {
7004  if (cmd)
7005  {
7007  }
7008  }
7009 
7010 }
7011 
7013 {
7014  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7015  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7016 
7017  wxWindow* main_window = NULL;
7018  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7019  if (wb_frame)
7020  main_window = wb_frame->GetMainWindow();
7021 
7023  if (objects.empty())
7024  return;
7025 
7026  const CObject* ptr = objects.front().object.GetPointer();
7027  const CBioseq* bioseq = dynamic_cast<const CBioseq*>(ptr);
7028  const CBioseq_set* bioseqset = dynamic_cast<const CBioseq_set*>(ptr);
7029 
7030  CRef<CSeq_descr> so;
7031  if (bioseq && bioseq->IsSetDescr())
7032  {
7033  so.Reset(new CSeq_descr);
7034  so->Assign(bioseq->GetDescr());
7035  }
7036  if (bioseqset && bioseqset->IsSetDescr())
7037  {
7038  so.Reset(new CSeq_descr);
7039  so->Assign(bioseqset->GetDescr());
7040  }
7041 
7042  if (so)
7043  {
7044  wxFileDialog asn_save_file(main_window, wxT("Export object to file"), wxEmptyString, wxEmptyString,
7047  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
7048 
7049  if (asn_save_file.ShowModal() == wxID_OK)
7050  {
7051  wxString path = asn_save_file.GetPath();
7052  if( !path.IsEmpty())
7053  {
7054  ios::openmode mode = ios::out;
7055  CNcbiOfstream os(path.fn_str(), mode);
7056  os << MSerial_AsnText;
7057  os << *so;
7058  }
7059  }
7060  }
7061 
7062 }
7063 
7065 {
7066  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7067  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7068 
7069  wxWindow* main_window = NULL;
7070  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7071  if (wb_frame)
7072  main_window = wb_frame->GetMainWindow();
7073 
7074 
7075  CCreateSeqHistForTpa dlg(main_window, m_TopSeqEntry);
7076 
7077  if (dlg.ShowModal() == wxID_OK)
7078  {
7080  if (cmd)
7081  {
7083  }
7084  }
7085 }
7086 
7088 {
7089  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7090  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7091 
7092  wxWindow* main_window = NULL;
7093  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7094  if (wb_frame)
7095  main_window = wb_frame->GetMainWindow();
7096 
7097  string msg;
7099 
7100  if (cmd)
7101  {
7103  }
7104 
7105  if (!msg.empty())
7106  {
7107  CGenericReportDlg* report = new CGenericReportDlg(main_window);
7108  report->SetTitle(wxT("TPA Alignment Assembly Problems"));
7109  report->SetText(wxString(msg));
7110  report->Show(true);
7111  }
7112 }
7113 
7115 {
7116  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7117  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7118 
7120  if (cmd)
7121  {
7123  }
7124 }
7125 
7126 void CSequenceEditingEventHandler::FarPointerSeq( wxCommandEvent& event )
7127 {
7128  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7129  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7130 
7131  wxWindow* main_window = NULL;
7132  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7133  if (wb_frame)
7134  main_window = wb_frame->GetMainWindow();
7135 
7136  try
7137  {
7138  CFarPointerSeq dlg(main_window, m_TopSeqEntry);
7139 
7140  if (dlg.ShowModal() == wxID_OK)
7141  {
7143  if (cmd)
7144  {
7146  }
7147  }
7148  }
7149  catch (CException&)
7150  {
7151  }
7152 }
7153 
7154 
7156 {
7157  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7158  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7159 
7160  wxWindow* main_window = NULL;
7161  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7162  if (wb_frame)
7163  main_window = wb_frame->GetMainWindow();
7164 
7165 
7166  CAlignmentAssistant *dlg = NULL;
7167  try
7168  {
7169  dlg = new CAlignmentAssistant( main_window, m_TopSeqEntry, m_CmdProccessor);
7170  dlg->Show(true);
7171  } catch (CException&)
7172  {
7173  if (dlg)
7174  dlg->Destroy();
7175  wxMessageBox(wxT("No alignment found"), wxT("Error"), wxOK | wxICON_ERROR);
7176  }
7177 
7178 }
7179 
7181 {
7182  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7183  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7184 
7185  wxWindow* main_window = NULL;
7186  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7187  if (wb_frame)
7188  main_window = wb_frame->GetMainWindow();
7189 
7190 
7191  CAdjustFeaturesForGaps dlg(main_window, m_TopSeqEntry);
7192 
7193  bool done = false;
7194  while (!done) {
7195  if (dlg.ShowModal() == wxID_OK) {
7197  if (cmd)
7198  {
7200  if (dlg.LeaveUp()) {
7201  dlg.Refresh();
7202  } else {
7203  done = true;
7204  }
7205  }
7206  } else {
7207  done = true;
7208  }
7209  }
7210 }
7211 
7213 {
7214  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7215  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7216 
7217  try
7218  {
7220  if (cmd)
7221  {
7223  }
7224  }
7225  catch (CException& e)
7226  {
7227  wxMessageBox(wxString(e.GetMsg()), wxT("Error"),wxOK | wxICON_ERROR, NULL);
7228  }
7229 }
7230 
7232 {
7233  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7234  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7235 
7236  wxWindow* main_window = NULL;
7237  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7238  if (wb_frame)
7239  main_window = wb_frame->GetMainWindow();
7240 
7242  try
7243  {
7244  dlg = new CCompareWithBiosample(main_window, m_TopSeqEntry, m_CmdProccessor, true);
7245  dlg->Show(true);
7246  } catch (CException&)
7247  {
7248  if (dlg)
7249  dlg->Destroy();
7250  }
7251 }
7252 
7254 {
7255  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7256  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7257 
7258  wxWindow* main_window = NULL;
7259  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7260  if (wb_frame)
7261  main_window = wb_frame->GetMainWindow();
7262 
7264  try
7265  {
7266  dlg = new CCompareWithBiosample(main_window, m_TopSeqEntry, m_CmdProccessor, false);
7267  dlg->Show(true);
7268  } catch (CException&)
7269  {
7270  if (dlg)
7271  dlg->Destroy();
7272  }
7273 }
7274 
7275 
7277 {
7278  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7279  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7280 
7281 
7283 
7284  if (cmd)
7286 }
7287 
7288 void CSequenceEditingEventHandler::BarcodeTool( wxCommandEvent& event )
7289 {
7290  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7291  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7292 
7293  wxWindow* main_window = NULL;
7294  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7295  if (wb_frame)
7296  main_window = wb_frame->GetMainWindow();
7297 
7298  CBarcodeTool *dlg(NULL);
7299  try
7300  {
7301  dlg = new CBarcodeTool(main_window, m_TopSeqEntry, m_CmdProccessor, m_Workbench);
7302  dlg->Show(true);
7303  } catch (CException&)
7304  {
7305  if (dlg)
7306  dlg->Destroy();
7307  }
7308 }
7309 
7311 {
7312  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7313  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7314 
7315  CLocalFileRestorer restorer(m_Workbench);
7316  restorer.RestoreFile(event.GetId() == eCmdRestoreAndConvertSeqSubmit);
7317 }
7318 
7320 {
7321  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7322  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7323 
7325  CRef<CCmdComposite> cmd = worker.GetCommand();
7326  if (cmd)
7327  {
7329  }
7330  CRef<CCmdComposite> del_original_ids = worker.GetRemoveOriginalIdCommand();
7331  if (del_original_ids)
7332  {
7333  int answer = wxMessageBox (_("Remove Original Ids?"), _("Remove Original Ids"), wxYES_NO | wxICON_QUESTION);
7334  if (answer == wxYES)
7335  m_CmdProccessor->Execute(del_original_ids);
7336  }
7337 }
7338 
7340 {
7341  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7342  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7343 
7345  CRef<CCmdComposite> cmd = worker.GetCommand();
7346  if (cmd)
7347  {
7349  }
7350  CRef<CCmdComposite> del_original_ids = worker.GetRemoveOriginalIdCommand();
7351  if (del_original_ids)
7352  {
7353  int answer = wxMessageBox (_("Remove Original Ids?"), _("Remove Original Ids"), wxYES_NO | wxICON_QUESTION);
7354  if (answer == wxYES)
7355  m_CmdProccessor->Execute(del_original_ids);
7356  }
7357 }
7358 
7360 {
7361  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7362  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7363 
7365  CRef<CCmdComposite> cmd = worker.GetCommand();
7366  if (cmd)
7367  {
7369  }
7370  CRef<CCmdComposite> del_original_ids = worker.GetRemoveOriginalIdCommand();
7371  if (del_original_ids)
7372  {
7373  int answer = wxMessageBox (_("Remove Original Ids?"), _("Remove Original Ids"), wxYES_NO | wxICON_QUESTION);
7374  if (answer == wxYES)
7375  m_CmdProccessor->Execute(del_original_ids);
7376  }
7377 }
7378 
7380 {
7381  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7382  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7383 
7385  CRef<CCmdComposite> cmd = worker.GetCommand();
7386  if (cmd)
7387  {
7389  }
7390 }
7391 
7393 {
7394  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7395  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7396 
7398  CRef<CCmdComposite> cmd1 = worker1.GetCommand();
7399  if (cmd1)
7400  {
7401  m_CmdProccessor->Execute(cmd1);
7402  }
7404  CRef<CCmdComposite> cmd2 = worker2.GetCommand();
7405  if (cmd2)
7406  {
7408  }
7409 }
7410 
7412 {
7413  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7414  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7415 
7417  CRef<CCmdComposite> cmd = worker.GetCommand();
7418  if (cmd)
7419  {
7421  }
7422 }
7423 
7425 {
7426  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7427  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7428 
7429  CRemoveName worker(m_TopSeqEntry);
7430  CRef<CCmdComposite> cmd = worker.GetCommand();
7431  if (cmd)
7432  {
7434  }
7435 }
7436 
7438 {
7439  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7440  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7441 
7443  CRef<CCmdComposite> cmd = worker.GetCommand();
7444  if (cmd)
7445  {
7447  }
7448 }
7449 
7451 {
7452  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7453  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7454 
7456  CRef<CCmdComposite> cmd = worker.GetCommand();
7457  if (cmd)
7458  {
7460  }
7461 }
7462 
7463 
7465 {
7466  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7467  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
7468  wxWindow* main_window = NULL;
7469  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7470  if (wb_frame)
7471  main_window = wb_frame->GetMainWindow();
7472 
7473  CRemoveGeneralId dlg(main_window, m_TopSeqEntry);
7474  if (dlg.ShowModal() == wxID_OK)
7475  {
7477  if (cmd)
7479  }
7480 }
7481 
7483 {
7484  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7485  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7486 
7488  CRef<CCmdComposite> cmd = worker.GetCommand();
7489  if (cmd)
7490  {
7492  }
7493 }
7494 
7496 {
7497  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7498  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7499 
7501  CRef<CCmdComposite> cmd = worker.GetCommand();
7502  if (cmd)
7503  {
7505  }
7506 }
7507 
7509 {
7510  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7511  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7512 
7514  CRef<CCmdComposite> cmd = worker.GetCommand();
7515  if (cmd)
7516  {
7518  }
7519 }
7520 
7522 {
7523  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7524  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7525 
7527  CRef<CCmdComposite> cmd = worker.GetCommand();
7528  if (cmd)
7529  {
7531  }
7532 }
7533 
7535 {
7537  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7538 
7539  CRef<CSeqdesc> seqdesc(new CSeqdesc());
7540  seqdesc->SetUser().Assign(*(edit::CStructuredCommentField::MakeUserObject("Assembly-Data")));
7541 
7543  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
7544  if (!orig_locs.empty())
7545  {
7546  CBioseq_Handle bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*orig_locs.front());
7547  seh = bsh.GetSeq_entry_Handle();
7548  }
7549 
7550  CIRef<IEditObject> editor(new CEditObjectSeq_desc(*seqdesc, seh, m_TopSeqEntry.GetScope(), true));
7551  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
7552  edit_dlg->SetUndoManager(m_CmdProccessor);
7553  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
7554  edit_dlg->SetEditorWindow(editorWindow);
7555  edit_dlg->SetEditor(editor);
7556  edit_dlg->SetWorkDir(m_WorkDir);
7557  edit_dlg->Show(true);
7558 }
7559 
7561 {
7562  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7563  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7564 
7565  wxWindow* main_window = NULL;
7566  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7567  if (wb_frame)
7568  main_window = wb_frame->GetMainWindow();
7569 
7570  CEditCdsFrame dlg(main_window, m_TopSeqEntry);
7571  if (dlg.ShowModal() == wxID_OK)
7572  {
7574  if (cmd)
7576  }
7577 }
7578 
7579 void CSequenceEditingEventHandler::ExpandGaps(wxCommandEvent& event)
7580 {
7581  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7582  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7583 
7585  if (cmd)
7586  {
7588  }
7589 }
7590 
7592 {
7593  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7594  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7595 
7597  if (cmd)
7598  {
7600  }
7601 }
7602 
7604 {
7605  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7606  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7607 
7609  if (cmd)
7610  {
7612  }
7613 }
7614 
7616 {
7617  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7618  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7619 
7621  if (cmd)
7622  {
7624  }
7625 }
7626 
7628 {
7629  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7630  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7631 
7633  if (cmd)
7634  {
7636  }
7637 }
7638 
7640 {
7641  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7642  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7643 
7645  if (cmd)
7646  {
7648  }
7649 }
7650 
7652 {
7653  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7654  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7655 
7656  wxWindow* main_window = NULL;
7657  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7658  if (wb_frame)
7659  main_window = wb_frame->GetMainWindow();
7660 
7661  CAddLinkageToGaps dlg(main_window);
7662  if (dlg.ShowModal() == wxID_OK)
7663  {
7665  if (cmd)
7667  }
7668 }
7669 
7671 {
7672  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7673  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7674 
7675  CSortedProteins sorted_prs(m_TopSeqEntry);
7676  sorted_prs.View();
7677 }
7678 
7680 {
7681  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7682  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7683 
7684  CConsolidateLikeMods worker("; ");
7686  if (cmd)
7687  {
7689  }
7690 }
7691 
7693 {
7694  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7695  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7696 
7697  CConsolidateLikeMods worker(" ");
7699  if (cmd)
7700  {
7702  }
7703 }
7704 
7705 
7706 void CSequenceEditingEventHandler::ApplyFBOL(wxCommandEvent& event)
7707 {
7708  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7709  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7710 
7712  if (cmd)
7713  {
7715  }
7716 }
7717 
7719 {
7720  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7721  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7722 
7724  if (cmd)
7725  {
7727  }
7728 }
7729 
7731 {
7732  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7733  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7734 
7736  if (cmd)
7737  {
7739  }
7740 }
7741 
7743 {
7744  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7745  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7746 
7748  if (cmd)
7749  {
7751  }
7752 }
7753 
7755 {
7756  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7757  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7758 
7760  if (cmd)
7761  {
7763  }
7764 }
7765 
7767 {
7768  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7769  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7770 
7772  if (cmd)
7773  {
7775  }
7776 }
7777 
7779 {
7780  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7781  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7782 
7784  if (cmd)
7785  {
7787  }
7788 }
7789 
7791 {
7792  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7793  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7794 
7796  if (cmd)
7797  {
7799  }
7800 }
7801 
7803 {
7804  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7805  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7806 
7808  if (cmd)
7809  {
7811  }
7812 }
7813 
7815 {
7816  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7817  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7818 
7820  if (cmd)
7821  {
7823  }
7824 }
7825 
7827 {
7828  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7829  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7830 
7832  if (cmd)
7833  {
7835  }
7836 }
7837 
7838 
7839 void CSequenceEditingEventHandler::Duplicate(wxCommandEvent& event)
7840 {
7841  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7842  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7843 
7845  {
7846  CConstRef<CObject> obj = (*it).object;
7847 
7848  CSeq_entry_Handle seh;
7849  const CSeq_feat* f = dynamic_cast<const CSeq_feat * >(obj.GetPointer());
7850  const CSeqdesc* d = dynamic_cast<const CSeqdesc *>(obj.GetPointer());
7851  const CBioseq_set* s = dynamic_cast<const CBioseq_set *>(obj.GetPointer());
7852  const CSeq_entry* e = dynamic_cast<const CSeq_entry*>(obj.GetPointer());
7853  if (s || e)
7854  continue;
7855  if (f)
7856  {
7858  if (fh)
7859  {
7860  const CSeq_annot_Handle& annot_handle = fh.GetAnnot();
7861  seh = annot_handle.GetParentEntry();
7862  }
7863  }
7864  if (d)
7865  {
7866  seh = edit::GetSeqEntryForSeqdesc((*it).scope, *d);
7867  }
7868  if (!seh)
7869  {
7870  CScope::TTSE_Handles tses;
7872  if (!tses.empty())
7873  seh = tses.front();
7874  }
7875 
7876  CIRef<IEditObject> editor = CreateEditorForObject(obj, seh, true);
7877  if (editor)
7878  {
7879  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
7880  edit_dlg->SetUndoManager(m_CmdProccessor);
7881  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
7882  editorWindow->TransferDataToWindow();
7883  edit_dlg->SetEditorWindow(editorWindow);
7884  edit_dlg->SetEditor(editor);
7885  edit_dlg->SetWorkDir(m_WorkDir);
7886  edit_dlg->Show(true);
7887  break;
7888  }
7889  }
7890 }
7891 
7893 {
7894  if (!m_Workbench) return;
7895  wxWindow* main_window = NULL;
7896  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7897  if (wb_frame)
7898  main_window = wb_frame->GetMainWindow();
7899  CSuppressGenes *dlg = new CSuppressGenes(main_window, m_Workbench);
7900  dlg->Show(true);
7901 }
7902 
7903 
7905 {
7906  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
7907  if (!m_TopSeqEntry || !m_CmdProccessor) return;
7908 
7909  wxWindow* main_window = NULL;
7910  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
7911  if (wb_frame)
7912  main_window = wb_frame->GetMainWindow();
7913 
7917  id_col->SetHeader().SetTitle(kSequenceIdColLabel);
7918  table->SetColumns().push_back(id_col);
7919 
7920  size_t row = 0;
7922  for ( ; b_iter ; ++b_iter )
7923  {
7924  CRef<CSeq_id> id(new CSeq_id());
7926  id->Assign (*(best.GetSeqId()));
7927  id_col->SetData().SetId().push_back(id);
7928 
7929  for (CSeqdesc_CI it (*b_iter, CSeqdesc::e_User); it; ++it)
7930  {
7931  if (it->GetUser().IsSetType() && it->GetUser().GetType().IsStr() && NStr::EqualNocase(it->GetUser().GetType().GetStr(), "StructuredComment") )
7932  {
7933  ITERATE (CUser_object::TData, field_it, it->GetUser().GetData())
7934  {
7935  if ((*field_it)->IsSetLabel() && (*field_it)->GetLabel().IsStr() && (*field_it)->IsSetData())
7936  {
7937  vector<string> val;
7938  if ((*field_it)->GetData().IsStr())
7939  {
7940  val.push_back((*field_it)->GetData().GetStr());
7941  }
7942  else if ((*field_it)->GetData().IsStrs())
7943  {
7944  for (vector<CStringUTF8>::const_iterator str_it = (*field_it)->GetData().GetStrs().begin(); str_it != (*field_it)->GetData().GetStrs().end(); ++str_it)
7945  {
7946  val.push_back(*str_it);
7947  }
7948  }
7949  AddValueToTable (table, (*field_it)->GetLabel().GetStr(), NStr::Join(val, ", "), row);
7950  }
7951  }
7952  }
7953  }
7954 
7955  row++;
7956  }
7957  table->SetNum_rows(static_cast<CSeq_table::TNum_rows>(row));
7960 
7961  wxFileDialog table_save_file(main_window, wxT("Export Structured Comment Table"), wxEmptyString, wxEmptyString,
7964  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
7965 
7966  if (table_save_file.ShowModal() == wxID_OK)
7967  {
7968  wxString path = table_save_file.GetPath();
7969  wxString name = table_save_file.GetFilename();
7970 
7971  name.Trim(false);
7972  name.Trim(true);
7973 
7974  if (name.IsEmpty())
7975  {
7976  return;
7977  }
7978  ios::openmode mode = ios::out;
7979 
7980  CNcbiOfstream os(path.fn_str(), mode);
7981  if (!os)
7982  {
7983  wxMessageBox(wxT("Cannot open file ")+name, wxT("Error"), wxOK | wxICON_ERROR, main_window);
7984  return;
7985  }
7986 
7987  CCSVExporter exporter(os, '\t', '"', false);
7988  ITERATE (CSeq_table::TColumns, cit, table->GetColumns()) {
7989  exporter.Field((*cit)->GetHeader().GetTitle());
7990  }
7991  exporter.NewRow();
7992  for (int i = 0; i < table->GetNum_rows(); ++i) {
7993  ITERATE (CSeq_table::TColumns, cit, table->GetColumns()) {
7994  if (i < (*cit)->GetData().GetSize()) {
7995  if ((*cit)->GetData().IsId()) {
7996  string label = "";
7997  (*cit)->GetData().GetId()[i]->GetLabel(&label, CSeq_id::eContent);
7998  exporter.Field(label);
7999  } else if ((*cit)->GetData().IsString()) {
8000  exporter.Field((*cit)->GetData().GetString()[i]);
8001  }
8002  } else {
8003  string blank = "";
8004  exporter.Field(blank);
8005  }
8006  }
8007  exporter.NewRow();
8008  }
8009  }
8010 }
8011 
8013 {
8014  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8015  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
8016 
8017 
8019  dlg->Show(true);
8020 }
8021 
8023 {
8024  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8025  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8026 
8028  if (cmd)
8029  {
8031  }
8032 }
8033 
8035 {
8036  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8037  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8038 
8040  if (cmd)
8041  {
8043  }
8044 }
8045 
8047 {
8048  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8049  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8050 
8052  if (cmd)
8053  {
8055  }
8056 }
8057 
8059 {
8060  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8061  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8062 
8064  if (cmd)
8065  {
8067  }
8068 }
8069 
8071 {
8072  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8073  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8074 
8076  if (cmd)
8077  {
8079  }
8080 }
8081 
8083 {
8084  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8085  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
8086 
8087 
8089  dlg->Show(true);
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  wxWindow* main_window = NULL;
8115  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8116  if (wb_frame)
8117  main_window = wb_frame->GetMainWindow();
8118 
8120  if (cmd)
8121  {
8123  }
8124 }
8125 
8127 {
8128  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8129  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
8130 
8131 
8133  dlg->Show(true);
8134 }
8135 
8137 {
8138  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8139  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8140 
8142  if (cmd)
8143  {
8145  }
8146 }
8147 
8149 {
8150  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8151  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8152 
8154  if (cmd)
8155  {
8157  }
8158 }
8159 
8161 {
8162  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8163  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8164 
8166  if (cmd)
8167  {
8169  }
8170 }
8171 
8173 {
8174  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8175  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8176 
8178  if (cmd)
8179  {
8181  }
8182 }
8183 
8185 {
8186  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8187  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8188 
8190  if (cmd)
8191  {
8193  }
8194 }
8195 
8197 {
8198  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8199  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8200 
8202  if (cmd)
8203  {
8205  }
8206 }
8207 
8209 {
8210  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8211  if (!m_TopSeqEntry || !m_CmdProccessor) return;
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  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8240  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8241 
8242  wxWindow* main_window = NULL;
8243  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8244  if (wb_frame)
8245  main_window = wb_frame->GetMainWindow();
8246 
8248  if (cmd)
8249  {
8251  }
8252 }
8253 
8255 {
8256  wxWindow* main_window = NULL;
8257  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8258  if (wb_frame)
8259  main_window = wb_frame->GetMainWindow();
8260 
8262  dlg->Show(true);
8263 }
8264 
8266 {
8267  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8268  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8269 
8271  if (dlg.ShowModal() == wxID_OK) {
8273  if (cmd) {
8275  dlg.Report();
8276  }
8277  }
8278 }
8279 
8281 {
8283  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8284 
8285  bool enable = event.IsChecked();
8287  if (cmd) {
8289  }
8290 
8291  if (enable)
8292  {
8293  if (!TestHupIdEnabled())
8294  {
8295  wxMenuItem* menuitem = dynamic_cast<wxMenuItem*>(event.GetEventObject());
8296  if (menuitem) {
8297  menuitem->Check(false);
8298  }
8299  wxMessageBox(_("Loading HUP-ID failed, do you have permissions to access this server?"), wxT("Error"), wxOK, NULL);
8300  }
8301  }
8302 }
8303 
8304 static wxString IndexerTypeToName(int i)
8305 {
8306  switch(i)
8307  {
8308  case e_GenBankIndexer : return _("GenBank"); break;
8309  case e_RefSeqIndexer : return _("RefSeq"); break;
8310  default : break;
8311  }
8312  return wxEmptyString;
8313 }
8314 
8316 {
8317  wxWindow* main_window = NULL;
8318  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8319  if (wb_frame)
8320  main_window = wb_frame->GetMainWindow();
8321  wxArrayString choices;
8322  for (int i = 0; i < e_LastIndexer; i++)
8323  {
8324  choices.Add(IndexerTypeToName(i));
8325  }
8326  wxSingleChoiceDialog dlg(main_window, _("Select Indexer Type"), _("Indexer Type"), choices);
8328  int sel = gui_reg.GetReadView(kInternalIndexerRegistry)
8330  dlg.SetSelection(sel);
8331 
8332  if (dlg.ShowModal() == wxID_OK)
8333  {
8334  sel = dlg.GetSelection();
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 
8346 }
8347 
8349 {
8350  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8351  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8352 
8354  if (cmd) {
8356  }
8357 }
8358 
8360 {
8361  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8362  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8363 
8364  wxWindow* main_window = NULL;
8365  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8366  if (wb_frame)
8367  main_window = wb_frame->GetMainWindow();
8368 
8370  dlg.ShowModal();
8371 }
8372 
8374 {
8375  if (!m_Workbench) return;
8376  wxWindow* main_window = NULL;
8377  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8378  if (wb_frame)
8379  main_window = wb_frame->GetMainWindow();
8380  CFixForTransSplicing *dlg = new CFixForTransSplicing(main_window, m_Workbench);
8381  dlg->Show(true);
8382 }
8383 
8385 {
8386  x_SetUpTSEandUnDoManager(m_Workbench); // perhaps this is unnecessary here after IsObjectSelected has run
8387  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8388 
8390  if (cmd) {
8392  }
8393 }
8394 
8396 {
8397  CRef<CUser_object> params(new CUser_object());
8399  type->SetStr("TextViewParams");
8400  params->SetType(*type);
8401  CUser_object::TData& data = params->SetData();
8402  {
8403  CRef<CUser_field> param(new CUser_field());
8405  label->SetStr("TextViewType");
8406  param->SetLabel(*label);
8407  param->SetData().SetStr("Flat File");
8408  data.push_back(param);
8409  }
8410  {
8411  CRef<CUser_field> param(new CUser_field());
8413  label->SetStr("ExpandAll");
8414  param->SetLabel(*label);
8415  param->SetData().SetBool(true);
8416  data.push_back(param);
8417  }
8418  {
8419  CRef<CUser_field> param(new CUser_field());
8421  label->SetStr("TrackSelection");
8422  param->SetLabel(*label);
8423  param->SetData().SetBool(true);
8424  data.push_back(param);
8425  }
8426  return params;
8427 }
8428 
8429 static tuple<CRef<CGBProjectHandle>,CRef<CProjectItem> > LoadFileForSubmission(wxWindow* parent, CIRef<CProjectService> srv, CRef<CGBWorkspace> ws)
8430 {
8433 
8434  vector< CIRef<IFileFormatLoaderManager> > managers;
8435  GetExtensionAsInterface("file_format_loader_manager", managers);
8436 
8437  CRef<CFileLoadWizard> fileManager(new CFileLoadWizard());
8438  vector<string> format_ids(1,"file_loader_auto");
8439  format_ids.push_back("file_loader_fasta");
8440  format_ids.push_back("file_loader_asn");
8441  /* for (auto manager : managers)
8442  {
8443  format_ids.push_back(manager->GetFileLoaderId());
8444  }*/
8445  fileManager->LoadFormats(format_ids);
8446 
8447  vector<CIRef<IOpenObjectsPanelClient> > loadManagers;
8448  loadManagers.push_back(CIRef<IOpenObjectsPanelClient>(fileManager.GetPointer()));
8449  COpenObjectsDlg dlg(parent);
8450  dlg.SetSize(710, 480);
8451  dlg.SetRegistryPath("Dialogs.Edit.OpenSubmissionFile");
8452  dlg.SetManagers(loadManagers);
8453  if (dlg.ShowModal() == wxID_OK)
8454  {
8455  CIRef<IObjectLoader> object_loader(dlg.GetObjectLoader());
8456  if (!object_loader)
8457  return make_tuple(ph,pi);
8458  IExecuteUnit* execute_unit = dynamic_cast<IExecuteUnit*>(object_loader.GetPointer());
8459  if (!execute_unit || !execute_unit->PreExecute() || !GUI_AsyncExecUnit(*execute_unit, wxT("Reading file(s)...")) || !execute_unit->PostExecute())
8460  return make_tuple(ph,pi);
8461 
8462  auto& objects = object_loader->GetObjects();
8463  const CBioseq* bseq = nullptr;
8464  for (auto& it : objects) {
8465  const CObject& ptr = it.GetObject();
8466  if (bseq = dynamic_cast<const CBioseq*>(&ptr)) {
8467  break;
8468  }
8469  else if (const CSeq_entry* entry = dynamic_cast<const CSeq_entry*>(&ptr)) {
8470  if (entry && entry->IsSeq()) {
8471  LOG_POST(Info << MSerial_AsnText << entry->GetSeq());
8472  bseq = &(entry->GetSeq());
8473  break;
8474  }
8475  }
8476  else if (const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>(&ptr)) {
8477  bseq = nullptr;
8478  break;
8479  }
8480  }
8481 
8482  if (bseq && bseq->IsAa()) {
8483  wxMessageBox(wxT("The file contains one protein sequence. Please import a nucleotide sequence file"), wxT("Error"),
8484  wxOK | wxICON_ERROR);
8485  return make_tuple(ph, pi);
8486  }
8487 
8488  CSelectProjectOptions options;
8490  CObjectLoadingTask::AddObjects(srv->GetServiceLocator(), object_loader->GetObjects(), dynamic_cast<CLoaderDescriptor*>(object_loader->GetLoader()), options);
8491  wxDateTime start = wxDateTime::Now();
8492  wxDateTime now = start;
8493  while ((!ph || !pi) && (now - start).GetSeconds() < 60)
8494  {
8495  for (auto project_handle : ws->GetWorkspace().GetProjects())
8496  {
8497  if (project_handle->GetProject().GetData().IsSetItems())
8498  {
8499  for (auto item : project_handle->GetProject().GetData().GetItems())
8500  {
8501  if (item->IsSetLabel() && item->IsSetItem() && (item->GetItem().IsSubmit() || item->GetItem().IsEntry()))
8502  {
8503  ph = project_handle;
8504  pi = item;
8505  break;
8506 
8507  }
8508  }
8509  }
8510  }
8511  if (wxTheApp && wxTheApp->GetMainLoop())
8512  {
8513  if (!wxTheApp->GetMainLoop()->IsYielding())
8514  wxTheApp->Yield(true);
8515  wxTheApp->ProcessPendingEvents();
8516  }
8517  wxMilliSleep(100);
8518  now = wxDateTime::Now();
8519  }
8520  }
8521  return make_tuple(ph,pi);
8522 }
8523 
8525 {
8526  if (!m_TopSeqEntry || !m_CmdProccessor)
8527  return pi;
8528  if (m_SeqSubmit)
8529  return pi;
8530 
8531  vector<CIRef<IProjectView>> views;
8532  srv->FindViews(views, *pi->GetObject());
8533  for (auto& it : views)
8534  {
8535  srv->RemoveProjectView(*it);
8536  }
8537 
8538  CRef<CSubmit_block> submitBlock(new CSubmit_block);
8541  string version_str = "Genome Workbench ";
8542  version_str += NStr::IntToString(version.GetVer_major());
8543  version_str += ".";
8544  version_str += NStr::IntToString(version.GetVer_minor());
8545  version_str += ".";
8546  version_str += NStr::IntToString(version.GetVer_patch());
8547  version_str += " " + wxGetOsDescription().ToStdString();
8548  submitBlock->SetTool(version_str);
8549 
8550  submitBlock->SetContact().SetContact().SetName().SetName().SetLast("?");
8551  bool found_sub = false;
8553  for (CSeqdesc_CI desc_ci(*entry_it, CSeqdesc::e_Pub, 1); desc_ci; ++desc_ci)
8554  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())
8555  {
8556  submitBlock->SetCit().Assign(desc_ci->GetPub().GetPub().Get().front()->GetSub());
8557  found_sub = true;
8558  break;
8559  }
8560 
8561  if (!found_sub)
8562  {
8563  CRef< CAuthor > author(new CAuthor);
8564  author->SetName().SetName().SetLast("?");
8565  submitBlock->SetCit().SetAuthors().SetNames().SetStd().push_back(author);
8566  }
8567  if (!submitBlock->GetCit().IsSetDate()) {
8568  CRef<CDate> today(new CDate);
8570  submitBlock->SetCit().SetDate(*today);
8571  }
8572 
8575  copy->Assign(*entry);
8576 
8577  CRef<CSeq_submit> submission(new CSeq_submit);
8578  submission->SetSub(submitBlock.GetNCObject());
8579  submission->SetData().SetEntrys().push_back(copy);
8580 
8581  CGBDocument* doc = dynamic_cast<CGBDocument*>(ph.GetPointer());
8582 
8583  CRef<CProjectItem> new_item(new CProjectItem);
8584  new_item->SetDescr().assign(pi->GetDescr().begin(), pi->GetDescr().end());
8585  new_item->SetItem().SetSubmit(*submission);
8586 
8587  if (pi->IsSetLabel())
8588  new_item->SetLabel(pi->GetLabel());
8589  else
8590  {
8591  string label;
8593  new_item->SetLabel(label);
8594  }
8595 
8597  pi = new_item;
8598  m_CmdProccessor->Execute(chg);
8599  CScope* scope = ph->GetScope();
8601  m_SeqSubmit.Reset(&pi->GetItem().GetSubmit());
8602  return pi;
8603 }
8604 
8606 {
8607  CRef<CCmdComposite> cmd(new CCmdComposite("Change na to genomic dna"));
8608  for (CBioseq_CI b_iter(m_TopSeqEntry, CSeq_inst::eMol_na); b_iter; ++b_iter)
8609  {
8610  CConstRef<CBioseq> bioseq = b_iter->GetCompleteBioseq();
8611  if (!bioseq || !bioseq->IsSetInst() || !bioseq->GetInst().IsSetMol() || bioseq->GetInst().GetMol() != CSeq_inst::eMol_na)
8612  continue;
8613 
8614  CRef<CBioseq> new_bioseq (new CBioseq());
8615  new_bioseq->Assign (*bioseq);
8616  new_bioseq->SetInst().SetMol(CSeq_inst::eMol_dna);
8617  CIRef<IEditCommand> chgInst(new CCmdChangeBioseqInst(*b_iter, new_bioseq->GetInst()));
8618  cmd->AddCommand(*chgInst);
8619 
8620  CSeqdesc_CI di(*b_iter, CSeqdesc::e_Molinfo, 1);
8621  if (di)
8622  {
8623  const CSeqdesc& seqdesc = *di;
8624  CRef<CSeqdesc> edited_seqdesc(new CSeqdesc);
8625  edited_seqdesc->Assign(seqdesc);
8626  edited_seqdesc->SetMolinfo().SetBiomol(CMolInfo::eBiomol_genomic);
8627  CRef<CCmdChangeSeqdesc> chgd_cmd(new CCmdChangeSeqdesc(di.GetSeq_entry_Handle(), seqdesc, *edited_seqdesc));
8628  cmd->AddCommand(*chgd_cmd);
8629  }
8630  else
8631  {
8632  CRef<CSeqdesc> edited_seqdesc(new CSeqdesc);
8633  edited_seqdesc->SetMolinfo().SetBiomol(CMolInfo::eBiomol_genomic);
8634  CRef<CCmdCreateDesc> subcmd(new CCmdCreateDesc(b_iter->GetSeq_entry_Handle(), *edited_seqdesc));
8635  cmd->AddCommand(*subcmd);
8636  }
8637  }
8638 
8640 }
8641 
8643 {
8644  if (m_TopSeqEntry.IsSet()) {
8646  auto old_set = bh.GetCompleteBioseq_set();
8647  if (!old_set->IsSetClass() ||
8648  (old_set->IsSetClass() && old_set->GetClass() == CBioseq_set::eClass_not_set)) {
8649  CRef<CBioseq_set> new_set(new CBioseq_set());
8650  new_set->Assign(*old_set);
8654  }
8655  else if (old_set->IsSetClass() && old_set->GetClass() == CBioseq_set::eClass_nuc_prot) {
8658  copy->Assign(*entry);
8659 
8660  CRef<CSeq_entry> outside_set(new CSeq_entry);
8662  outside_set->SetSet().SetSeq_set().push_back(copy);
8663 
8664  CScope new_scope(*CObjectManager::GetInstance());
8665  new_scope.AddDefaults();
8666  CSeq_entry_Handle tmp_topseh = new_scope.AddTopLevelSeqEntry(*outside_set);
8667  CRef<CCmdChangeSeqEntry> wrap_cmd(new CCmdChangeSeqEntry(m_TopSeqEntry, outside_set));
8668  m_CmdProccessor->Execute(wrap_cmd);
8669  }
8670  }
8671  else if (m_TopSeqEntry.IsSeq()) {
8674  copy->Assign(*entry);
8675 
8676  CScope new_scope(*CObjectManager::GetInstance());
8677  new_scope.AddDefaults();
8678  CSeq_entry_Handle tmp_topseh = new_scope.AddTopLevelSeqEntry(*copy);
8679 
8680  // wrap single sequence in genbank set
8681  CSeq_entry_EditHandle eh(tmp_topseh);
8684  m_CmdProccessor->Execute(wrap_cmd);
8685  }
8686 }
8687 
8688 class CDoOnIdleTask : public CAppTask
8689 {
8690 public:
8691  CDoOnIdleTask(std::function<void()> f) : m_f(f) {}
8692 protected:
8693  std::function<void()> m_f;
8695  {
8696  m_f();
8697  return eCompleted;
8698  }
8699 };
8700 
8702 {
8704  if (!srv) return;
8705  CRef<CGBWorkspace> ws = srv->GetGBWorkspace();
8706  if (!ws || !ws->IsSetWorkspace() || !ws->GetWorkspace().IsSetProjects()) return;
8707 
8708  wxWindow* main_window = nullptr;
8709  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8710  if (wb_frame)
8711  main_window = wb_frame->GetMainWindow();
8712 
8713  vector<pair<CRef<CGBProjectHandle>, CRef<CProjectItem> > > projects;
8716  wxArrayString choices;
8717  bool non_editable = false;
8718  for (auto project_handle : ws->GetWorkspace().GetProjects())
8719  {
8720  if (project_handle->GetProject().GetData().IsSetItems())
8721  {
8722  for (auto item : project_handle->GetProject().GetData().GetItems())
8723  {
8724  if (item->IsSetLabel())
8725  {
8726  if (item->IsSetItem() && (item->GetItem().IsSubmit() || item->GetItem().IsEntry()))
8727  {
8728  projects.push_back(make_pair(project_handle, item));
8729  choices.Add(wxString(item->GetLabel()));
8730  }
8731  else
8732  non_editable = true;
8733  }
8734  }
8735  }
8736  }
8737  if (non_editable)
8738  {
8739  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);
8740  }
8741  if (projects.empty())
8742  {
8743  tie(ph,pi) = LoadFileForSubmission(main_window, srv, ws);
8744  }
8745  else if (projects.size() == 1)
8746  {
8747  tie(ph,pi) = projects[0];
8748  }
8749  else
8750  {
8751  wxSingleChoiceDialog dlg(main_window, _("Select the project for the submission"), _("Multiple projects found"), choices);
8752  if (dlg.ShowModal() == wxID_OK)
8753  {
8754  int sel = dlg.GetSelection();
8755  if (sel != wxNOT_FOUND)
8756  {
8757  tie(ph,pi) = projects[sel];
8758  }
8759  }
8760  }
8761  if (!ph || !pi)
8762  return;
8763 
8764  CGBDocument* doc = dynamic_cast<CGBDocument*>(ph.GetPointer());
8765  if (doc)
8766  {
8767  m_CmdProccessor = &doc->GetUndoManager();
8768  m_WorkDir = doc->GetWorkDir();
8769  }
8770 
8771  if (!m_CmdProccessor) return;
8772 
8773  m_SeqSubmit.Reset();
8774  m_TopSeqEntry.Reset();
8775  if (pi->IsSetItem() && pi->GetItem().IsSubmit())
8776  m_SeqSubmit.Reset(&pi->GetItem().GetSubmit());
8777 
8778 
8779  CScope* scope = ph->GetScope();
8780  if (m_SeqSubmit)
8781  {
8783  {
8784  for (auto entry : m_SeqSubmit->GetData().GetEntrys())
8785  {
8786  if (entry)
8787  {
8788  CSeq_entry_Handle seh = scope->GetSeq_entryHandle(*entry);
8789  if (seh)
8790  {
8792  break;
8793  }
8794  }
8795  }
8796  }
8797  }
8798  else if (pi->IsSetItem() && pi->GetItem().IsEntry())
8799  {
8800  CSeq_entry_Handle seh = scope->GetSeq_entryHandle(pi->GetItem().GetEntry(), CScope::eMissing_Null);
8801  if (seh)
8803  }
8804 
8805  if (!m_TopSeqEntry) return;
8806 
8807  if (!m_SeqSubmit)
8808  pi = CreateSeqSubmit(ph, pi, srv);
8809 
8812  try {
8814  if (taxlookup_cmd)
8815  m_CmdProccessor->Execute(taxlookup_cmd);
8816  }
8817  catch (const CException& e) {
8818  LOG_POST(Error << "Taxonomy lookup failed before opening the Submission Wizard: " << e.GetMsg());
8819  }
8820 
8822  if (m_SeqSubmit)
8824  else
8826  IProjectView* old_view = srv->FindView(*(objects.front().object), "Text View");
8827  if (!old_view)
8828  old_view = srv->AddProjectView("Text View", objects, GetParams());
8829 
8830 
8831 
8833  CDoOnIdleTask* task = new CDoOnIdleTask([=](){CSubmissionWizard::GetInstance(main_window, m_Workbench, ph, pi);});
8834  taskService->AddTask(*task);
8835 }
8836 
8838 {
8840  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8841 
8842  wxWindow* main_window = NULL;
8843  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8844  if (wb_frame)
8845  main_window = wb_frame->GetMainWindow();
8846 
8848  if (m_SeqSubmit)
8849  {
8850  so = m_SeqSubmit;
8851  }
8852  else
8853  {
8854 
8855  int answer = wxMessageBox (_("You need to use the 'Genome Submission Wizard' to add contact information before submitting to GenBank - save incomplete file?"),
8856  _("Save Incomplete File"), wxYES_NO | wxICON_QUESTION);
8857  if (answer == wxYES)
8858  {
8860  }
8861  else
8862  {
8863  PrepareSeqSubmit(event);
8864  return;
8865  }
8866  }
8867 
8868  if (!so)
8869  return;
8870 
8871  wxFileDialog asn_save_file(main_window, wxT("Save Submission File"), m_WorkDir, wxEmptyString,
8874  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
8875 
8876 
8877  if (asn_save_file.ShowModal() == wxID_OK) {
8878  wxString path = asn_save_file.GetPath();
8879  if (!path.IsEmpty()) {
8880  bool saved = false;
8881  try {
8882  ios::openmode mode = ios::out;
8883  CNcbiOfstream os(path.fn_str(), mode);
8884  os << MSerial_AsnText;
8885  os << *so;
8886  saved = true;
8887  }
8888  catch (const CException& e) {
8889  LOG_POST(Error << "Failed to save submission file: " << e.GetMsg());
8890  }
8891  catch (const exception& e) {
8892  LOG_POST(Error << "Failed to save submission file: " << e.what());
8893  }
8894 
8895  if (!saved) {
8896  NcbiErrorBox("Submission file cannot be saved");
8897  CFile fh(ToStdString(path));
8898  if (fh.Exists() && fh.IsFile()) {
8900  }
8901  }
8902  }
8903  }
8904 }
8905 
8907 {
8909  if (!m_TopSeqEntry || !m_CmdProccessor) return;
8910 
8911  wxWindow* main_window = NULL;
8912  CWorkbench* wb_frame = dynamic_cast<CWorkbench*>(m_Workbench);
8913  if (wb_frame)
8914  main_window = wb_frame->GetMainWindow();
8915 
8917  if (m_SeqSubmit)
8918  {
8919  so = m_SeqSubmit;
8920  }
8921  if (!so)
8922  return;
8923 
8924  wxFileDialog asn_save_file(main_window, wxT("Save ASN.1 File"), m_WorkDir, wxEmptyString,
8927  wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
8928 
8929  if (asn_save_file.ShowModal() == wxID_OK)
8930  {
8931  wxString path = asn_save_file.GetPath();
8932  if( !path.IsEmpty())
8933  {
8934  ios::openmode mode = ios::out;
8935  CNcbiOfstream os(path.fn_str(), mode);
8936  os << MSerial_AsnText;
8937  os << *so;
8938  }
8939  }
8940 
8941 }
8942 
8943 
8945 {
8947  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
8948 
8949  string prefix;
8950  switch (event.GetId()){
8952  prefix.assign("MIENS-Data");
8953  break;
8955  prefix.assign("MIMARKS:5.0-Data");
8956  break;
8958  prefix.assign("MIGS:5.0-Data");
8959  break;
8961  prefix.assign("MIMS:5.0-Data");
8962  break;
8964  prefix.assign("Genome-Assembly-Data");
8965  break;
8967  prefix.assign("Genome-Annotation-Data");
8968  break;
8969  default : break;
8970  }
8971 
8972  if (prefix.empty())
8973  return;
8974 
8975  CRef<CSeqdesc> seqdesc(new CSeqdesc());
8976  seqdesc->SetUser().Assign(*edit::CStructuredCommentField::MakeUserObject(prefix));
8977 
8979  vector<CRef<CSeq_loc> > &orig_locs = x_GetSelectedLocations();
8980  if (!orig_locs.empty())
8981  {
8982  CBioseq_Handle bsh = m_TopSeqEntry.GetScope().GetBioseqHandle(*orig_locs.front());
8983  seh = bsh.GetSeq_entry_Handle();
8984  }
8985 
8986  CIRef<IEditObject> editor(new CEditObjectSeq_desc(*seqdesc, seh, m_TopSeqEntry.GetScope(), true));
8987  CEditObjViewDlg* edit_dlg = new CEditObjViewDlg(NULL, true);
8988  edit_dlg->SetUndoManager(m_CmdProccessor);
8989  wxWindow* editorWindow = editor->CreateWindow(edit_dlg);
8990  edit_dlg->SetEditorWindow(editorWindow);
8991  edit_dlg->SetEditor(editor);
8992  edit_dlg->SetWorkDir(m_WorkDir);
8993  edit_dlg->Show(true);
8994 }
8995 
8996 
8998 {
9000  if (!m_TopSeqEntry || ! m_CmdProccessor) return;
9001 
9002  string prefix;
9003  switch (event.GetId()){
9005  prefix.assign("MIENS");
9006  break;
9008  prefix.assign("MIMARKS");
9009  break;
9011  prefix.assign("MIGS");
9012  break;
9014  prefix.assign("MIMS");
9015  break;
9017  prefix.assign("Genome-Assembly");
9018  break;
9020  prefix.assign("Genome-Annotation");
9021  break;
9022  default : break;
9023  }
9024 
9025  if (prefix.empty())
9026  return;
9027 
9028  bool found(false);
9029  CRef<CCmdComposite> cmd(new CCmdComposite("Remove Structured Comment"));
9031  {
9032  for ( CSeqdesc_CI user_it(*entry_it, CSeqdesc::e_User, 1); user_it; ++user_it)
9033  {
9034  const CUser_object& u = user_it->GetUser();
9035  if (u.IsSetType() && u.GetType().IsStr() && NStr::EqualNocase(u.GetType().GetStr(), "StructuredComment"))
9036  {
9037  try
9038  {
9039  const CUser_field& prefix_field = user_it->GetUser().GetField("StructuredCommentPrefix");
9040  if (prefix_field.IsSetData() && prefix_field.GetData().IsStr()
9041  && NStr::StartsWith(prefix_field.GetData().GetStr(), "##" + prefix, NStr::eNocase)
9042  && NStr::EndsWith(prefix_field.GetData().GetStr(), "-Data-START##", NStr::eNocase))
9043  {
9044  CIRef<IEditCommand> cmdDelDesc(new CCmdDelDesc(user_it.GetSeq_entry_Handle(), *user_it));
9045  cmd->AddCommand(*cmdDelDesc);
9046  found = true;
9047  }
9048  }
9049  catch (const exception&) { }
9050  }
9051  }
9052  }
9053  if (found)
9055 }
9056 
9057 void CSequenceEditingEventHandler::Help(wxCommandEvent& event)
9058 {
9059  wxString manual_name;
9060  switch (event.GetId()) {
9061  case eCmdHelpReports_ext:
9062  manual_name = wxT("manual8");
9063  break;
9064  case eCmdHelpImport_ext:
9065  manual_name = wxT("manual11");
9066  break;
9067  case eCmdHelpSequences_ext:
9068  manual_name = wxT("manual9");
9069  break;
9070  case eCmdHelpFeatures_ext:
9071  manual_name = wxT("manual10");
9072  break;
9073  case eCmdHelpComments_ext:
9074  manual_name = wxT("manual12");
9075  break;
9077  manual_name = wxT("manual15");
9078  break;
9079  default:
9080  break;
9081  }
9082 
9083  wxURI help_url(wxT("https://www.ncbi.nlm.nih.gov/tools/gbench/") + manual_name + wxT("/"));
9084  wxString help_encoded_url = help_url.BuildURI();
9085  wxLaunchDefaultBrowser(help_encoded_url, 0);
9086 }
9087 
9089 {
9091  if (!m_TopSeqEntry || !m_CmdProccessor) return;
9092 
9094  dlg->Show(true);
9095 }
9096 
9098 
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:557
@ 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:1605
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_Ex(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 AddKeywordTPA_specialistdb(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:2353
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
static FILE * f
Definition: readconf.c:23
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:3941
virtual bool Exists(void) const
Check existence of file.
Definition: ncbifile.hpp:4039
@ eIfExists_ReturnCurrent
Return reference to current stream, create new one if it does not exists yet.
Definition: ncbifile.hpp:2384
@ eNoRemove
Do not remove file.
Definition: ncbifile.hpp:2358
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:2596
static bool IsVDBAccession(const string &acc)
Check if string starts with ("SRA", "SRR", "DRR", "ERR")
Definition: utils.cpp:888
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
@ fCompare_Default
Definition: Seq_loc.hpp:245
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:5424
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5078
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
Definition: ncbistr.hpp:2699
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:5406
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:5347
@ eNocase
Case insensitive compare.
Definition: ncbistr.hpp:1206
CTime CurrentTime(CTime::ETimeZone tz=CTime::eLocal, CTime::ETimeZonePrecision tzp=CTime::eTZPrecisionDefault)
Definition: ncbitime.hpp:2184
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.
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
const string version
version string
Definition: variables.hpp:66
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
static int filenames
Definition: pcre2grep.c:247
#define count
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
@ eCmdAddKeywordTPA_specialistdb
@ 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
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static SLJIT_INLINE sljit_ins or(sljit_gpr dst, sljit_gpr src)
#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)
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 Fri Sep 20 14:57:50 2024 by modify_doxy.py rev. 669887