Skip to contents

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

Usage

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.3225638     0.8453501     0.7771339     0.7448942     0.7232983 
#>       Plastid      Ribosome           TGN       vacuole 
#>     0.7745416     0.5676572     0.5321969     0.5674309 
getPredictions(res, fcol = "svm", t = ts)
#> ans
#>      ER lumen   ER membrane         Golgi Mitochondrion            PM 
#>            15           117            65            78            85 
#>       Plastid      Ribosome           TGN       unknown       vacuole 
#>            36            40            15           212            26 
#> 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) Sat Nov 23 16:04:26 2024 
#> Added svm predictions according to thresholds: ER lumen = 0.32, ER membrane = 0.85, Golgi = 0.78, Mitochondrion = 0.74, PM = 0.72, Plastid = 0.77, Ribosome = 0.57, TGN = 0.53, vacuole = 0.57 Sat Nov 23 16:04:26 2024 
#>  MSnbase version: 1.17.12