From 54c12fda1129fc80542e34d45ccf36a392385ef8 Mon Sep 17 00:00:00 2001 From: skannan4 Date: Mon, 28 Jan 2019 16:30:52 -0500 Subject: [PATCH 1/2] Update tsp_rf.R Update to make ncores a parameter in ptGetTop --- R/tsp_rf.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/tsp_rf.R b/R/tsp_rf.R index 26f5848..3383aca 100644 --- a/R/tsp_rf.R +++ b/R/tsp_rf.R @@ -1,5 +1,6 @@ # for TSP-RF # (C) 2018 Patrick Cahan +# EDITED BY SK - changed memory usage in ptGetTop @@ -131,12 +132,12 @@ ptGetTop<-function (expDat, cell_labels, topX=50, - sliceSize = 5e3){ + sliceSize = 5e3, + ncores = detectCores()){ ans<-vector() genes<-rownames(expDat) - - ncores <- detectCores() + mcCores <- 1 if(ncores>1){ mcCores <- ncores - 1 From 2c91d3a05bbbb5857c6af9a4cc691124b977b1ca Mon Sep 17 00:00:00 2001 From: skannan4 Date: Mon, 28 Jan 2019 17:58:50 -0500 Subject: [PATCH 2/2] Update tsp_rf.R --- R/tsp_rf.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/tsp_rf.R b/R/tsp_rf.R index 3383aca..e02c1e8 100644 --- a/R/tsp_rf.R +++ b/R/tsp_rf.R @@ -1,6 +1,5 @@ # for TSP-RF # (C) 2018 Patrick Cahan -# EDITED BY SK - changed memory usage in ptGetTop @@ -134,7 +133,7 @@ ptGetTop<-function topX=50, sliceSize = 5e3, ncores = detectCores()){ - +#Change by SK to allow ncores as a user-selected parameter (default to original value, which was number of detected cores) ans<-vector() genes<-rownames(expDat)