diff --git a/DESCRIPTION b/DESCRIPTION index 298a9da0..cb37345c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -142,4 +142,4 @@ Collate: clusterdist-functions.R clusterdist-framework.R qsep.R -RoxygenNote: 6.1.1 +RoxygenNote: 7.3.1 diff --git a/man/MCMCParams.Rd b/man/MCMCParams.Rd index 93e81be6..39ac9ea6 100644 --- a/man/MCMCParams.Rd +++ b/man/MCMCParams.Rd @@ -43,17 +43,13 @@ chains(object) \S4method{length}{MCMCParams}(x) -\S4method{[[}{MCMCChains,ANY,ANY}(x, i, j = "missing", - drop = "missing") +\S4method{[[}{MCMCChains,ANY,ANY}(x, i, j = "missing", drop = "missing") -\S4method{[[}{MCMCParams,ANY,ANY}(x, i, j = "missing", - drop = "missing") +\S4method{[[}{MCMCParams,ANY,ANY}(x, i, j = "missing", drop = "missing") -\S4method{[}{MCMCChains,ANY,ANY,ANY}(x, i, j = "missing", - drop = "missing") +\S4method{[}{MCMCChains,ANY,ANY,ANY}(x, i, j = "missing", drop = "missing") -\S4method{[}{MCMCParams,ANY,ANY,ANY}(x, i, j = "missing", - drop = "missing") +\S4method{[}{MCMCParams,ANY,ANY,ANY}(x, i, j = "missing", drop = "missing") \S4method{show}{MCMCChains}(object) } diff --git a/man/addGoAnnotations.Rd b/man/addGoAnnotations.Rd index 1cf9cccc..758a4cee 100644 --- a/man/addGoAnnotations.Rd +++ b/man/addGoAnnotations.Rd @@ -4,8 +4,14 @@ \alias{addGoAnnotations} \title{Add GO annotations} \usage{ -addGoAnnotations(object, params, evidence, useID = FALSE, - fcol = "GOAnnotations", ...) +addGoAnnotations( + object, + params, + evidence, + useID = FALSE, + fcol = "GOAnnotations", + ... +) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} diff --git a/man/addLegend.Rd b/man/addLegend.Rd index 5acef64d..9fe30c89 100644 --- a/man/addLegend.Rd +++ b/man/addLegend.Rd @@ -4,9 +4,15 @@ \alias{addLegend} \title{Adds a legend} \usage{ -addLegend(object, fcol = "markers", where = c("bottomleft", "bottom", - "bottomright", "left", "topleft", "top", "topright", "right", "center", - "other"), col, bty = "n", ...) +addLegend( + object, + fcol = "markers", + where = c("bottomleft", "bottom", "bottomright", "left", "topleft", "top", "topright", + "right", "center", "other"), + col, + bty = "n", + ... +) } \arguments{ \item{object}{An instance of class \code{MSnSet}} diff --git a/man/checkFeatureNamesOverlap.Rd b/man/checkFeatureNamesOverlap.Rd index dfb1437e..f143d595 100644 --- a/man/checkFeatureNamesOverlap.Rd +++ b/man/checkFeatureNamesOverlap.Rd @@ -4,8 +4,7 @@ \alias{checkFeatureNamesOverlap} \title{Check feature names overlap} \usage{ -checkFeatureNamesOverlap(x, y, fcolx = "markers", fcoly, - verbose = TRUE) +checkFeatureNamesOverlap(x, y, fcolx = "markers", fcoly, verbose = TRUE) } \arguments{ \item{x}{An \code{MSnSet} instance.} diff --git a/man/clustDist.Rd b/man/clustDist.Rd index 84ce57b0..fc4df2c5 100644 --- a/man/clustDist.Rd +++ b/man/clustDist.Rd @@ -4,8 +4,7 @@ \alias{clustDist} \title{Pairwise Distance Computation for Protein Information Sets} \usage{ -clustDist(object, k = 1:5, fcol = "GOAnnotations", n = 5, - verbose = TRUE, seed) +clustDist(object, k = 1:5, fcol = "GOAnnotations", n = 5, verbose = TRUE, seed) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} @@ -48,7 +47,7 @@ the \code{kmeans} algorithm fits and tests \code{k = c(1:5)} the mean pairwise distance for each \code{k} tested. Note: currently distances are calcualted in Euclidean space, -but other distance metrics will be supported in the future). +but other distance metrics will be supported in the future). The output is a \code{list} of \code{ClustDist} objects, one per information cluster. The \code{ClustDist} diff --git a/man/fDataToUnknown.Rd b/man/fDataToUnknown.Rd index 9d0bd026..49b7aa0f 100644 --- a/man/fDataToUnknown.Rd +++ b/man/fDataToUnknown.Rd @@ -4,8 +4,7 @@ \alias{fDataToUnknown} \title{Update a feature variable} \usage{ -fDataToUnknown(object, fcol = "markers", from = "^$", to = "unknown", - ...) +fDataToUnknown(object, fcol = "markers", from = "^$", to = "unknown", ...) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} diff --git a/man/filterMaxMarkers.Rd b/man/filterMaxMarkers.Rd index 9389de4f..c63b42eb 100644 --- a/man/filterMaxMarkers.Rd +++ b/man/filterMaxMarkers.Rd @@ -5,8 +5,7 @@ \title{Removes class/annotation information from a matrix of candidate markers that appear in the \code{fData}.} \usage{ -filterMaxMarkers(object, n, p = 0.2, fcol = "GOAnnotations", - verbose = TRUE) +filterMaxMarkers(object, n, p = 0.2, fcol = "GOAnnotations", verbose = TRUE) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} diff --git a/man/filterMinMarkers.Rd b/man/filterMinMarkers.Rd index 853aa515..3bb704e3 100644 --- a/man/filterMinMarkers.Rd +++ b/man/filterMinMarkers.Rd @@ -5,8 +5,7 @@ \title{Removes class/annotation information from a matrix of candidate markers that appear in the \code{fData}.} \usage{ -filterMinMarkers(object, n = 10, p, fcol = "GOAnnotations", - verbose = TRUE) +filterMinMarkers(object, n = 10, p, fcol = "GOAnnotations", verbose = TRUE) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} diff --git a/man/getGOFromFeatures.Rd b/man/getGOFromFeatures.Rd index c128b51b..5d7263b4 100644 --- a/man/getGOFromFeatures.Rd +++ b/man/getGOFromFeatures.Rd @@ -4,8 +4,14 @@ \alias{getGOFromFeatures} \title{Retrieve GO terms for feature names} \usage{ -getGOFromFeatures(id, namespace = "cellular_component", - evidence = NULL, params = NULL, verbose = FALSE, nmax = 500) +getGOFromFeatures( + id, + namespace = "cellular_component", + evidence = NULL, + params = NULL, + verbose = FALSE, + nmax = 500 +) } \arguments{ \item{id}{An \code{character} with feature names to be pulled from diff --git a/man/getPredictions.Rd b/man/getPredictions.Rd index fb77faf0..7606ba5c 100644 --- a/man/getPredictions.Rd +++ b/man/getPredictions.Rd @@ -4,8 +4,7 @@ \alias{getPredictions} \title{Returns the predictions in an 'MSnSet'} \usage{ -getPredictions(object, fcol, scol, mcol = "markers", t = 0, - verbose = TRUE) +getPredictions(object, fcol, scol, mcol = "markers", t = 0, verbose = TRUE) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/highlightOnPlot.Rd b/man/highlightOnPlot.Rd index 110b17cf..767b4192 100644 --- a/man/highlightOnPlot.Rd +++ b/man/highlightOnPlot.Rd @@ -7,8 +7,7 @@ \usage{ highlightOnPlot(object, foi, labels, args = list(), ...) -highlightOnPlot3D(object, foi, labels, args = list(), radius = 0.1 * 3, - ...) +highlightOnPlot3D(object, foi, labels, args = list(), radius = 0.1 * 3, ...) } \arguments{ \item{object}{The main dataset described as an \code{MSnSet} or a @@ -22,7 +21,7 @@ or, alternatively, a \code{character} of feautre names.} variable name to be used to label the features of interest. This is only valid if \code{object} is an \code{MSnSet}. Alternatively, if \code{TRUE}, then -\code{featureNames(object)} (or code{rownames(object)}, if +\code{featureNames(object)} (or \code{rownames(object)}, if \code{object} is a \code{matrix}) are used. Default is missing, which does not add any label.s} @@ -48,7 +47,7 @@ NULL; used for its side effects. \description{ Highlights a set of features of interest given as a \code{FeaturesOfInterest} instance on a PCA plot produced by -code{plot2D} or \code{plot3D}. If none of the features of interest +\code{plot2D} or \code{plot3D}. If none of the features of interest are found in the \code{MSnset}'s \code{featureNames}, an warning is thrown. } diff --git a/man/knnClassification.Rd b/man/knnClassification.Rd index d30a8f92..1d767a65 100644 --- a/man/knnClassification.Rd +++ b/man/knnClassification.Rd @@ -5,8 +5,14 @@ \alias{knnPrediction} \title{knn classification} \usage{ -knnClassification(object, assessRes, scores = c("prediction", "all", - "none"), k, fcol = "markers", ...) +knnClassification( + object, + assessRes, + scores = c("prediction", "all", "none"), + k, + fcol = "markers", + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/knnOptimisation.Rd b/man/knnOptimisation.Rd index 53513d73..a4d6ed81 100644 --- a/man/knnOptimisation.Rd +++ b/man/knnOptimisation.Rd @@ -6,9 +6,18 @@ \alias{knnRegularisation} \title{knn parameter optimisation} \usage{ -knnOptimisation(object, fcol = "markers", k = seq(3, 15, 2), - times = 100, test.size = 0.2, xval = 5, fun = mean, seed, - verbose = TRUE, ...) +knnOptimisation( + object, + fcol = "markers", + k = seq(3, 15, 2), + times = 100, + test.size = 0.2, + xval = 5, + fun = mean, + seed, + verbose = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/knntlClassification.Rd b/man/knntlClassification.Rd index b4055f75..7fb84097 100644 --- a/man/knntlClassification.Rd +++ b/man/knntlClassification.Rd @@ -4,8 +4,15 @@ \alias{knntlClassification} \title{knn transfer learning classification} \usage{ -knntlClassification(primary, auxiliary, fcol = "markers", bestTheta, k, - scores = c("prediction", "all", "none"), seed) +knntlClassification( + primary, + auxiliary, + fcol = "markers", + bestTheta, + k, + scores = c("prediction", "all", "none"), + seed +) } \arguments{ \item{primary}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/knntlOptimisation.Rd b/man/knntlOptimisation.Rd index ad4c7678..6544e27f 100644 --- a/man/knntlOptimisation.Rd +++ b/man/knntlOptimisation.Rd @@ -4,10 +4,23 @@ \alias{knntlOptimisation} \title{theta parameter optimisation} \usage{ -knntlOptimisation(primary, auxiliary, fcol = "markers", k, times = 50, - test.size = 0.2, xval = 5, by = 0.5, length.out, th, xfolds, - BPPARAM = BiocParallel::bpparam(), method = "Breckels", - log = FALSE, seed) +knntlOptimisation( + primary, + auxiliary, + fcol = "markers", + k, + times = 50, + test.size = 0.2, + xval = 5, + by = 0.5, + length.out, + th, + xfolds, + BPPARAM = BiocParallel::bpparam(), + method = "Breckels", + log = FALSE, + seed +) } \arguments{ \item{primary}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/ksvmClassification.Rd b/man/ksvmClassification.Rd index b53bdbdb..9f706315 100644 --- a/man/ksvmClassification.Rd +++ b/man/ksvmClassification.Rd @@ -5,8 +5,14 @@ \alias{ksvmPrediction} \title{ksvm classification} \usage{ -ksvmClassification(object, assessRes, scores = c("prediction", "all", - "none"), cost, fcol = "markers", ...) +ksvmClassification( + object, + assessRes, + scores = c("prediction", "all", "none"), + cost, + fcol = "markers", + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/ksvmOptimisation.Rd b/man/ksvmOptimisation.Rd index fe011412..2dad3d16 100644 --- a/man/ksvmOptimisation.Rd +++ b/man/ksvmOptimisation.Rd @@ -6,9 +6,18 @@ \alias{ksvmOptimization} \title{ksvm parameter optimisation} \usage{ -ksvmOptimisation(object, fcol = "markers", cost = 2^(-4:4), - times = 100, test.size = 0.2, xval = 5, fun = mean, seed, - verbose = TRUE, ...) +ksvmOptimisation( + object, + fcol = "markers", + cost = 2^(-4:4), + times = 100, + test.size = 0.2, + xval = 5, + fun = mean, + seed, + verbose = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/makeGoSet.Rd b/man/makeGoSet.Rd index 03b11aa9..8a808ca7 100644 --- a/man/makeGoSet.Rd +++ b/man/makeGoSet.Rd @@ -4,8 +4,7 @@ \alias{makeGoSet} \title{Creates a GO feature \code{MSnSet}} \usage{ -makeGoSet(object, params, namespace = "cellular_component", - evidence = NULL) +makeGoSet(object, params, namespace = "cellular_component", evidence = NULL) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"} diff --git a/man/mcmc-helpers.Rd b/man/mcmc-helpers.Rd index 7fa32f19..1ec6c82f 100644 --- a/man/mcmc-helpers.Rd +++ b/man/mcmc-helpers.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/machinelearning-functions-tagm-mcmc-helper.R -\docType{methods} \name{mcmc_get_outliers} \alias{mcmc_get_outliers} \alias{mcmc_get_meanComponent} diff --git a/man/mrkHClust.Rd b/man/mrkHClust.Rd index 8c6150d5..d0da4584 100644 --- a/man/mrkHClust.Rd +++ b/man/mrkHClust.Rd @@ -4,8 +4,15 @@ \alias{mrkHClust} \title{Draw a dendrogram of subcellular clusters} \usage{ -mrkHClust(object, fcol = "markers", distargs, hclustargs, - method = mean, plot = TRUE, ...) +mrkHClust( + object, + fcol = "markers", + distargs, + hclustargs, + method = mean, + plot = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} diff --git a/man/nbClassification.Rd b/man/nbClassification.Rd index bf744a36..7690736f 100644 --- a/man/nbClassification.Rd +++ b/man/nbClassification.Rd @@ -5,8 +5,14 @@ \alias{nbPrediction} \title{nb classification} \usage{ -nbClassification(object, assessRes, scores = c("prediction", "all", - "none"), laplace, fcol = "markers", ...) +nbClassification( + object, + assessRes, + scores = c("prediction", "all", "none"), + laplace, + fcol = "markers", + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/nbOptimisation.Rd b/man/nbOptimisation.Rd index 889e0c21..7088c504 100644 --- a/man/nbOptimisation.Rd +++ b/man/nbOptimisation.Rd @@ -6,9 +6,18 @@ \alias{nbOptimization} \title{nb paramter optimisation} \usage{ -nbOptimisation(object, fcol = "markers", laplace = seq(0, 5, 0.5), - times = 100, test.size = 0.2, xval = 5, fun = mean, seed, - verbose = TRUE, ...) +nbOptimisation( + object, + fcol = "markers", + laplace = seq(0, 5, 0.5), + times = 100, + test.size = 0.2, + xval = 5, + fun = mean, + seed, + verbose = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/nicheMeans2D.Rd b/man/nicheMeans2D.Rd index 09b34931..06eca089 100644 --- a/man/nicheMeans2D.Rd +++ b/man/nicheMeans2D.Rd @@ -4,8 +4,14 @@ \alias{nicheMeans2D} \title{Uncertainty plot organelle means} \usage{ -nicheMeans2D(object, params, priors, dims = c(1, 2), fcol = "markers", - aspect = 0.5) +nicheMeans2D( + object, + params, + priors, + dims = c(1, 2), + fcol = "markers", + aspect = 0.5 +) } \arguments{ \item{object}{A valid object of class \code{MSnset}} diff --git a/man/nnetClassification.Rd b/man/nnetClassification.Rd index 9ee8b4d0..b0f1b28e 100644 --- a/man/nnetClassification.Rd +++ b/man/nnetClassification.Rd @@ -5,8 +5,15 @@ \alias{nnetPrediction} \title{nnet classification} \usage{ -nnetClassification(object, assessRes, scores = c("prediction", "all", - "none"), decay, size, fcol = "markers", ...) +nnetClassification( + object, + assessRes, + scores = c("prediction", "all", "none"), + decay, + size, + fcol = "markers", + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/nnetOptimisation.Rd b/man/nnetOptimisation.Rd index f1cd4856..57401386 100644 --- a/man/nnetOptimisation.Rd +++ b/man/nnetOptimisation.Rd @@ -6,9 +6,19 @@ \alias{nnetOptimization} \title{nnet parameter optimisation} \usage{ -nnetOptimisation(object, fcol = "markers", decay = c(0, 10^(-1:-5)), - size = seq(1, 10, 2), times = 100, test.size = 0.2, xval = 5, - fun = mean, seed, verbose = TRUE, ...) +nnetOptimisation( + object, + fcol = "markers", + decay = c(0, 10^(-1:-5)), + size = seq(1, 10, 2), + times = 100, + test.size = 0.2, + xval = 5, + fun = mean, + seed, + verbose = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/orderGoAnnotations.Rd b/man/orderGoAnnotations.Rd index b4940edf..45d75c6a 100644 --- a/man/orderGoAnnotations.Rd +++ b/man/orderGoAnnotations.Rd @@ -4,8 +4,15 @@ \alias{orderGoAnnotations} \title{Orders annotation information} \usage{ -orderGoAnnotations(object, fcol = "GOAnnotations", k = 1:5, n = 5, - p = 1/3, verbose = TRUE, seed) +orderGoAnnotations( + object, + fcol = "GOAnnotations", + k = 1:5, + n = 5, + p = 1/3, + verbose = TRUE, + seed +) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} @@ -37,7 +44,7 @@ the best fit with the data. As there are typically many protein/annotation sets that may fit the data we order protein sets by best fit i.e. cluster tightness, by computing the mean normalised Euclidean distance for all instances -per protein set. +per protein set. For each protein set i.e. proteins that have been labelled with a specified term/information criteria, we find the best @@ -46,13 +53,13 @@ test\code{k = 1:5}) according to the minimum mean normalised pairwise Euclidean distance over all component clusters. (Note: when testing \code{k} if any components are found to have less than \code{n} proteins these components are not -included and \code{k} is reduced by 1). +included and \code{k} is reduced by 1). Each component cluster is normalised by \code{N^p} (where \code{N} is the total number of proteins per component, and \code{p} is the power). Hueristally, \code{p = 1/3} and normalising by \code{N^1/3} has been found the optimum -normalisation factor. +normalisation factor. Candidates in the matrix are ordered according to lowest mean normalised pairwise Euclidean distance as we expect diff --git a/man/perTurboClassification.Rd b/man/perTurboClassification.Rd index c5c56828..a68a354c 100644 --- a/man/perTurboClassification.Rd +++ b/man/perTurboClassification.Rd @@ -4,8 +4,16 @@ \alias{perTurboClassification} \title{perTurbo classification} \usage{ -perTurboClassification(object, assessRes, scores = c("prediction", "all", - "none"), pRegul, sigma, inv, reg, fcol = "markers") +perTurboClassification( + object, + assessRes, + scores = c("prediction", "all", "none"), + pRegul, + sigma, + inv, + reg, + fcol = "markers" +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/perTurboOptimisation.Rd b/man/perTurboOptimisation.Rd index 450908f1..a84eb6bb 100644 --- a/man/perTurboOptimisation.Rd +++ b/man/perTurboOptimisation.Rd @@ -5,11 +5,20 @@ \alias{perTurboOptimization} \title{PerTurbo parameter optimisation} \usage{ -perTurboOptimisation(object, fcol = "markers", pRegul = 10^(seq(from = - -1, to = 0, by = 0.2)), sigma = 10^(seq(from = -1, to = 1, by = 0.5)), +perTurboOptimisation( + object, + fcol = "markers", + pRegul = 10^(seq(from = -1, to = 0, by = 0.2)), + sigma = 10^(seq(from = -1, to = 1, by = 0.5)), inv = c("Inversion Cholesky", "Moore Penrose", "solve", "svd"), - reg = c("tikhonov", "none", "trunc"), times = 1, test.size = 0.2, - xval = 5, fun = mean, seed, verbose = TRUE) + reg = c("tikhonov", "none", "trunc"), + times = 1, + test.size = 0.2, + xval = 5, + fun = mean, + seed, + verbose = TRUE +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/phenoDisco.Rd b/man/phenoDisco.Rd index 97d1fb6a..11073feb 100644 --- a/man/phenoDisco.Rd +++ b/man/phenoDisco.Rd @@ -4,10 +4,23 @@ \alias{phenoDisco} \title{Runs the \code{phenoDisco} algorithm.} \usage{ -phenoDisco(object, fcol = "markers", times = 100, GS = 10, - allIter = FALSE, p = 0.05, ndims = 2, - modelNames = mclust.options("emModelNames"), G = 1:9, BPPARAM, - tmpfile, seed, verbose = TRUE, dimred = c("PCA", "t-SNE"), ...) +phenoDisco( + object, + fcol = "markers", + times = 100, + GS = 10, + allIter = FALSE, + p = 0.05, + ndims = 2, + modelNames = mclust.options("emModelNames"), + G = 1:9, + BPPARAM, + tmpfile, + seed, + verbose = TRUE, + dimred = c("PCA", "t-SNE"), + ... +) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} diff --git a/man/plot2D.Rd b/man/plot2D.Rd index 3c5b1e27..911850ae 100644 --- a/man/plot2D.Rd +++ b/man/plot2D.Rd @@ -1,20 +1,44 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotting.R, R/plotting3.R -\docType{methods} \name{plot2D} \alias{plot2D} \alias{plot2Dmethods} \alias{plot3D,MSnSet-method} \title{Plot organelle assignment data and results.} \usage{ -plot2D(object, fcol = "markers", fpch, unknown = "unknown", - dims = 1:2, score = 1, method = "PCA", methargs, - axsSwitch = FALSE, mirrorX = FALSE, mirrorY = FALSE, col, pch, cex, - index = FALSE, idx.cex = 0.75, addLegend, identify = FALSE, - plot = TRUE, grid = TRUE, ...) - -\S4method{plot3D}{MSnSet}(object, fcol = "markers", dims = c(1, 2, 3), - radius1 = 0.1, radius2 = radius1 * 2, plot = TRUE, ...) +plot2D( + object, + fcol = "markers", + fpch, + unknown = "unknown", + dims = 1:2, + score = 1, + method = "PCA", + methargs, + axsSwitch = FALSE, + mirrorX = FALSE, + mirrorY = FALSE, + col, + pch, + cex, + index = FALSE, + idx.cex = 0.75, + addLegend, + identify = FALSE, + plot = TRUE, + grid = TRUE, + ... +) + +\S4method{plot3D}{MSnSet}( + object, + fcol = "markers", + dims = c(1, 2, 3), + radius1 = 0.1, + radius2 = radius1 * 2, + plot = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} diff --git a/man/plot2Ds.Rd b/man/plot2Ds.Rd index dcdd64e9..2d66197f 100644 --- a/man/plot2Ds.Rd +++ b/man/plot2Ds.Rd @@ -8,9 +8,20 @@ \alias{col2} \title{Draw 2 data sets on one PCA plot} \usage{ -plot2Ds(object, pcol, fcol = "markers", cex.x = 1, cex.y = 1, - pch.x = 21, pch.y = 23, col, mirrorX = FALSE, mirrorY = FALSE, - plot = TRUE, ...) +plot2Ds( + object, + pcol, + fcol = "markers", + cex.x = 1, + cex.y = 1, + pch.x = 21, + pch.y = 23, + col, + mirrorX = FALSE, + mirrorY = FALSE, + plot = TRUE, + ... +) } \arguments{ \item{object}{An \code{\linkS4class{MSnSet}} or a diff --git a/man/plotDist.Rd b/man/plotDist.Rd index bc77c92c..c91cde7f 100644 --- a/man/plotDist.Rd +++ b/man/plotDist.Rd @@ -4,10 +4,21 @@ \alias{plotDist} \title{Plots the distribution of features across fractions} \usage{ -plotDist(object, markers, fcol = NULL, mcol = "steelblue", - pcol = getUnknowncol(), alpha = 0.3, type = "b", lty = 1, - fractions = sampleNames(object), ylab = "Intensity", - xlab = "Fractions", ylim, ...) +plotDist( + object, + markers, + fcol = NULL, + mcol = "steelblue", + pcol = getUnknowncol(), + alpha = 0.3, + type = "b", + lty = 1, + fractions = sampleNames(object), + ylab = "Intensity", + xlab = "Fractions", + ylim, + ... +) } \arguments{ \item{object}{An instance of class \code{MSnSet}.} diff --git a/man/plsdaClassification.Rd b/man/plsdaClassification.Rd index 1722f013..93381b0d 100644 --- a/man/plsdaClassification.Rd +++ b/man/plsdaClassification.Rd @@ -5,8 +5,14 @@ \alias{plsdaPrediction} \title{plsda classification} \usage{ -plsdaClassification(object, assessRes, scores = c("prediction", "all", - "none"), ncomp, fcol = "markers", ...) +plsdaClassification( + object, + assessRes, + scores = c("prediction", "all", "none"), + ncomp, + fcol = "markers", + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/plsdaOptimisation.Rd b/man/plsdaOptimisation.Rd index 70ef1ef6..05486d4b 100644 --- a/man/plsdaOptimisation.Rd +++ b/man/plsdaOptimisation.Rd @@ -6,8 +6,18 @@ \alias{plsdaOptimization} \title{plsda parameter optimisation} \usage{ -plsdaOptimisation(object, fcol = "markers", ncomp = 2:6, times = 100, - test.size = 0.2, xval = 5, fun = mean, seed, verbose = TRUE, ...) +plsdaOptimisation( + object, + fcol = "markers", + ncomp = 2:6, + times = 100, + test.size = 0.2, + xval = 5, + fun = mean, + seed, + verbose = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/rfClassification.Rd b/man/rfClassification.Rd index e4950801..60a7f550 100644 --- a/man/rfClassification.Rd +++ b/man/rfClassification.Rd @@ -5,8 +5,14 @@ \alias{rfPrediction} \title{rf classification} \usage{ -rfClassification(object, assessRes, scores = c("prediction", "all", - "none"), mtry, fcol = "markers", ...) +rfClassification( + object, + assessRes, + scores = c("prediction", "all", "none"), + mtry, + fcol = "markers", + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/rfOptimisation.Rd b/man/rfOptimisation.Rd index c6792938..ed1cf7a0 100644 --- a/man/rfOptimisation.Rd +++ b/man/rfOptimisation.Rd @@ -6,8 +6,18 @@ \alias{rfOptimization} \title{svm parameter optimisation} \usage{ -rfOptimisation(object, fcol = "markers", mtry = NULL, times = 100, - test.size = 0.2, xval = 5, fun = mean, seed, verbose = TRUE, ...) +rfOptimisation( + object, + fcol = "markers", + mtry = NULL, + times = 100, + test.size = 0.2, + xval = 5, + fun = mean, + seed, + verbose = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/spatial2D.Rd b/man/spatial2D.Rd index 7e274268..a1c47d7a 100644 --- a/man/spatial2D.Rd +++ b/man/spatial2D.Rd @@ -4,9 +4,16 @@ \alias{spatial2D} \title{Uncertainty plot in localisation probabilities} \usage{ -spatial2D(object, dims = c(1, 2), cov.function = fields::wendland.cov, - theta = 1, derivative = 2, k = 1, breaks = c(0.99, 0.95, 0.9, - 0.85, 0.8, 0.75, 0.7), aspect = 0.5) +spatial2D( + object, + dims = c(1, 2), + cov.function = fields::wendland.cov, + theta = 1, + derivative = 2, + k = 1, + breaks = c(0.99, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7), + aspect = 0.5 +) } \arguments{ \item{object}{A valid object of class \code{MSnset} with mcmc prediction diff --git a/man/svmClassification.Rd b/man/svmClassification.Rd index 4d3717d8..2a4458fb 100644 --- a/man/svmClassification.Rd +++ b/man/svmClassification.Rd @@ -5,8 +5,15 @@ \alias{svmPrediction} \title{svm classification} \usage{ -svmClassification(object, assessRes, scores = c("prediction", "all", - "none"), cost, sigma, fcol = "markers", ...) +svmClassification( + object, + assessRes, + scores = c("prediction", "all", "none"), + cost, + sigma, + fcol = "markers", + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/svmOptimisation.Rd b/man/svmOptimisation.Rd index 70c29ede..2ebfe07f 100644 --- a/man/svmOptimisation.Rd +++ b/man/svmOptimisation.Rd @@ -6,9 +6,19 @@ \alias{svmOptimization} \title{svm parameter optimisation} \usage{ -svmOptimisation(object, fcol = "markers", cost = 2^(-4:4), - sigma = 10^(-3:2), times = 100, test.size = 0.2, xval = 5, - fun = mean, seed, verbose = TRUE, ...) +svmOptimisation( + object, + fcol = "markers", + cost = 2^(-4:4), + sigma = 10^(-3:2), + times = 100, + test.size = 0.2, + xval = 5, + fun = mean, + seed, + verbose = TRUE, + ... +) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/tagm-map.Rd b/man/tagm-map.Rd index 8b327386..89b48224 100644 --- a/man/tagm-map.Rd +++ b/man/tagm-map.Rd @@ -17,15 +17,31 @@ each iteration of the EM algorithm to check for convergence.} logPosteriors(x) -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) +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 +) } \arguments{ -\item{object}{An \code{\link[MSnbase:MSnSet]{MSnbase::MSnSet}} containing the spatial +\item{object}{An \code{\link[MSnbase:MSnSet-class]{MSnbase::MSnSet}} containing the spatial proteomics data to be passed to \code{tagmMapTrain} and \code{tagmPredict}.} @@ -77,7 +93,7 @@ considered an outlier).} \code{tagmMapTrain} returns an instance of class \code{\link[=MAPParams]{MAPParams()}}. \code{tagmPredict} returns an instance of class -\code{\link[MSnbase:MSnSet]{MSnbase::MSnSet}} containing the localisation predictions as +\code{\link[MSnbase:MSnSet-class]{MSnbase::MSnSet}} containing the localisation predictions as a new \code{tagm.map.allocation} feature variable. } \description{ @@ -88,7 +104,7 @@ using the maximum a posteriori (MAP) optimisation routine. \details{ The \code{tagmMapTrain} function generates the MAP parameters (object or class \code{MAPParams}) based on an annotated quantitative spatial proteomics dataset -(object of class \code{\link[MSnbase:MSnSet]{MSnbase::MSnSet}}). Both are then passed to the +(object of class \code{\link[MSnbase:MSnSet-class]{MSnbase::MSnSet}}). Both are then passed to the \code{tagmPredict} function to predict the sub-cellular localisation of protein of unknown localisation. See the \emph{pRoloc-bayesian} vignette for details and examples. In this implementation, if numerical instability is detected in diff --git a/man/tagm-mcmc.Rd b/man/tagm-mcmc.Rd index 8b5edd46..bb33fd33 100644 --- a/man/tagm-mcmc.Rd +++ b/man/tagm-mcmc.Rd @@ -7,21 +7,44 @@ \alias{tagmMcmcProcess} \title{Localisation of proteins using the TAGM MCMC method} \usage{ -tagmMcmcTrain(object, fcol = "markers", method = "MCMC", - numIter = 1000L, burnin = 100L, thin = 5L, mu0 = NULL, - lambda0 = 0.01, nu0 = NULL, S0 = NULL, beta0 = NULL, u = 2, - v = 10, numChains = 4L, BPPARAM = BiocParallel::bpparam()) - -tagmMcmcPredict(object, params, fcol = "markers", probJoint = FALSE, - probOutlier = TRUE) - -tagmPredict(object, params, fcol = "markers", probJoint = FALSE, - probOutlier = TRUE) +tagmMcmcTrain( + object, + fcol = "markers", + method = "MCMC", + numIter = 1000L, + burnin = 100L, + thin = 5L, + mu0 = NULL, + lambda0 = 0.01, + nu0 = NULL, + S0 = NULL, + beta0 = NULL, + u = 2, + v = 10, + numChains = 4L, + BPPARAM = BiocParallel::bpparam() +) + +tagmMcmcPredict( + object, + params, + fcol = "markers", + probJoint = FALSE, + probOutlier = TRUE +) + +tagmPredict( + object, + params, + fcol = "markers", + probJoint = FALSE, + probOutlier = TRUE +) tagmMcmcProcess(params) } \arguments{ -\item{object}{An \code{\link[MSnbase:MSnSet]{MSnbase::MSnSet}} containing the spatial +\item{object}{An \code{\link[MSnbase:MSnSet-class]{MSnbase::MSnSet}} containing the spatial proteomics data to be passed to \code{tagmMcmcTrain} and \code{tagmPredict}.} @@ -87,7 +110,7 @@ considered an outlier).} \code{MCMCParams}. \code{tagmMcmcPredict} returns an instance of class -\code{\link[MSnbase:MSnSet]{MSnbase::MSnSet}} containing the localisation predictions as +\code{\link[MSnbase:MSnSet-class]{MSnbase::MSnSet}} containing the localisation predictions as a new \code{tagm.mcmc.allocation} feature variable. The allocation probability is encoded as \code{tagm.mcmc.probability} (corresponding to the mean of the distribution @@ -112,7 +135,7 @@ using Markov-chain Monte-Carlo (MCMC) for inference. The \code{tagmMcmcTrain} function generates the samples from the posterior distributions (object or class \code{MCMCParams}) based on an annotated quantitative spatial proteomics dataset (object of class -\code{\link[MSnbase:MSnSet]{MSnbase::MSnSet}}). Both are then passed to the \code{tagmPredict} +\code{\link[MSnbase:MSnSet-class]{MSnbase::MSnSet}}). Both are then passed to the \code{tagmPredict} function to predict the sub-cellular localisation of protein of unknown localisation. See the \emph{pRoloc-bayesian} vignette for details and examples. In this implementation, if numerical instability diff --git a/man/testMarkers.Rd b/man/testMarkers.Rd index 79276e8d..1f0230a2 100644 --- a/man/testMarkers.Rd +++ b/man/testMarkers.Rd @@ -4,8 +4,7 @@ \alias{testMarkers} \title{Tests marker class sizes} \usage{ -testMarkers(object, xval = 5, n = 2, fcol = "markers", - error = FALSE) +testMarkers(object, xval = 5, n = 2, fcol = "markers", error = FALSE) } \arguments{ \item{object}{An instance of class \code{"\linkS4class{MSnSet}"}.} diff --git a/man/zerosInBinMSnSet.Rd b/man/zerosInBinMSnSet.Rd index d3b09e44..6cb0c120 100644 --- a/man/zerosInBinMSnSet.Rd +++ b/man/zerosInBinMSnSet.Rd @@ -4,8 +4,7 @@ \alias{zerosInBinMSnSet} \title{Compute the number of non-zero values in each marker classes} \usage{ -zerosInBinMSnSet(object, fcol = "markers", as.matrix = TRUE, - percent = TRUE) +zerosInBinMSnSet(object, fcol = "markers", as.matrix = TRUE, percent = TRUE) } \arguments{ \item{object}{An instance of class \code{MSnSet} with binary data.} diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index 4372b7da..8b7986dc 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -6,6 +6,11 @@ using namespace Rcpp; +#ifdef RCPP_USE_GLOBAL_ROSTREAM +Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); +Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); +#endif + // dmvtCpp SEXP dmvtCpp(arma::mat X_, arma::vec mu_, arma::mat sigma_, double df_, bool log_, unsigned int ncores_, bool isChol_); RcppExport SEXP _pRoloc_dmvtCpp(SEXP X_SEXP, SEXP mu_SEXP, SEXP sigma_SEXP, SEXP df_SEXP, SEXP log_SEXP, SEXP ncores_SEXP, SEXP isChol_SEXP) {