Source code for ccpn.AnalysisMetabolomics.AnalysisMetabolomics

__author__ = 'TJ'

from ccpn.framework.Framework import Framework


[docs]class Metabolomics(Framework): """Root class for Metabolomics application""" def __init__(self, applicationName, applicationVersion, commandLineArguments): Framework.__init__(self, applicationName, applicationVersion, commandLineArguments)
[docs] def setupMenus( self ): super().setupMenus( ) menuSpec = ('Metabolomics', [("Decomposition (PCA)", self.showDecompositionModule), ("Pipeline", self.showPipeline,) ]) self.addApplicationMenuSpec(menuSpec)
[docs] def showDecompositionModule(self): from ccpn.AnalysisMetabolomics.Decomposition import Decomposition from ccpn.AnalysisMetabolomics.ui.gui.modules.DecompositionModule import DecompositionModule self.decomposition = Decomposition(application=self) self.ui.decompositionModule = DecompositionModule(application=self, interactor=self.decomposition, parent=self.ui) self.decomposition.presenter = self.ui.decompositionModule self.ui.mainWindow.moduleArea.addModule(self.ui.decompositionModule.widget, position='bottom')
[docs] def showPipeline(self, position='bottom', relativeTo=None): from ccpn.AnalysisMetabolomics.MetabolomicsPipeline import MetabolomicsModule pipelineModule = MetabolomicsModule(self.ui.mainWindow, project=self.project) self.ui.mainWindow.moduleArea.addModule(pipelineModule, position=position) self.pythonConsole.writeConsoleCommand("application.showMetabolomicsPipeline()") self.project._logger.info("application.showMetabolomicsPipeline()")