Skip to content

Commit dd1f858

Browse files
update function calls to reflect the new names
1 parent eb28dc7 commit dd1f858

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

example.R

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,57 @@
11
# Name: example.R
22
# Purpose: Example set of function calls to query and retrieve data from BMS in use case scenario
33
# Author: Khaled Al-Shamaa <[email protected]>
4-
# Version: 0.1
4+
# Version: 0.2
55
# Revision: v0.1 - 24 Jul 2019 - initial version
6+
# v0.2 - 20 Aug 2019 - update function calls to reflect the new names
67
# License: GPLv3
78

89
# include and load required libraries
910
source("qbms.R")
1011

1112
# config your BMS connection
12-
qbmsConfig$server <- "bms.icarda.org"
13+
qbms_config$server <- "bms.icarda.org"
1314

1415
# if you are not connecting BMS server using SSL layer,
1516
# then comment the following two lines
16-
qbmsConfig$protocol <- "https://"
17-
qbmsConfig$port <- 18443
17+
qbms_config$protocol <- "https://"
18+
qbms_config$port <- 18443
1819

19-
# login using your BMS account
20-
qbmsLogin()
20+
# login using your BMS account (interactive mode)
21+
# You can pass BMS username and password as parameters (batch mode)
22+
login_bms()
2123

2224
# list supported crops in the bms server
23-
listCrops()
24-
setCrop("Tutorial1")
25+
list_crops()
26+
27+
set_crop("Tutorial1")
2528

2629
# list existing breeding programs
27-
listPrograms()
30+
list_programs()
31+
2832
# select a breeding program by name
29-
setProgram("Training Breeding Program")
33+
set_program("Training Breeding Program")
3034

3135
# list all studies/trials in the selected program
32-
listTrials()
33-
listTrials(2017)
36+
list_trials()
37+
list_trials(2017)
38+
3439
# select a specific study/trial by name
35-
setTrial("CIDTN-2016")
40+
set_trial("CIDTN-2016")
41+
42+
# get observation variable ontology
43+
ontology <- get_trial_obs_ontology()
3644

3745
# list all environments/locations in the selected study/trial
38-
listStudies()
46+
list_studies()
47+
3948
# select a specific environment/location dataset
40-
setStudy("FLRP")
49+
set_study("FLRP")
4150

42-
# retrive general information, data, and germplasm list of the selected environment/location
43-
info <- getStudyInfo()
44-
data <- getStudyData()
45-
germplasm <- getGermplasmList()
51+
# retrieve general information, data, and germplasm list of the selected environment/location
52+
info <- get_study_info()
53+
data <- get_study_data()
54+
germplasm <- get_germplasm_list()
4655

4756
# retrive multi-environment trial data
48-
MET <- getTrialData()
57+
MET <- get_trial_data()

0 commit comments

Comments
 (0)