This function produces organelle-specific quantiles corresponding to the given classification scores.

orgQuants(object, fcol, scol, mcol = "markers", t, verbose = TRUE)

Arguments

object

An instance of class "MSnSet".

fcol

The name of the prediction column in the featureData slot.

scol

The name of the prediction score column in the featureData slot. If missing, created by pasting '.scores' after fcol.

mcol

The name of the column containing the training data in the featureData slot. Default is markers.

t

The quantile threshold.

verbose

If TRUE, the calculated threholds are printed.

Value

A named vector of organelle thresholds.

See also

getPredictions to get organelle predictions based on calculated thresholds.

Author

Lisa Breckels

Examples

library("pRolocdata")
data(dunkley2006)
res <- svmClassification(dunkley2006, fcol = "pd.markers",
                         sigma = 0.1, cost = 0.5)
#> [1] "pd.markers"
## 50% top predictions per class
ts <- orgQuants(res, fcol = "svm", t = .5)
#>      ER lumen   ER membrane         Golgi Mitochondrion            PM 
#>     0.3129695     0.8380783     0.7755526     0.7423607     0.7356209 
#>       Plastid      Ribosome           TGN       vacuole 
#>     0.7683069     0.5552199     0.5629277     0.5697818 
getPredictions(res, fcol = "svm", t = ts)
#> ans
#>      ER lumen   ER membrane         Golgi Mitochondrion            PM 
#>            15           117            65            78            86 
#>       Plastid      Ribosome           TGN       unknown       vacuole 
#>            37            40            15           211            25 
#> MSnSet (storageMode: lockedEnvironment)
#> assayData: 689 features, 16 samples 
#>   element names: exprs 
#> protocolData: none
#> phenoData
#>   sampleNames: M1F1A M1F4A ... M2F11B (16 total)
#>   varLabels: membrane.prep fraction replicate
#>   varMetadata: labelDescription
#> featureData
#>   featureNames: AT1G09210 AT1G21750 ... AT4G39080 (689 total)
#>   fvarLabels: assigned evidence ... svm.pred (11 total)
#>   fvarMetadata: labelDescription
#> experimentData: use 'experimentData(object)'
#>   pubMedIds: 16618929 
#> Annotation:  
#> - - - Processing information - - -
#> Loaded on Thu Jul 16 22:53:08 2015. 
#> Normalised to sum of intensities. 
#> Added markers from  'mrk' marker vector. Thu Jul 16 22:53:08 2015 
#> Performed svm prediction (cost=0.5 sigma=0.1) Tue Mar 12 07:14:05 2024 
#> Added svm predictions according to thresholds: ER lumen = 0.31, ER membrane = 0.84, Golgi = 0.78, Mitochondrion = 0.74, PM = 0.74, Plastid = 0.77, Ribosome = 0.56, TGN = 0.56, vacuole = 0.57 Tue Mar 12 07:14:05 2024 
#>  MSnbase version: 1.17.12