phosphomatics module
- exception phosphomatics.InvalidKey
Bases:
Exception
- exception phosphomatics.NoDataSetTokenError
Bases:
Exception
- exception phosphomatics.NoPhosphomaticsKey
Bases:
Exception
- class phosphomatics.Phosphomatics(key=None)
Bases:
object
Phosphomatics experiment session.
- Parameters
key (str) – Phosphomatics API key. Contact the developers to obtain a key.
- doKSEAAnslysis(group1=None, group2=None, networkin=None, networkinThreshold=None, mThreshold=None, pThreshold=None, container=None)
- getActiveDataGroup()
Get the currently active data group
- Returns
Dict containing group information for selected data group.
- Dict has keys
id (int) - anidentifier for this individual data group
name (str) - data group name
selected (str) - ‘true’ if the data group is currently active, ‘false’ if not
- Raises
NoDataSetTokenError – Raised if method called before a valid datasetToken is obtained or set.
- getDataSetToken()
Get the datasetToken for the current analysis.
- Returns
DatasetToken for the current analysis
- getEnrichmentForProteinList(container=None)
- getLDA(pval=0.5, pvalType='raw', fc=0.5, transformation=None)
Returns linear discriminant analysis for data in selected data group.
- Parameters
pval (float) – p-value used to filter phosphorylation sites prior to analysis. Setting the p-value to 0 will allow all phosphorylation sites to pass. Default = 0.5.
pvalType (str) – Either ‘raw’ for raw p-values or ‘BH’ for Benjamini-Hochberg adjusted p-values. Default = ‘raw’.
fc (float) – fold-change used to filter phosphorylation sites prior to analysis. Setting this to 0 will allow all phosphorylation sites to pass. In the case of a >2 group analysis, this corresponds to the ANOVA F-value. Default = 0.5.
transformation (str) – Specifies if data should be z-transformed prior to analysis. Either ‘Z-Transform’ to conduct transformation or any other value for untransformed data.
- Returns
Dict containing LDA data.
- Dict has keys
data - list of dicts with x,y coordinates of samples on LD1 and LD2 axes. Dicts have keys ‘x’, ‘y’, ‘label’, ‘group’.
xLabel - LD axis of x co-ordinates and percentage of explained variation.
yLabel - LD axis of y co-ordinates and percentage of explained variation.
- Raises
NoDataSetTokenError – Raised if method called before a valid datasetToken is obtained or set.
- getPCA(pval=0.5, pvalType='raw', fc=0.5, transformation=None)
Returns Principal Component Analysis for data in selected data group.
- Parameters
pval (float) – p-value used to filter phosphorylation sites prior to analysis. Setting the p-value to 0 will allow all phosphorylation sites to pass. Default = 0.5.
pvalType (str) – Either ‘raw’ for raw p-values or ‘BH’ for Benjamini-Hochberg adjusted p-values. Default = ‘raw’.
fc (float) – fold-change used to filter phosphorylation sites prior to analysis. Setting this to 0 will allow all phosphorylation sites to pass. In the case of a >2 group analysis, this corresponds to the ANOVA F-value. Default = 0.5.
transformation (str) – Specifies if data should be z-transformed prior to analysis. Either ‘Z-Transform’ to conduct transformation or any other value for untransformed data.
- Returns
Dict containing PCA data.
- Dict has keys
data - list of dicts with x,y coordinates of samples on PC1 and PC2 axes. Dicts have keys ‘x’, ‘y’, ‘label’, ‘group’.
xLabel - PC axis of x co-ordinates and percentage of explained variation.
yLabel - PC axis of y co-ordinates and percentage of explained variation.
- Raises
NoDataSetTokenError – Raised if method called before a valid datasetToken is obtained or set.
- getQuantitationPlotForSelectedKinase(specificity=None, kinaseUPID=None, plotType=None, container=None)
- getSequenceAnslysis(displayType=None, palette=None, showN=None, container=None)
- getUserDataGroups()
Get all data groups that have been created.
- Returns
List of dicts containing group information.
- Dicts have keys
id (int) - anidentifier for this individual data group
name (str) - data group name
selected (str) - ‘true’ if the data group is currently active, ‘false’ if not
- Raises
NoDataSetTokenError – Raised if method called before a valid datasetToken is obtained or set.
- makeClusterMap(fc=None, pval=None, pvalType=None, numClusters=None, transformation=None, metric=None, method=None, container=None, targetClusters=None)
- makeCorrelationMatrix(method=None, transform=None, container=None)
- makeDistributionPlot(sample=None)
- makeFeatureAbundancePlot(substrateUPID=None, position=None, residue=None, plotType=None, container=None)
- makeKinaseClusterMap(numClusters=None, transformation=None, palette=None, metric=None, method=None, specificity=None, container=None, targetClusters=None)
- makeKinaseSCurve(group1=None, group2=None, specificity=None, container=None)
- makeKinaseVolcanoPlot(fc=None, pval=None, pvalType=None, group1=None, group2=None, container=None, specificity=None)
- makePhosphorylationNetworks(group1=None, group2=None, specificity=None, container=None)
- makeQuantilePlot(container=None, sample=None)
- makeSCurve(group1=None, group2=None, container=None)
- makeSubstrateCorrelationPlot(substrateUPID=None, position=None, residue=None, topN=None, method=None, plotType=None, container=None)
- makeVolcano(fc=None, pval=None, pvalType=None, group1=None, group2=None, container=None)
- process()
Run initial data processing through phosphomatics. Must be called after uploading Experimental data and processing parameter files.
- Raises
NoDataSetTokenError – Raised if method called before a valid datasetToken is obtained or set.
- setDataSetToken(datasetToken)
Sets the datasetToken for a prior phosphomatics analysis.
- Parameters
datasetToken (str) – An existing phosphomaitcs datasetToken
- setSelectedGroup(id=None)
Change the currently active data group.
- Parameters
id (int) – Integer id of data group to be selected.
- Raises
NoDataSetTokenError – Raised if method called before a valid datasetToken is obtained or set.
- startNewExperiment()
Prepare a new experiment on the phosphomatics server and obtain a valid datasetToken.
- Returns
DatasetToken for the current analysis
- Raises
Exception – Error generating datasetToken.
- uploadExperimentalData(file)
Upload phosphorylation site and quantitation data. Data file must be in a phosphomatics-compatible format. See here for details.
- Parameters
file (str) – Path to experimental data file.
- Raises
NoDataSetTokenError – Raised if method called before a valid datasetToken is obtained or set.
- uploadParameterSet(file)
Upload phosphomatics parameter file.
- Parameters
file (str) – Path to phosphomatics parameter file.
- Raises
NoDataSetTokenError – Raised if method called before a valid datasetToken is obtained or set.
- volcano(kwargs)
- phosphomatics.get_kwargs()