tagmMapTrain {pRoloc} | R Documentation

## Localisation of proteins using the TAGM MAP method

### Description

These functions implement the T augmented Gaussian mixture (TAGM) model for mass spectrometry-based spatial proteomics datasets using the maximum a posteriori (MAP) optimisation routine.

### Usage

    tagmMapTrain(object, fcol = "markers", method = "MAP", numIter = 100,
      mu0 = NULL, lambda0 = 0.01, nu0 = NULL, S0 = NULL,
      beta0 = NULL, u = 2, v = 10, seed = NULL)

    tagmMapPredict(object, params, fcol = "markers", probJoint = FALSE,
      probOutlier = TRUE)

    ## S4 method for signature 'MAPParams'
    show(object)

    logPosteriors(x)

### Arguments

`object` | An `MSnbase::MSnSet` containing the spatial proteomics data to be passed to `tagmMapTrain` and `tagmPredict`.
`fcol` | The feature meta-data containing marker definitions. Default is `markers`.
`method` | A `charachter()` describing the inference method for the TAGM algorithm. Default is `"MAP"`.
`numIter` | The number of iterations of the expectation-maximisation algorithm. Default is 100.
`mu0` | The prior mean. Default is `colMeans` of the expression data.
`lambda0` | The prior shrinkage. Default is 0.01.
`nu0` | The prior degreed of freedom. Default is `ncol(exprs(object)) + 2`
`S0` | The prior inverse-wishary scale matrix. Empirical prior used by default.
`beta0` | The prior Dirichlet distribution concentration. Default is 1 for each class.
`u` | The prior shape parameter for Beta(u, v). Default is 2
`v` | The prior shape parameter for Beta(u, v). Default is 10.
`seed` | The optional random number generator seed.
`params` | An instance of class `MAPParams`, as generated by `tagmMapTrain()`.
`probJoint` | A `logical(1)` indicating whether to return the joint probability matrix, i.e. the probability for all classes as a new `tagm.map.joint` feature variable.
`probOutlier` | A `logical(1)` indicating whether to return the probability of being an outlier as a new `tagm.map.outlier` feature variable. A high value indicates that the protein is unlikely to belong to any annotated class (and is hence considered an outlier).
`x` | An object of class 'MAPParams'.

### Details

The `tagmMapTrain` function generates the MAP parameters (object or class `MAPParams`) based on an annotated quantitative spatial proteomics dataset (object of class `MSnbase::MSnSet`). Both are then passed to the `tagmPredict` function to predict the sub-cellular localisation of protein of unknown localisation. See the pRoloc-bayesian vignette for details and examples. In this implementation, if numerical instability is detected in the covariance matrix of the data a small multiple of the identity is added. A message is printed if this conditioning step is performed.

### Value

`tagmMapTrain` returns an instance of class `MAPParams()`.

`tagmPredict` returns an instance of class `MSnbase::MSnSet` containing the localisation predictions as a new `tagm.map.allocation` feature variable.

### Slots

`method`

  A `character()` storing the TAGM method name.

`priors`

  A `list()` with the priors for the parameters

`seed`

  An `integer()` with the random number generation seed.

`posteriors`

  A `list()` with the updated posterior parameters and log-posterior of the model.

`datasize`

  A `list()` with details about size of data

### Author(s)

Oliver M. Crook

Laurent Gatto

### References

A Bayesian Mixture Modelling Approach For Spatial Proteomics Oliver M Crook, Claire M Mulvey, Paul D. W. Kirk, Kathryn S Lilley, Laurent Gatto bioRxiv 282269; doi: https://doi.org/10.1101/282269

### See Also

The `plotEllipse()` function can be used to visualise TAGM models on PCA plots with ellipses. The `tagmMapTrain()` function to use the TAGM MAP method.

[Package pRoloc version 1.24.1 Index]