From c87086f710f028c52a2085209e27125e1d921dc3 Mon Sep 17 00:00:00 2001 From: shraddhapai Date: Thu, 24 Sep 2020 16:53:30 -0400 Subject: [PATCH] declarations for no global bindings error --- R/plotIntegratedPatientNetwork.R | 1 - R/plot_tSNE.R | 3 +++ R/runQuery.R | 2 -- R/smooMutationPropagation.R | 2 ++ vignettes/Predict_CaseControl_from_CNV.Rmd | 6 +++--- vignettes/SmoothMutationsUsingInteractionNets.Rmd | 6 ++++++ 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/R/plotIntegratedPatientNetwork.R b/R/plotIntegratedPatientNetwork.R index c2e2213b..2fe74a1c 100644 --- a/R/plotIntegratedPatientNetwork.R +++ b/R/plotIntegratedPatientNetwork.R @@ -210,6 +210,5 @@ if (plotCytoscape) { ) } - return(out) } diff --git a/R/plot_tSNE.R b/R/plot_tSNE.R index a6347757..6dec712e 100644 --- a/R/plot_tSNE.R +++ b/R/plot_tSNE.R @@ -26,6 +26,9 @@ if (all.equal(pheno$ID[idx],samps)!=TRUE) { } st <- pheno$STATUS[idx] +# to eliminate the "no visible binding for global variable" problem +y <- status <- NULL + message("* Plotting") colnames(dat) <- c("x","y") dat <- as.data.frame(dat,stringsAsFactors=TRUE) diff --git a/R/runQuery.R b/R/runQuery.R index ae60b07a..1f627927 100644 --- a/R/runQuery.R +++ b/R/runQuery.R @@ -8,8 +8,6 @@ #' numCores*GMmemory will be used and distributed for all GM threads #' @param numCores (integer) number of CPU cores for parallel processing #' @param debugMode (logical) when TRUE runs jobs in serial instead of parallel and -#' prints verbose messages. -#' @param debugMode (logical) when TRUE runs jobs in serial instead of parallel and #' prints verbose messages. Also prints system Java calls. #' @return (char) path to GeneMANIA query result files with patient similarity #' rankings (*PRANK) and feature weights (*NRANK) diff --git a/R/smooMutationPropagation.R b/R/smooMutationPropagation.R index fe2d8da8..8ddb3e29 100755 --- a/R/smooMutationPropagation.R +++ b/R/smooMutationPropagation.R @@ -75,6 +75,8 @@ smoothMutations_LabelProp <- function(mat,net,numCores=1L) { cl <- makeCluster(numCores) registerDoParallel(cl) + # to address the "no visible binding for global variable" error + k <- NULL res.l <- foreach(k = 1:length(inds), .packages=c("netSmooth","scater","clusterExperiment")) %dopar% { nS.res=netSmooth(mat[,inds[[k]]], net , alpha=0.2, verbose = 'auto', diff --git a/vignettes/Predict_CaseControl_from_CNV.Rmd b/vignettes/Predict_CaseControl_from_CNV.Rmd index aafdc951..e0cd4623 100644 --- a/vignettes/Predict_CaseControl_from_CNV.Rmd +++ b/vignettes/Predict_CaseControl_from_CNV.Rmd @@ -70,8 +70,8 @@ out <- buildPredictor_sparseGenetic( path_GRList, outDir=outDir, ## absolute path numSplits=3L, featScoreMax=3L, - enrichLabels=TRUE,numPermsEnrich=20L, - numCores=2L,debugMode=TRUE) + enrichLabels=TRUE,numPermsEnrich=3L, + numCores=2L) # plot ROC curve. Note that the denominator only includes # patients with events in networks that are label-enriched @@ -197,7 +197,7 @@ out <- path_GRList, outDir=outDir, ## absolute path numSplits=3L, featScoreMax=3L, - enrichLabels=TRUE,numPermsEnrich=20L, + enrichLabels=TRUE,numPermsEnrich=3L, numCores=2L) ``` diff --git a/vignettes/SmoothMutationsUsingInteractionNets.Rmd b/vignettes/SmoothMutationsUsingInteractionNets.Rmd index 5587b191..1ecfeb48 100644 --- a/vignettes/SmoothMutationsUsingInteractionNets.Rmd +++ b/vignettes/SmoothMutationsUsingInteractionNets.Rmd @@ -12,6 +12,12 @@ vignette: > %\VignetteEncoding{UTF-8} --- +```{r, include = FALSE} +is_check <- ("CheckExEnv" %in% search()) || any(c("_R_CHECK_TIMINGS_", + "_R_CHECK_LICENSE_") %in% names(Sys.getenv())) +knitr::opts_chunk$set(eval = !is_check) +``` + # TL;DR This code block is not evaluated. Need a breakdown? Look at the following sections. ```{r,eval=FALSE}