Connect to any FASTGenomics instance and manipulate / retrieve data.
You can install the development version like this:
install.packages("devtools")
library(devtools)
install_github("FASTGenomics/r_client")
You need to get a bearer token to use this api. You can get this token at: https://fastgenomics.org/ids/Account/ApiTokenLogin
WARNING: Never commit this token to a repository or share it otherwise! It can be used to impersonate you
connection <- fastgenomicsRclient::connect("https://fastgenomics.org/", "Bearer Token")
datasets <- fastgenomicsRclient::get_datasets(connection)
print(datasets@content) # all datasets available to you
If you want the unit tests of this package, set two envrionment variables
Sys.setenv(FGBEARERTOKEN = "YOUR TOKEN")
Sys.setenv(FGBASEURL = "URL")
then run the tests through RStudio (Build -> Test Pakcage) or run
devtools::test()
If you encounter an HTTP2 framing error try disabling HTTP2 with
library("httr")
httr::set_config(config(http_version = 0))
If you get 403 FORBIDDEN errors when using the API, your user account has not the necessary permissions for an operation. Please contact us at feedback@fastgenomics.org to get access to such functions.
We internally use the
zip
function, which by default uses a system-dependent compression program
("zip"
by default). Make sure to have zip installed if you wan to
submit compressed data. On Windows one solution is to get it with
the Rtools package,
just make sure to check the update PATH checkbox when installing it.