Skip to content

Commit da8fc41

Browse files
committed
Documentation tweaks.
Better error message if using old Vision object Signed-off-by: David DeTomaso <davedeto@gmail.com>
1 parent f5974e9 commit da8fc41

11 files changed

Lines changed: 37 additions & 35 deletions

R/Server.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ServerSigProjMatrix <- function(zscores, pvals, proj_labels, sig_labels) {
3131
#' @return JSON formatted Signature object.
3232
signatureToJSON <- function(sig) {
3333

34-
# Pass in a Signature object from a FastProject Object to be converted into a JSON object
34+
# Pass in a Signature object from an R Object to be converted into a JSON object
3535
sig@sigDict <- as.list(sig@sigDict)
3636

3737
json <- toJSON(sig, force=TRUE, pretty=TRUE, auto_unbox=TRUE)
@@ -100,7 +100,7 @@ coordinatesToJSON <- function(p) {
100100
return(json)
101101
}
102102

103-
#' Converts a sigProjMatrix from a FastProject Object to a JSON object
103+
#' Converts a sigProjMatrix from an R Object to a JSON object
104104
#' @importFrom jsonlite toJSON
105105
#' @param sigzscores Matrix of signature z-scores
106106
#' @param sigpvals Matrix of signature p-values
@@ -156,8 +156,7 @@ compressJSONResponse <- function(json, res, req){
156156
#' Lanch the server
157157
#' @importFrom jsonlite fromJSON
158158
#' @importFrom utils browseURL URLdecode stack
159-
#' @param object FastProject object or path to a file containing such an
160-
#' object (saved using saveAndViewResults, or directly using saveRDS)
159+
#' @param object Vision object
161160
#' @param port The port on which to serve the output viewer. If omitted, a
162161
#' random port between 8000 and 9999 is chosen.
163162
#' @param host The host used to serve the output viewer. If omitted, "127.0.0.1"

R/SigScoreMethods.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#' Different ways to evalutate the signature score
22
#'
3-
#' EAch method should have the same signature so they can be swapped
3+
#' Each method should have the same signature so they can be swapped
44
#'
55
#' Right now, each takes in a wrapped data object and signature object
66
#'
7-
#' Specified by FastProject argument (sig_score_method), default = naiveEvalSignature
7+
#' Specified by Vision argument (sig_score_method), default = "naive"
88

99
#' Evaluate signature scores efficiently in batches
1010
#'

R/Utilities.R

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ batchify <- function(items, per_batch, n_workers = 1) {
3535
}
3636

3737

38-
#' Check's the version of the FastProject object and displays error if necessary
38+
#' Checks the version of the Vision object and displays error if necessary
3939
#'
40-
#' @param object FastProject object
40+
#' @param object Vision object
4141
#' @return NULL
4242
versionCheck <- function(object) {
4343

4444
templateStr <- paste0(
45-
"This FastProject object was created with an older version of the library.",
46-
" To view, either install an older version (commit #COMMIT) from GitHub (www.github.com/YosefLab/FastProjectR) or",
45+
"This Vision object was created with an older version of the library.",
46+
" To view, either install an older version (commit #COMMIT) from GitHub (www.github.com/YosefLab/Vision) or",
4747
" recreate the object and re-run analyze"
4848
)
4949

@@ -57,6 +57,11 @@ versionCheck <- function(object) {
5757
stop(msg, call. = FALSE)
5858
}
5959

60+
if(object@version < 1.1) {
61+
msg <- gsub("#COMMIT", "2db4552", templateStr)
62+
stop(msg, call. = FALSE)
63+
}
64+
6065
# Add new commit hashes here as version increases and breaks backward compatibility
6166

6267
return()

docs/reference/batchSigEval.html

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/launchServer.html

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/sigProjMatrixToJSON.html

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/versionCheck.html

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/batchSigEval.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/launchServer.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sigProjMatrixToJSON.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)