Using the DataSpace app, the workflow of using the mAb grid is the following:
DataSpaceR offers a similar interface:
con$getMab()to retrieve the mAb data
You can browse the mAb Grid by calling the
mabGridSummary field in the connection object:
This table is designed to mimic the mAb grid found in the app.
One can also access the unsummarized data from the mAb grid by calling
You can filter rows in the grid by specifying the values to keep in the columns found in the field
filterMabGrid takes the column and the values and filters the underlying tables (private fields), and when you call the
mabGridSummary or (which is actually an active binding), it returns the filtered grid with updated
n_ columns and
# filter the grid by viruses con$filterMabGrid(using = "virus", value = c("242-14", "Q23.17", "6535.3", "BaL.26", "DJ263.8")) # filter the grid by donor species (llama) con$filterMabGrid(using = "donor_species", value = "llama") # check the updated grid DT::datatable(con$mabGridSummary, options = list(autoWidth = TRUE, scrollX = TRUE))
Or we can use method chaining to call multiple filter methods and browse the grid. Method chaining is unique to R6 objects and related to the pipe. See Hadley Wickham’s Advanced R for more info
You can retrieve values from the grid by
studies, or any variables found in the
mabGrid field in the connection object via
After filtering the grid, you can create a DataSpaceMab object that contains the filtered mAb data.
There are 6 public fields available in the
variableDefinitions, and they are equivalent to the sheets in the excel file or the csv files you would download from the app via “Export Excel”/“Export CSV”.
There are several metadata fields that can be exported in the mAb object.
sessionInfo() #> R version 3.6.2 (2019-12-12) #> Platform: x86_64-apple-darwin15.6.0 (64-bit) #> Running under: macOS Catalina 10.15.2 #> #> Matrix products: default #> BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib #> LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib #> #> locale: #>  C/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: #>  DataSpaceR_0.7.3 #> #> loaded via a namespace (and not attached): #>  Rcpp_1.0.3 Rlabkey_2.3.3 knitr_1.26 magrittr_1.5 #>  xtable_1.8-4 R6_2.4.1 rlang_0.4.2 fastmap_1.0.1 #>  stringr_1.4.0 httr_1.4.1 highr_0.8 tools_3.6.2 #>  DT_0.10 data.table_1.12.8 xfun_0.11 htmltools_0.4.0 #>  crosstalk_1.0.0 yaml_2.2.0 digest_0.6.23 assertthat_0.2.1 #>  shiny_1.4.0 later_1.0.0 promises_1.1.0 htmlwidgets_1.5.1 #>  curl_4.3 mime_0.7 evaluate_0.14 rmarkdown_2.0 #>  stringi_1.4.3 compiler_3.6.2 jsonlite_1.6 httpuv_1.5.2