Many studies include data from assays which have not been integrated into the DataSpace. Some of these are available as “Non-Integrated Datasets,” which can be downloaded from the app as a zip file.
DataSpaceR provides an interface for accessing non-integrated data from studies where it is available.
Methods on the DataSpace Study object allow you to see what non-integrated data may be available before downloading it. We will be using HVTN 505 as an example.
library(DataSpaceR) con <- connectDS() vtn505 <- con$getStudy("vtn505") vtn505 #> <DataSpaceStudy> #> Study: vtn505 #> URL: https://dataspace.cavd.org/CAVD/vtn505 #> Available datasets: #> - BAMA #> - Demographics #> - ICS #> - NAb #> Available non-integrated datasets: #> - ADCP #> - DEM SUPP #> - Fc Array
The print method on the study object will list available non-integrated datasets. The
availableDatasets property shows some more info about available datasets, with the
integrated field indicating whether the data is integrated. The value for
n will be
NA for non-integrated data until the dataset has been loaded.
|BAMA||Binding Ab multiplex assay||10260||TRUE|
|ICS||Intracellular Cytokine Staining||22684||TRUE|
|DEM SUPP||Demographics (Supplemental)||NA||FALSE|
|Fc Array||Fc Array||NA||FALSE|
Non-Integrated datasets can be loaded with
getDataset like integrated data. This will unzip the non-integrated data to a temp directory and load it into the environment.
You can also view the file format info using
getDatasetDescription. For non-integrated data, this will open a pdf into your computer’s default pdf viewer.
Non-integrated data is downloaded to a temp directory by default. There are a couple of ways to override this if desired. One is to specify
outputDir when calling
If you will be accessing the data at another time and don’t want to have to re-download it, you can change the default directory for the whole study object with
If the dataset already exists in the specified
outputDir, it will be not be downloaded. This can be overridden with
reload=TRUE, which forces a re-download.
sessionInfo() #> R version 4.0.2 (2020-06-22) #> Platform: x86_64-apple-darwin17.0 (64-bit) #> Running under: macOS Catalina 10.15.6 #> #> Matrix products: default #> BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib #> LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib #> #> locale: #>  en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 #> #> attached base packages: #>  stats graphics grDevices utils datasets methods base #> #> other attached packages: #>  knitr_1.29 data.table_1.13.0 testthat_2.3.2 DataSpaceR_0.7.4 #> #> loaded via a namespace (and not attached): #>  Rcpp_1.0.5 compiler_4.0.2 pryr_0.1.4 highr_0.8 tools_4.0.2 digest_0.6.25 jsonlite_1.7.0 #>  evaluate_0.14 rlang_0.4.7 cli_2.0.2 rstudioapi_0.11 crosstalk_184.108.40.206 curl_4.3 yaml_2.2.1 #>  xfun_0.16 httr_1.4.2 stringr_1.4.0 htmlwidgets_1.5.1 DT_0.15 webshot_0.5.2 glue_1.4.1 #>  R6_2.4.1 processx_3.4.3 fansi_0.4.1 Rlabkey_2.5.2 rmarkdown_2.3 callr_3.4.3 magrittr_1.5 #>  codetools_0.2-16 ps_1.3.4 htmltools_0.5.0 assertthat_0.2.1 stringi_1.4.6 crayon_1.3.4