-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update function calls to reflect the new names
- Loading branch information
1 parent
eb28dc7
commit dd1f858
Showing
1 changed file
with
29 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,57 @@ | ||
# Name: example.R | ||
# Purpose: Example set of function calls to query and retrieve data from BMS in use case scenario | ||
# Author: Khaled Al-Shamaa <k.el-shamaa@cgiar.org> | ||
# Version: 0.1 | ||
# Version: 0.2 | ||
# Revision: v0.1 - 24 Jul 2019 - initial version | ||
# v0.2 - 20 Aug 2019 - update function calls to reflect the new names | ||
# License: GPLv3 | ||
|
||
# include and load required libraries | ||
source("qbms.R") | ||
|
||
# config your BMS connection | ||
qbmsConfig$server <- "bms.icarda.org" | ||
qbms_config$server <- "bms.icarda.org" | ||
|
||
# if you are not connecting BMS server using SSL layer, | ||
# then comment the following two lines | ||
qbmsConfig$protocol <- "https://" | ||
qbmsConfig$port <- 18443 | ||
qbms_config$protocol <- "https://" | ||
qbms_config$port <- 18443 | ||
|
||
# login using your BMS account | ||
qbmsLogin() | ||
# login using your BMS account (interactive mode) | ||
# You can pass BMS username and password as parameters (batch mode) | ||
login_bms() | ||
|
||
# list supported crops in the bms server | ||
listCrops() | ||
setCrop("Tutorial1") | ||
list_crops() | ||
|
||
set_crop("Tutorial1") | ||
|
||
# list existing breeding programs | ||
listPrograms() | ||
list_programs() | ||
|
||
# select a breeding program by name | ||
setProgram("Training Breeding Program") | ||
set_program("Training Breeding Program") | ||
|
||
# list all studies/trials in the selected program | ||
listTrials() | ||
listTrials(2017) | ||
list_trials() | ||
list_trials(2017) | ||
|
||
# select a specific study/trial by name | ||
setTrial("CIDTN-2016") | ||
set_trial("CIDTN-2016") | ||
|
||
# get observation variable ontology | ||
ontology <- get_trial_obs_ontology() | ||
|
||
# list all environments/locations in the selected study/trial | ||
listStudies() | ||
list_studies() | ||
|
||
# select a specific environment/location dataset | ||
setStudy("FLRP") | ||
set_study("FLRP") | ||
|
||
# retrive general information, data, and germplasm list of the selected environment/location | ||
info <- getStudyInfo() | ||
data <- getStudyData() | ||
germplasm <- getGermplasmList() | ||
# retrieve general information, data, and germplasm list of the selected environment/location | ||
info <- get_study_info() | ||
data <- get_study_data() | ||
germplasm <- get_germplasm_list() | ||
|
||
# retrive multi-environment trial data | ||
MET <- getTrialData() | ||
MET <- get_trial_data() |