Title: | Analyze MS/MS Protein Melting Data |
---|---|
Description: | Software to aid in modeling and analyzing mass-spectrometry-based proteome melting data. Quantitative data is imported and normalized and thermal behavior is modeled at the protein level. Methods exist for normalization, modeling, visualization, and export of results. For a general introduction to MS-based thermal profiling, see Savitski et al. (2014) <doi:10.1126/science.1255784>. |
Authors: | Jeremy Volkening [aut, cre] |
Maintainer: | Jeremy Volkening <[email protected]> |
License: | GPL-3 |
Version: | 0.4.7 |
Built: | 2024-11-14 03:43:36 UTC |
Source: | https://github.com/cran/mstherm |
Populates a data frame with information from an MSResultSet, one row per protein/group
## S3 method for class 'MSThermResultSet' as.data.frame(x, ...)
## S3 method for class 'MSThermResultSet' as.data.frame(x, ...)
x |
an MSResultSet object |
... |
additional arguments passed to or from other functions |
A data frame populated with relevant information per result
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, bootstrap=FALSE, np=2) df <- as.data.frame(res)
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, bootstrap=FALSE, np=2) df <- as.data.frame(res)
Model multiple proteins from an MSThermExperiment object.
model_experiment(expt, proteins, np, ...)
model_experiment(expt, proteins, np, ...)
expt |
An MSThermExperiment object |
proteins |
A vector of protein IDs to model (default is all proteins). |
np |
Number of parallel jobs to start (default = number of available processors) |
... |
Parameters passed to model_protein() |
MSThermResultSet object
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, bootstrap=FALSE, np=2) summary(res)
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, bootstrap=FALSE, np=2) summary(res)
Model a single protein from an MSThermExperiment object.
model_protein(expt, protein, min_rep_psm = 0, min_smp_psm = 0, min_tot_psm = 0, max_inf = 1, min_score, max_score, smooth = 0, method = "sum", method.denom = "near", trim = 0, bootstrap = 0, min_bs_psms = 8, annot_sep = "|", max_slope = 0, min_r2 = 0, min_reps = 0, only_modeled = 0, check_missing = 0, missing_cutoff = 0.3)
model_protein(expt, protein, min_rep_psm = 0, min_smp_psm = 0, min_tot_psm = 0, max_inf = 1, min_score, max_score, smooth = 0, method = "sum", method.denom = "near", trim = 0, bootstrap = 0, min_bs_psms = 8, annot_sep = "|", max_slope = 0, min_r2 = 0, min_reps = 0, only_modeled = 0, check_missing = 0, missing_cutoff = 0.3)
expt |
An MSThermExperiment object |
protein |
ID of the protein to model |
min_rep_psm |
Minimum number of spectral matches required for each replicate to model protein |
min_smp_psm |
Minimum number of spectral matches required for each sample to model protein |
min_tot_psm |
Minimum number of spectral matches required across all replicates to model protein |
max_inf |
Maximum co-isolation interference level allowed to include a spectrum in protein-level quantification |
min_score |
minimum score allowed to include a spectrum in protein-level quantification |
max_score |
maximum score allowed to include a spectrum in protein-level quantification |
smooth |
(t/F) Perform loess smoothing on the data prior to modeling |
method |
Protein quantification method to use (see Details) |
method.denom |
Method used to calculate denominator of abundance (see Details) |
trim |
(t/F) Trim all lower data points less than the abundance maximum |
bootstrap |
(T/F) Perform bootstrap analysis to determine confidence intervals (slow) |
min_bs_psms |
Minimum number of spectral matches required to perform bootstrapping |
annot_sep |
Symbol used to separate protein group IDs (used for retrieval of annotations) (default: '|') |
max_slope |
Maximum slope to consider model (implies "only_modeled") |
min_r2 |
Minimum R2 value to consider model (implies "only_modeled") |
min_reps |
Minimum number of modeled replicates for each sample to return protein |
only_modeled |
(t/F) Only consider modeled proteins |
check_missing |
(t/F) Run simple test to filter out PSMs with missing quantification channels where values are expected |
missing_cutoff |
Minimum fraction relative to surrounding data points used in the check for missing channels |
Valid quantification methods include:
use the sum of the spectrum values for each channel
use the median of the spectrum values for each channel
Like "median", but values for each spectrum are first converted to ratios according to "method.denom" channel
Like "ratio.median" but using mean of ratios
Valid denominator methods include:
Use the first value (lowest temperature point) (default)
Use the maximum value
Use the mean of the three highest values
Use the median of all values greater than 80 the first value
MSThermResult object
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) model <- model_protein(expt, "P38707", smooth=TRUE, bootstrap=FALSE) summary(model)
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) model <- model_protein(expt, "P38707", smooth=TRUE, bootstrap=FALSE) summary(model)
mstherm
is a package for modeling and analysis of
MS/MS-based thermal proteome profiling (TPP) experiments.
Jeremy Volkening [email protected]
MSThermExperiment
creates a new experiment object from
a set of filenames or data frames.
MSThermExperiment(control, annotations)
MSThermExperiment(control, annotations)
control |
data frame or filename of tab-delimited table describing the experimental setup and locations of data on disk (see Details) |
annotations |
data frame or filename to tab-delimited table containing protein names and annotations (usually functional descriptions but can be any text |
Both parameters can take either a data frame or a tab-delimited filename on disk (which will be read into a data frame). "control" should contain columns with the following headers (in any order):
Unique identifier of a single replicate
Sample name that a replicate belongs to
Path to file on disk containing the quantification data
Path to file on disk containing the labeling metadata
The "meta_file" should be tab-delimited text and contain two columns labeled "channel" and "temp". The "data_file" should be tab-delimited text and contain, at a minimum, the following columns:
Sequence of the matched peptide in single-letter IUPAC
Protein or protein group to which the peptide belongs
One column per isobaric channel, containing absolute quantification values. Column names must match those in the "channel" column of the meta file, with the exception that R will automatically convert any name not compatible with its syntax rules. To be safe, use only letters, digits, underscores, and periods in channel names and never start with a digit (e.g. use "TMT.126" rather than "126")
The following columns can also be utilized for filtering if included (all others will simply be ignored):
Calculated precursor co-isolation interference (0.0-1.0)
Score assigned by the processing software to the PSM
"annotations" should contain two columns with the headers "name" and "annotation". "name" should match the protein names in the data files, and "annotation" can contain any text (generally a functional description)
An MSThermExperiment object
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots)
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots)
Normalizes an MSThermReplicate based on a pre-determined vector of relative abundances
normalize_to_profile(replicate, profile, model = T, plot = T)
normalize_to_profile(replicate, profile, model = T, plot = T)
replicate |
an MSThermReplicate object |
profile |
a vector of relative values |
model |
whether to fit scale factors to model |
plot |
(T/f) whether to display a summary plot |
An MsThermReplicate object with normalized data slots
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) profile <- c(50.0, 50.5, 47.5, 42.0, 37.0, 25.0, 16.0, 11.5, 10.5, 10.0) expt$samples$Control$replicates$C1 <- normalize_to_profile( expt$samples$Control$replicates$C1, profile, plot=FALSE )
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) profile <- c(50.0, 50.5, 47.5, 42.0, 37.0, 25.0, 16.0, 11.5, 10.5, 10.0) expt$samples$Control$replicates$C1 <- normalize_to_profile( expt$samples$Control$replicates$C1, profile, plot=FALSE )
Normalizes each replicate of an experiment based on a given spike-in protein standard (assumed to be present in equimolar amounts in each channel).
normalize_to_std(expt, protein, model = T, plot = T)
normalize_to_std(expt, protein, model = T, plot = T)
expt |
an MSThermExperiment object |
protein |
ID of a protein to normalize against |
model |
whether to fit scale factors to model |
plot |
(T/f) whether to display a summary plot |
An MsThermExperiment object with normalized data slots
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE)
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE)
Normalizes each replicate of an experiment based on linear regression of calculated Tm (corrects for remaining systematic error).
normalize_to_tm(expt, res)
normalize_to_tm(expt, res)
expt |
An MSThermExperiment object |
res |
An MSThermResultSet object |
An assumption can be made in most TPP experiments using a single organism that the Tm of most proteins should not be changing. However, global shifts have been observed between replicates, presumably due to technical variance, which complicate data interpretation. This method attempts to remove this source of error by doing a bootstrap renormalization of the quantification values based on pairwise linear regression between calculated Tms of each replicate. A reference set of Tms is calculated based on all replicates, and each replicate is normalized to this based on the calculated slope and intercept of the input data.
An MsThermExperiment object with re-normalized data slots
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, smooth=TRUE, bootstrap=FALSE, np=2) expt <- normalize_to_tm(expt, res)
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, smooth=TRUE, bootstrap=FALSE, np=2) expt <- normalize_to_tm(expt, res)
Generate a denaturation plot for an modeled protein/group.
## S3 method for class 'MSThermResult' plot(x, table = T, col, CI.points = T, CI.Tm = T, ...)
## S3 method for class 'MSThermResult' plot(x, table = T, col, CI.points = T, CI.Tm = T, ...)
x |
An MSThermResult object |
table |
(T/f) include table of per-replicate parameters |
col |
array of colors used to plot samples |
CI.points |
(T/F) plot temperature point confidence intervals |
CI.Tm |
(T/F) plot Tm confidence intervals |
... |
other parameters passed through to plot() |
Nothing
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, bootstrap=FALSE, np=2) # plot single MSThermResult plot(res$P38707) # plot all proteins (e.g. to pdf device, one-per-page) plot(res)
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, bootstrap=FALSE, np=2) # plot single MSThermResult plot(res$P38707) # plot all proteins (e.g. to pdf device, one-per-page) plot(res)
Generate a series of denaturation plots for all results in an MSThermResultSet.
## S3 method for class 'MSThermResultSet' plot(x, ...)
## S3 method for class 'MSThermResultSet' plot(x, ...)
x |
an MSThermResultSet object |
... |
other parameters are passed through to plot.MSThermResult |
Since this function makes multiple sequential calls to
plot.MSThermResult, it is usually used in conjunction with a multipage
graphics device such as "pdf()"
. Otherwise each subsequent call
will only overwrite the previous output.
Nothing
# see plot.MSThermResult for an example
# see plot.MSThermResult for an example
Print a summary of an MSThermResult, including samples and parameters.
## S3 method for class 'MSThermResult' summary(object, ...)
## S3 method for class 'MSThermResult' summary(object, ...)
object |
an MSThermResult object |
... |
additional arguments passed to or from other functions |
Nothing
# see model_protein() for an example
# see model_protein() for an example
Print a summary of an MSThermResultSet, including samples and parameters.
## S3 method for class 'MSThermResultSet' summary(object, ...)
## S3 method for class 'MSThermResultSet' summary(object, ...)
object |
an MSThermResultSet object |
... |
additional arguments passed to or from other functions |
Nothing
# see model_experiment() for an example
# see model_experiment() for an example
Exports and MSThermResultSet object to a new SQLite database file. Each model (specific to a given replicate and protein) is exported as an individual record. The schema used for the 'data' table can be seen in the code below.
write.sqlite(res, file)
write.sqlite(res, file)
res |
An MSThermResultSet object |
file |
Path to the output sqlite database to be created |
Nothing
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, bootstrap=FALSE, np=2) fn <- tempfile(fileext = ".sqlite") write.sqlite(res, fn) unlink(fn) # for example only
control <- system.file("extdata", "demo_project/control.tsv", package="mstherm") annots <- system.file("extdata", "demo_project/annots.tsv", package="mstherm") expt <- MSThermExperiment(control, annotations=annots) expt <- normalize_to_std(expt, "cRAP_ALBU_BOVIN", plot=FALSE) res <- model_experiment(expt, bootstrap=FALSE, np=2) fn <- tempfile(fileext = ".sqlite") write.sqlite(res, fn) unlink(fn) # for example only