Skip to content

Commit

Permalink
declarations for no global bindings error
Browse files Browse the repository at this point in the history
  • Loading branch information
shraddhapai committed Sep 24, 2020
1 parent 46733dd commit c87086f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
1 change: 0 additions & 1 deletion R/plotIntegratedPatientNetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,5 @@ if (plotCytoscape) {
)
}


return(out)
}
3 changes: 3 additions & 0 deletions R/plot_tSNE.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions R/runQuery.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions R/smooMutationPropagation.R
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions vignettes/Predict_CaseControl_from_CNV.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
```

Expand Down
6 changes: 6 additions & 0 deletions vignettes/SmoothMutationsUsingInteractionNets.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit c87086f

Please sign in to comment.