Access to the RP4 metabolites requires an additional account to the molgenis RP4 database.
BBMRIomics provides molgenis.connect
to connect to the molgenis database using its RESTfull-API and molgenis.get.all
for extraction of the data.
If a molgenis.token
is available in the global environment your are ready to extract the data.
biobanks <- molgenis.get.all("biobanks", verbose = FALSE)
biobanks$abbreviation
table(biobanks$use_of_beta_blockers)
biobanks$abbreviation[biobanks$use_of_beta_blockers]
measurements <- molgenis.get.all("measurements")
measurements$biobank <- gsub("-.*$", "", measurements$sample_id)
biobank_ordered <- with(measurements, reorder(biobank, lac, median, na.rm = TRUE))
gp <- ggplot(measurements, aes(biobank_ordered, lac))
gp <- gp + geom_boxplot()
gp <- gp + theme(axis.text.x = element_text(angle = 90, hjust = 0, size = 7))
gp
TODO Erik/Jurriaan example script?