| DataSpaceConnection {DataSpaceR} | R Documentation |
The DataSpaceConnection class
Description
The DataSpaceConnection class
The DataSpaceConnection class
Constructor
Active bindings
configA list. Stores configuration of the connection object such as URL, path and username.
availableStudiesA data.table. The table of available studies.
availableGroupsA data.table. The table of available groups.
availablePublicationsA data.table. The table of available publications.
mabGridSummaryA data.table. The filtered grid with updated
n_columns andgeometric_mean_curve_ic50.mabGridA data.table. The filtered mAb grid.
virusMetadataA data.table. Metadata about all viruses in the DataSpace.
virusNameMappingTablesA list of data.table objects. This list contains 'virusMetadataAll', 'virusLabId', and 'virus_synonym' which are described in the vignette 'Virus_Name_Mapping_Tables'.
Methods
Public methods
Method new()
Initialize a DataSpaceConnection object.
See connectDS.
Usage
DataSpaceConnection$new( login = NULL, password = NULL, verbose = FALSE, onStaging = FALSE )
Arguments
loginA character. Optional argument. If there is no netrc file a temporary one can be written by passing login and password of an active DataSpace account.
passwordA character. Optional. The password for the selected login.
verboseA logical. Whether to print the extra details for troubleshooting.
onStagingA logical. Whether to connect to the staging server instead of the production server.
Returns
A new 'DataSpaceConnection' object.
Method print()
Print the DataSpaceConnection object.
Usage
DataSpaceConnection$print()
Method getStudy()
Create a DataSpaceStudy object.
Usage
DataSpaceConnection$getStudy(studyName)
Arguments
studyNameA character. Name of the study to retrieve.
Method getGroup()
Create a DataSpaceStudy object.
Usage
DataSpaceConnection$getGroup(groupId)
Arguments
groupIdAn integer. ID of the group to retrieve.
Method filterMabGrid()
Filter rows in the mAb grid by specifying the values to keep in the
columns found in the mabGrid field. It takes the column and the
values and filters the underlying tables.
Usage
DataSpaceConnection$filterMabGrid(using, value)
Arguments
usingA character. Name of the column to filter.
valueA character vector. Values to keep in the mAb grid.
Method resetMabGrid()
Reset the mAb grid to the unfiltered state.
Usage
DataSpaceConnection$resetMabGrid()
Method getMab()
Create a DataSpaceMab object.
Usage
DataSpaceConnection$getMab()
Method downloadPublicationData()
Download publication data for a chosen publication.
Usage
DataSpaceConnection$downloadPublicationData( publicationId, outputDir = getwd(), unzip = TRUE, verbose = TRUE )
Arguments
publicationIdA character/integer. ID for the publication to download data for.
outputDirA character. Path to directory to download publication data.
unzipA logical. If TRUE, unzip publication data to outputDir.
verboseA logical. Default TRUE.
Method refresh()
Refresh the connection object to update available studies and groups.
Usage
DataSpaceConnection$refresh()
Method clone()
The objects of this class are cloneable with this method.
Usage
DataSpaceConnection$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Examples
## Not run:
# Create a connection (Initiate a DataSpaceConnection object)
con <- connectDS()
con
# Connect to cvd408
# https://dataspace.cavd.org/cds/CAVD/app.view#learn/learn/Study/cvd408?q=408
cvd408 <- con$getStudy("cvd408")
# Connect to all studies
cvd <- con$getStudy("cvd408")
# Connect to the NYVAC durability comparison group
# https://dataspace.cavd.org/cds/CAVD/app.view#group/groupsummary/220
nyvac <- con$getGroup(220)
# Refresh the connection object to update available studies and groups
con$refresh()
## End(Not run)