Source code for ccpn.AnalysisMetabolomics.AnalysisMetabolomics

#=========================================================================================
# Licence, Reference and Credits
#=========================================================================================
__copyright__ = "Copyright (C) CCPN project (http://www.ccpn.ac.uk) 2014 - 2022"
__credits__ = ("Ed Brooksbank, Joanna Fox, Victoria A Higman, Luca Mureddu, Eliza Płoskoń",
               "Timothy J Ragan, Brian O Smith, Gary S Thompson & Geerten W Vuister")
__licence__ = ("CCPN licence. See http://www.ccpn.ac.uk/v3-software/downloads/license")
__reference__ = ("Skinner, S.P., Fogh, R.H., Boucher, W., Ragan, T.J., Mureddu, L.G., & Vuister, G.W.",
                 "CcpNmr AnalysisAssign: a flexible platform for integrated NMR analysis",
                 "J.Biomol.Nmr (2016), 66, 111-124, http://doi.org/10.1007/s10858-016-0060-y")
#=========================================================================================
# Last code modification
#=========================================================================================
__modifiedBy__ = "$modifiedBy: Geerten Vuister $"
__dateModified__ = "$dateModified: 2022-02-02 10:17:25 +0000 (Wed, February 02, 2022) $"
__version__ = "$Revision: 3.0.4 $"
#=========================================================================================
# Created
#=========================================================================================
__author__ = "$Author: TJ Ragan $"
__date__ = "$Date: 2017-04-07 10:28:45 +0000 (Fri, April 07, 2017) $"
#=========================================================================================
# Start of code
#=========================================================================================

from ccpn.framework.Version import applicationVersion
from ccpn.framework.Application import ANALYSIS_METABOLOMICS
from ccpn.AnalysisAssign.AnalysisAssign import Assign
from ccpn.util.decorators import logCommand


[docs]class Metabolomics(Assign): """Root class for Metabolomics application """ applicationName = ANALYSIS_METABOLOMICS applicationVersion = applicationVersion # def __init__(self, commandLineArguments): # Assign.__init__(self, commandLineArguments) def _setupMenus(self): super()._setupMenus() menuSpec = ('Metabolomics', [("Decomposition (PCA)", self.showDecompositionModule), [('shortcut', 'de')], (), ("Pipeline", self.showMetabolomicsPipeline,), ]) self._addApplicationMenuSpec(menuSpec)
[docs] @logCommand('application.') def showMetabolomicsPipeline(self, position='bottom', relativeTo=None): """Display the Metabolomics Pipeline module """ from ccpn.ui.gui.modules.PipelineModule import GuiPipeline pipes = None mainWindow = self.ui.mainWindow guiPipeline = GuiPipeline(mainWindow=mainWindow, pipes=pipes) mainWindow.moduleArea.addModule(guiPipeline, position='bottom')
[docs] @logCommand('application.') def showDecompositionModule(self): """Opens the PCA module. if you need to get the PCA module or the Decomposition base class: get the specific instance from the current ccpnModules. This allows to have multiple PCA modules at the same time """ from ccpn.AnalysisMetabolomics.ui.gui.modules.PcaModule import PcaModule pcaModule = PcaModule(mainWindow=self.ui.mainWindow) self.ui.mainWindow.moduleArea.addModule(pcaModule, position='bottom')