ccpn.AnalysisMetabolomics.ui.gui.modules package¶
Submodules¶
ccpn.AnalysisMetabolomics.ui.gui.modules.MetaboliteFinder module¶
- class ccpn.AnalysisMetabolomics.ui.gui.modules.MetaboliteFinder.MetaboliteFinderModule(mainWindow, name='BMRB Metabolite Finder', **kwds)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
- className = 'MetaboliteFinderModule'¶
- includeSettingsWidget = False¶
- maxSettingsState = 2¶
- settingsPosition = 'top'¶
ccpn.AnalysisMetabolomics.ui.gui.modules.PcaModule module¶
Module Documentation here
Warning: this module can be overloaded with too many operations and plots hierarchies from PyQtGraph. Could be beneficial to split in more classes or custom subclasses.
- class ccpn.AnalysisMetabolomics.ui.gui.modules.PcaModule.Decomposition(project)[source]¶
Bases:
object
Base class for the Decomposition Module (the old “interactor”!)
- buildSourceData(sources, includedRegion=None)[source]¶
Sets the __data with a dataframe: each row is a spectrum. Column 1 is the pid, all other columns are spectrum intensities.
- Parameters
sources – list of pids
xRange – the region of interest in the spectrum
- Returns
the sources back
- buildSourceFromSpectra(spectra, xRange=None)[source]¶
Sets the __data with a dataframe: each row is a spectrum. Column 1 is the pid, all other columns are spectrum intensities. :param spectra: list of spectra :param xRange: the region of interest in the spectrum :return: the sources back
- property centering¶
- None, mutable -
- createSpectrumGroupFromScores(spectra, prefix='PCA_output')[source]¶
- Parameters
outlinersDataFrame –
- Returns
a spectrumGroup with the spectra which had outliners values
- decompose(data=None)[source]¶
data: dataframe with index: obj, xs as columns, ys as rows get the data, init the pca model and then plot the results
- property includedRegion¶
- None, mutable - Region of intestest for calculating the PCA
- property loadings¶
- None, immutable - loadings as a pandas dataframe
- property normalization¶
- None, mutable -
- property scaling¶
- None, mutable -
- property scores¶
- None, immutable - scores as a pandas dataframe
- property sources¶
- None, mutable - list of pids
- static splitDataWithinRange(scores, xLabel, yLabel, minX, maxX, minY, maxY)[source]¶
- Parameters
scores – dataframe with all scores
xLabel – label1 , eg PC1
yLabel – label1 , eg PC2
minX – min value for Y
maxX – Max value for X
minY – min value for Y
maxY – max value for Y
- Returns
inners dataframe like scores but containing only the values within the ranges and outers (rest) not included in inners
- property variance¶
- None, immutable - Variance as a pandas dataframe
- class ccpn.AnalysisMetabolomics.ui.gui.modules.PcaModule.PcaModule(mainWindow, **kwargs)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
- className = 'DecompositionModule'¶
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- mouseMoved(event)[source]¶
use this if you need for example display the mouse coords on display :param event: :return:
- plotPCAscatterResults(dataFrame, xAxisLabel='PC1', yAxisLabel='PC2', selectedObjs=None)[source]¶
- Parameters
dataFrame – in the format from the PCA Class index: Pid –> obj Columns: PCx x= 1 to the end. Eg. PC1, PC2, etc values: floats
- Returns
transform the dataFrame in the (pyqtGraph) plottable data format and plot it on the scatterPlot
- settingsPosition = 'left'¶