Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5e8e1d0
refactor for last functions
timcadman Sep 22, 2026
3a4bc5f
added test coverage
timcadman Sep 22, 2026
35b16a2
Merge branch 'v7.0-dev' of github.com:datashield/dsBaseClient into re…
timcadman Sep 25, 2026
4b5e89b
rebuilt tar
timcadman Sep 25, 2026
9a159b1
Update 'perf' profiles
StuartWheater Sep 25, 2026
6cb5423
fixed lint errors
timcadman Sep 25, 2026
cd6b507
Modify performance values in opal_github-workflows_perf-profile.csv
StuartWheater Sep 26, 2026
9b76ac2
Update perf profiles
StuartWheater Sep 26, 2026
a7a5402
Modify performance data for ds.setSeed
StuartWheater Sep 26, 2026
ba903be
Merge branch 'datashield:refactor/perf-batch-11' into refactor/perf-b…
StuartWheater Sep 27, 2026
bc719ff
Update performance metrics in opal_github-workflows_perf-profile.csv
StuartWheater Sep 27, 2026
ecc66c1
Update performance metrics in opal_github-workflows_perf-profile.csv
StuartWheater Sep 27, 2026
d04ab4a
Revise performance data in armadillo_github-workflows_perf-profile.csv
StuartWheater Sep 27, 2026
582b1d8
Merge pull request #715 from StuartWheater/refactor/perf-batch-11
StuartWheater Sep 28, 2026
71c98f4
Update 'perf' profiles
StuartWheater Sep 28, 2026
f4f0db5
Update 'perf' profiles
StuartWheater Sep 28, 2026
034e692
Update 'perf' profiles
StuartWheater Sep 28, 2026
e19e4ef
Update 'perf' profiles
StuartWheater Sep 28, 2026
6deacc1
Update 'perf' profiles
StuartWheater Sep 29, 2026
e0ad7d6
Changed 'perf' profiles limits 1/3 and 3 time expected
StuartWheater Sep 30, 2026
47ac66a
Changed 'perf' profiles
StuartWheater Sep 30, 2026
a1865b8
Merge pull request #716 from StuartWheater/refactor-batch-11
StuartWheater Oct 5, 2026
286dd07
Update to Armadillo perf profile
StuartWheater Oct 12, 2026
a3cd518
Merge pull request #717 from StuartWheater/refactor-batch-11
StuartWheater Oct 12, 2026
15aaa11
Fixing line length (over 100) problems/notes
StuartWheater Oct 12, 2026
a3ba889
Merge pull request #78 from StuartWheater/refactor-batch-11
StuartWheater Oct 12, 2026
072c282
Fixed type
StuartWheater Oct 12, 2026
2cf14aa
Merge branch 'refactor/perf-batch-11' of github.com:StuartWheater/dsB…
StuartWheater Oct 12, 2026
ec01997
Updating roxygen2 to version: 8.1.1, plus side effects
StuartWheater Oct 12, 2026
33ff862
Merge pull request #719 from StuartWheater/refactor/perf-batch-11
StuartWheater Oct 13, 2026
503218e
updated with dev7.0
timcadman Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ Suggests:
DSLite
Encoding: UTF-8
Language: en-GB
Config/roxygen2/version: 8.1.0
Config/roxygen2/version: 8.1.1
15 changes: 2 additions & 13 deletions R/ds.auc.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
#' @return returns the AUC and its standard error
#' @author Demetris Avraam for DataSHIELD Development Team
#' @author Tim Cadman, Genomics Coordination Centre, UMCG, Netherlands
#' @export
#'
ds.auc <- function(pred=NULL, y=NULL, datasources=NULL){

# look for DS connections
if(is.null(datasources)){
datasources <- DSI::datashield.connections_find()
}

# ensure datasources is a list of DSConnection-class
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
}
datasources <- .set_datasources(datasources)

# verify that 'pred' was set
if(is.null(pred)){
Expand All @@ -35,10 +28,6 @@ ds.auc <- function(pred=NULL, y=NULL, datasources=NULL){
stop("Please provide the name of the outcome variable", call.=FALSE)
}

# check if the pred and y objects are defined in all the studies
defined.pred <- isDefined(datasources, pred)
defined.y <- isDefined(datasources, y)

cally <- call('aucDS', pred, y)
output <- DSI::datashield.aggregate(datasources, cally)

Expand Down
17 changes: 2 additions & 15 deletions R/ds.bp_standards.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,13 @@
#' blood pressure in children and adolescents:
#' https://www.nhlbi.nih.gov/sites/default/files/media/docs/hbp_ped.pdf
#' @author Demetris Avraam for DataSHIELD Development Team
#' @author Tim Cadman, Genomics Coordination Centre, UMCG, Netherlands
#' @import data.table
#' @export
ds.bp_standards <- function(sex=NULL, age=NULL, height=NULL, bp=NULL, systolic=TRUE,
newobj=NULL, datasources=NULL){

# look for DS connections
if(is.null(datasources)){
datasources <- DSI::datashield.connections_find()
}

# ensure datasources is a list of DSConnection-class
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
}
datasources <- .set_datasources(datasources)

# verify that 'sex' was set
if(is.null(sex)){
Expand All @@ -61,12 +54,6 @@ ds.bp_standards <- function(sex=NULL, age=NULL, height=NULL, bp=NULL, systolic=T
stop("Please provide the name of the blood pressure variable", call.=FALSE)
}

# check if the input objects are defined in all the studies
defined.sex <- isDefined(datasources, sex)
defined.age <- isDefined(datasources, age)
defined.height <- isDefined(datasources, height)
defined.bp <- isDefined(datasources, bp)

# if no output object specified then provide a default name
if(is.null(newobj)){
newobj <- "bp.newobj"
Expand Down
11 changes: 2 additions & 9 deletions R/ds.exists.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#' @return \code{ds.exists} returns a logical object.
#' TRUE if the object is on the server-side and FALSE otherwise.
#' @author DataSHIELD Development Team
#' @author Tim Cadman, Genomics Coordination Centre, UMCG, Netherlands
#' @seealso \code{\link{ds.class}} to check the type of an object.
#' @seealso \code{\link{ds.length}} to check the length of an object.
#' @seealso \code{\link{ds.dim}} to check the dimension of an object.
Expand Down Expand Up @@ -61,15 +62,7 @@
#'
ds.exists <- function(x=NULL, datasources=NULL){

# look for DS connections
if(is.null(datasources)){
datasources <- datashield.connections_find()
}

# ensure datasources is a list of DSConnection-class
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
}
datasources <- .set_datasources(datasources)

if(is.null(x)){
stop("Please provide the name of the input object!", call.=FALSE)
Expand Down
17 changes: 2 additions & 15 deletions R/ds.igb_standards.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,13 @@
#' }
#' @return assigns the converted measurement as a new object on the server-side
#' @author Demetris Avraam for DataSHIELD Development Team
#' @author Tim Cadman, Genomics Coordination Centre, UMCG, Netherlands
#' @export
#'
ds.igb_standards <- function(gagebrth=NULL, z=0, p=50, val=NULL, var=NULL, sex=NULL,
fun='igb_value2zscore', newobj=NULL, datasources=NULL){

# look for DS connections
if(is.null(datasources)){
datasources <- datashield.connections_find()
}

# ensure datasources is a list of DSConnection-class
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
}
datasources <- .set_datasources(datasources)

# check if user has provided the name of the input variables
if(is.null(gagebrth)){
Expand All @@ -59,10 +52,6 @@ ds.igb_standards <- function(gagebrth=NULL, z=0, p=50, val=NULL, var=NULL, sex=N
stop("Please provide the name of the sex variable", call.=FALSE)
}

# check if the input objects are defined in all the studies
isDefined(datasources, gagebrth)
isDefined(datasources, sex)

# check if the provided fun is valid
if(!(fun %in% c("igb_centile2value","igb_zscore2value","igb_value2zscore","igb_value2centile"))){
stop("Please provide a valid fun", call.=FALSE)
Expand All @@ -72,8 +61,6 @@ ds.igb_standards <- function(gagebrth=NULL, z=0, p=50, val=NULL, var=NULL, sex=N
if(fun %in% c("igb_value2zscore","igb_value2centile")){
if(is.null(val)){
stop("Please provide the name of the val variable", call.=FALSE)
}else{
isDefined(datasources, val)
}
}

Expand Down
11 changes: 2 additions & 9 deletions R/ds.listDisclosureSettings.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#' @return \code{ds.listDisclosureSettings} returns a list containing the current settings of the
#' \code{nfilters} in each study specified.
#' @author DataSHIELD Development Team
#' @author Tim Cadman, Genomics Coordination Centre, UMCG, Netherlands
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -100,15 +101,7 @@
#' }
#'
ds.listDisclosureSettings <- function(datasources=NULL){
# look for DS connections
if(is.null(datasources)){
datasources <- datashield.connections_find()
}

# ensure datasources is a list of DSConnection-class
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
}
datasources <- .set_datasources(datasources)

# CALL THE MAIN SERVER SIDE FUNCTION
calltext <- call("listDisclosureSettingsDS")
Expand Down
26 changes: 12 additions & 14 deletions R/ds.mdPattern.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained
#' after login. If the \code{datasources} argument is not specified, the default set of
#' connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
#' @template classConsistencyCheckTrue
#' @return For type='split': A list with one element per study, each containing:
#' \describe{
#' \item{pattern}{The missing data pattern matrix for that study}
Expand All @@ -60,6 +61,7 @@
#' \item{message}{A message describing the validity status}
#' }
#' @author Xavier Escribà montagut for DataSHIELD Development Team
#' @author Tim Cadman, Genomics Coordination Centre, UMCG, Netherlands
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -111,17 +113,9 @@
#' datashield.logout(connections)
#' }
#'
ds.mdPattern <- function(x = NULL, type = 'split', datasources = NULL){
ds.mdPattern <- function(x = NULL, type = 'split', datasources = NULL, classConsistencyCheck = TRUE){

# Look for DS connections
if(is.null(datasources)){
datasources <- datashield.connections_find()
}

# Ensure datasources is a list of DSConnection-class
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
}
datasources <- .set_datasources(datasources)

if(is.null(x)){
stop("Please provide the name of a data frame or matrix!", call.=FALSE)
Expand All @@ -134,10 +128,14 @@ ds.mdPattern <- function(x = NULL, type = 'split', datasources = NULL){
cally <- call("mdPatternDS", x)
results <- DSI::datashield.aggregate(datasources, cally)

if(classConsistencyCheck){
.checkClassConsistency(results)
}

# Process results based on type
if(type == "split"){
# Return individual study results
return(results)
return(lapply(results, function(r) { r$class <- NULL; r }))

} else if(type == "combine"){
# Pool results across studies
Expand Down Expand Up @@ -176,7 +174,7 @@ ds.mdPattern <- function(x = NULL, type = 'split', datasources = NULL){
}

# Pool the patterns
pooled_pattern <- .pool_md_patterns(patterns_list, study_names)
pooled_pattern <- .poolMdPatterns(patterns_list, study_names)

# Check validity of pooled results
# Get threshold from first study's results or use a default check
Expand Down Expand Up @@ -217,8 +215,8 @@ ds.mdPattern <- function(x = NULL, type = 'split', datasources = NULL){
#' @param patterns_list List of pattern matrices from each study
#' @param study_names Names of the studies
#' @return Pooled pattern matrix
#' @keywords internal
.pool_md_patterns <- function(patterns_list, study_names){
#' @noRd
.poolMdPatterns <- function(patterns_list, study_names){

# Initialize with first study's pattern structure
pooled <- patterns_list[[1]]
Expand Down
11 changes: 2 additions & 9 deletions R/ds.rm.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#' is successful the message \code{"Object(s) '<x.names>' was deleted."} is returned
#' to the client-side.
#' @author DataSHIELD Development Team
#' @author Tim Cadman, Genomics Coordination Centre, UMCG, Netherlands
#' @examples
#' \dontrun{
#'
Expand Down Expand Up @@ -68,15 +69,7 @@

ds.rm<-function(x.names=NULL, datasources=NULL){

# look for DS connections
if (is.null(datasources)) {
datasources <- datashield.connections_find()
}

# ensure datasources is a list of DSConnection-class
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
}
datasources <- .set_datasources(datasources)

if (is.null(x.names)) {
stop("Please provide the names of the objects to be deleted (eg 'object.name') as the x.names argument", call.=FALSE)
Expand Down
Binary file modified dsBase_7.0.0-permissive.tar.gz
Binary file not shown.
20 changes: 0 additions & 20 deletions man/dot-pool_md_patterns.Rd

This file was deleted.

2 changes: 2 additions & 0 deletions man/ds.auc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/ds.bp_standards.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/ds.exists.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/ds.igb_standards.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/ds.listDisclosureSettings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion man/ds.mdPattern.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/ds.rm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading