diff --git a/DESCRIPTION b/DESCRIPTION index 41b3dd9..ff044be 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: brapi Title: Client to Access Breeding Databases Using BrAPI -Version: 0.9.3 +Version: 0.9.4 Authors@R: c( person("Reinhard", "Simon", email = "rsimon64@gmail.com", role = c("aut", "cre")), person("Maikel", "Verouden", role = c("aut", "ctb") , email = "Maikel.Verouden@wur.nl"), diff --git a/NAMESPACE b/NAMESPACE index 6530ffa..04c0d8b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,6 +13,7 @@ export(ba_genomemaps) export(ba_genomemaps_data) export(ba_genomemaps_data_range) export(ba_genomemaps_details) +export(ba_germplasm_attributes) export(ba_germplasm_details) export(ba_germplasm_details_study) export(ba_germplasm_markerprofiles) diff --git a/R/ba_germplasm_attributes.R b/R/ba_germplasm_attributes.R new file mode 100644 index 0000000..d2c5ff0 --- /dev/null +++ b/R/ba_germplasm_attributes.R @@ -0,0 +1,80 @@ +#' ba_germplasm_attributes +#' +#' germplasm_attibutes call. +#' +#' @param con brapi connection object +#' @param rclass character; default: tibble; or else: json, list, data.frame. +#' @param germplasmDbId character; default: ''. +#' @param attributeList character vector; default: ''. +#' @param page integer; default: 0. +#' @param pageSize integer; default: 10. +#' +#' @return rclass as set by parameter. +#' @example inst/examples/ex-ba_germplasmattributes_details.R +#' @import httr +#' @author Reinhard Simon +#' @references \href{https://github.com/plantbreeding/API/blob/master/Specification/GermplasmAttributes/GermplasmAttributeValuesByGermplasmDbId.md}{github} +#' @family germplasmattributes +#' @family genotyping +#' @export +ba_germplasm_attributes <- function(con = NULL, + germplasmDbId = "", + attributeList = "", + page = 0, + pageSize = 10, + rclass = "tibble") { + ba_check(con = con, verbose = FALSE) + stopifnot(is.character(germplasmDbId)) + stopifnot(germplasmDbId != "") + stopifnot(is.character(attributeList)) + check_paging(pageSize = pageSize, page = page) + check_rclass(rclass = rclass) + # fetch the url of the brapi implementation of the database + brp <- get_brapi(con = con) + # generate the specific brapi call url + pattributeList <- ifelse(attributeList != "", paste("attributeList=", attributeList, collapse = ",", sep=""), "") + germplasm_attributes_list <- paste0(brp, + "germplasm/", + germplasmDbId, + "/attributes/?", + pattributeList, + + "&page=", + page, + "&pageSize=", + pageSize) + try({ + res <- brapiGET(url = germplasm_attributes_list, con = con) + res2 <- httr::content(x = res, as = "text", encoding = "UTF-8") + ms2tbl <- function(res) { + lst <- tryCatch( + jsonlite::fromJSON(txt = res) + ) + + assertthat::assert_that("data" %in% names(lst$result), + msg = "The json return object lacks a data element.") + dat <- jsonlite::toJSON(x = lst$result$data) + germplasmDbId <- lst$result$germplasmDbId + + df <- jsonlite::fromJSON(txt = dat, simplifyDataFrame = TRUE, + flatten = TRUE) + df <- cbind(germplasmDbId, df) + # assertthat::validate_that(nrow(df) > 0, + # msg = "The json return object lacks a data element.") + + return(df) + } + if (rclass %in% c("json", "list")) { + out <- dat2tbl(res = res2, rclass = rclass) + } + if (rclass == "data.frame") { + out <- ms2tbl(res = res2)%>% tibble::as_tibble() %>% as.data.frame() + } + if (rclass == "tibble") { + out <- ms2tbl(res = res2) %>% tibble::as_tibble() + } + class(out) <- c(class(out), "ba_germplasmattributes_details") + show_metadata(res) + return(out) + }) +} diff --git a/R/ba_germplasm_markerprofiles.R b/R/ba_germplasm_markerprofiles.R index 2989569..cd8dc7d 100644 --- a/R/ba_germplasm_markerprofiles.R +++ b/R/ba_germplasm_markerprofiles.R @@ -29,7 +29,7 @@ ba_germplasm_markerprofiles <- function(con = NULL, out <- NULL ms2tbl <- function(res) { lst <- tryCatch( - jsonlite::fromJSON(txt = res2) + jsonlite::fromJSON(txt = res) ) assertthat::assert_that("result" %in% names(lst), @@ -37,18 +37,22 @@ ba_germplasm_markerprofiles <- function(con = NULL, dat <- jsonlite::toJSON(x = lst$result) df <- jsonlite::fromJSON(txt = dat, simplifyDataFrame = TRUE, flatten = TRUE) + if(length(df$markerprofileDbIds) == 0) { + df$markerprofileDbIds <- '' + } - assertthat::assert_that(all(c("germplasmDbId", - "markerprofileDbIds") %in% - names(df)), - msg = "The json return object lacks germplasmDbId and - markerprofileDbIds.") - assertthat::assert_that((length(df$markerprofileDbIds) >= 1), - msg = "No markerprofileDbIdas") - res3 <- as.data.frame(cbind(germplasmDbId = rep(df$germplasmDbId, - length(df$markerprofileDbIds)), - markerProfiles = df$markerprofileDbIds), - stringsAsFactors = FALSE) + res3 <- tibble::as.tibble(df) + # assertthat::assert_that(all(c("germplasmDbId", + # "markerprofileDbIds") %in% + # names(df)), + # msg = "The json return object lacks germplasmDbId and + # markerprofileDbIds.") + # # assertthat::assert_that((length(df$markerprofileDbIds) >= 1), + # # msg = "No markerprofileDbIdas") + # res3 <- as.data.frame(cbind(germplasmDbId = rep(df$germplasmDbId, + # length(df$markerprofileDbIds)), + # markerProfiles = df$markerprofileDbIds), + # stringsAsFactors = FALSE) return(res3) } if (rclass %in% c("json", "list")) { diff --git a/R/ba_germplasm_pedigree.R b/R/ba_germplasm_pedigree.R index 7a36679..d848ebb 100644 --- a/R/ba_germplasm_pedigree.R +++ b/R/ba_germplasm_pedigree.R @@ -37,10 +37,21 @@ ba_germplasm_pedigree <- function(con = NULL, lst <- jsonlite::fromJSON(txt = res) dat <- jsonlite::toJSON(x = lst$result) res3 <- jsonlite::fromJSON(txt = dat, simplifyDataFrame = TRUE) + for (i in 1:length(res3)) { + if (length(res3[[i]]) == 0) res[[i]] <- '' + } # Set null length list-type elements to '' for (i in 1:length(res3)) { if (length(res3[[i]]) == 0) res3[[i]] <- "" } + if (length(res3$siblings) > 1) { + siblings <- res3$siblings + names(siblings) <- paste0('siblings.', names(siblings)) + res3$siblings <- NULL + res3 <- tibble::as.tibble(res3) + res3 <- cbind(res3, siblings) + siblings <- NULL + } attr(res3, "metadata") <- lst$metadata return(res3) } diff --git a/R/ba_germplasmattributes.R b/R/ba_germplasmattributes.R index f7eb211..92b3fae 100644 --- a/R/ba_germplasmattributes.R +++ b/R/ba_germplasmattributes.R @@ -17,6 +17,7 @@ ba_germplasmattributes <- function(con = NULL, attributeCategoryDbId = "0", rclass = "tibble") { + ba_check(con = con, verbose = FALSE) stopifnot(is.character(attributeCategoryDbId)) check_rclass(rclass = rclass) diff --git a/R/ba_germplasmattributes_details.R b/R/ba_germplasmattributes_details.R index 4706bfa..60695c9 100644 --- a/R/ba_germplasmattributes_details.R +++ b/R/ba_germplasmattributes_details.R @@ -23,6 +23,7 @@ ba_germplasmattributes_details <- function(con = NULL, page = 0, pageSize = 10, rclass = "tibble") { + .Deprecated('ba_germplasm_attributes') ba_check(con = con, verbose = FALSE) stopifnot(is.character(germplasmDbId)) stopifnot(germplasmDbId != "") diff --git a/R/ba_studies_table.R b/R/ba_studies_table.R index 2ead3b4..177b8a0 100644 --- a/R/ba_studies_table.R +++ b/R/ba_studies_table.R @@ -11,7 +11,7 @@ #' @param rclass character; default: "tibble" possible other values: "json"/"list"/"data.frame" #' @param studyDbId character; default: '' #' @param con list; brapi connection object -#' @param format character; one of: json, csv, tsv. Default: json +#' @param format character; one of: json, csv, tsv. Default: csv #' #' @author Reinhard Simon, Maikel Verouden #' @references \href{https://github.com/plantbreeding/API/blob/master/Specification/Studies/StudyObservationUnitsAsTable.md}{github} @@ -25,7 +25,7 @@ #' @export ba_studies_table <- function(con = NULL, studyDbId = "", - format = "json", + format = "csv", rclass = "tibble") { ba_check(con = con, verbose = FALSE, brapi_calls = "studies/id/table") stopifnot(is.character(studyDbId)) @@ -46,6 +46,7 @@ ba_studies_table <- function(con = NULL, pformat)) try({ res <- brapiGET(url = studies_table, con = con) + }) res <- httr::content(x = res, as = "text", encoding = "UTF-8") out <- NULL if (rclass %in% c("json", "list")) { @@ -56,6 +57,8 @@ ba_studies_table <- function(con = NULL, res2 <- jsonlite::fromJSON(txt = res)$result out <- res2$data out <- tibble::as.tibble(out) + if(length(res2$headerRow) != length(colnames(out))) + stop('Header row length does not coincide with column count. Contact database provider.') colnames(out) <- res2$headerRow } if (format == "csv") { @@ -82,5 +85,5 @@ ba_studies_table <- function(con = NULL, } class(out) <- c(class(out), "ba_studies_table") return(out) - }) + } diff --git a/R/mpa2tbl.R b/R/mpa2tbl.R index 1275dca..7b63cbe 100644 --- a/R/mpa2tbl.R +++ b/R/mpa2tbl.R @@ -4,8 +4,11 @@ mpa2tbl <- function(res, rclass = "tibble") { dba <- jsonlite::fromJSON(txt = dat) udb <- unlist(dba) udb <- udb[!is.na(udb)] %>% as.data.frame(stringsAsFactors = FALSE) - udb <- as.data.frame(x = cbind(marker = rownames(udb), alleles = udb[, 1]), - stringsAsFactors = FALSE) + if (nrow(udb) > 0) { + udb <- as.data.frame(x = cbind(marker = rownames(udb), alleles = udb[, 1]), + stringsAsFactors = FALSE) + + } if (rclass == "tibble") { udb <- tibble::as_tibble(udb) } diff --git a/R/zzz.R b/R/zzz.R index ff74b14..338d854 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -5,7 +5,7 @@ You are using version ", utils::packageVersion("brapi"), "\n\n") txt <- paste( - "Please note that current support is complete for BrAPI version 1.1.\n + "Please note that current supports 44/44 BrAPI calls of version 1.1.\n Please note that current support is partially complete for BrAPI version 1.2 - the additional calls in version 1.2 are not yet supported.\n Also, checks on response objects and fields are only loosely implemented to accomodate differences diff --git a/README.Rmd b/README.Rmd index 747a10a..0b5c6d0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,9 +15,11 @@ output: github_document [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/brapi)](https://cran.r-project.org/package=brapi) [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) -## This version is still under development. The implementation sometimes changes minor details. +This version is still under development. The implementation sometimes changes minor details. -## Current support is only for BrAPI version 1.1. +Current support is mainly for BrAPI version 1.1. + +Support for version 1.2 is underway. For independent checks against database you may use http://webapps.ipk-gatersleben.de/brapivalidator. @@ -34,6 +36,7 @@ knitr::opts_chunk$set( # README An R package to use the [Breeding API (BrAPI)](http://docs.brapi.apiary.io) for accessing plant breeding data. +See the [documentation](https://cip-riu.github.io/brapi/) for details. It can be installed using: diff --git a/README.md b/README.md index 93bdcd8..59f7b60 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,12 @@ Status](https://img.shields.io/codecov/c/github/CIP-RIU/brapi/master.svg)](https [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/brapi)](https://cran.r-project.org/package=brapi) [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) -## This version is still under development. The implementation sometimes changes minor details. +This version is still under development. The implementation sometimes +changes minor details. -## Current support is only for BrAPI version 1.1. +Current support is mainly for BrAPI version 1.1. + +Support for version 1.2 is underway. For independent checks against database you may use . @@ -28,6 +31,7 @@ protocol changes. An R package to use the [Breeding API (BrAPI)](http://docs.brapi.apiary.io) for accessing plant breeding data. +See the [documentation](https://cip-riu.github.io/brapi/) for details. It can be installed using: diff --git a/docs/articles/index.html b/docs/articles/index.html index b25e1e0..0cc5e63 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -55,7 +55,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/articles/tutorial.html b/docs/articles/tutorial.html index 7c56c6d..0599132 100644 --- a/docs/articles/tutorial.html +++ b/docs/articles/tutorial.html @@ -29,7 +29,7 @@ brapi - 0.9.1 + 0.9.4 @@ -69,17 +69,13 @@ - - - - -
+

@@ -301,59 +323,61 @@

Which breeding programs are there?

-
ba_programs(sp_base, rclass = "data.frame")
+
ba_programs(sp_base, rclass = "data.frame")
## No encoding supplied: defaulting to UTF-8.
-
##   commonCropName leadPerson       name programDbId abbreviation
-## 1    SweetPotato            Mozambique         135             
-## 2    SweetPotato                Uganda         137             
-## 3    SweetPotato                 Ghana         140             
-## 4    SweetPotato                  NCSU         132             
-## 5    SweetPotato                  Lima         167             
-## 6    SweetPotato             GT4SP-CIP         293             
-##                           objective
-## 1                        Mozambique
-## 2                            Uganda
-## 3                             Ghana
-## 4 NCSU Sweetpotato Breeding Program
-## 5  Sweetpotato Breeding program CIP
-## 6    Genomics Tools for Sweetpotato
+
##    commonCropName leadPerson       name programDbId abbreviation
+## 1     SweetPotato            Mozambique         135             
+## 2     SweetPotato                Uganda         137             
+## 3     SweetPotato                 Ghana         140             
+## 4     SweetPotato                  NCSU         132             
+## 5     SweetPotato                  Lima         167             
+## 6     SweetPotato             GT4SP-CIP         293             
+## 7     SweetPotato                 Kenya        1264             
+## 8     SweetPotato                   RAB        1282             
+## 9     SweetPotato                 INERA        1286             
+## 10    SweetPotato                  AARC        1288             
+##                            objective
+## 1                         Mozambique
+## 2                             Uganda
+## 3                              Ghana
+## 4  NCSU Sweetpotato Breeding Program
+## 5   Sweetpotato Breeding program CIP
+## 6     Genomics Tools for Sweetpotato
+## 7              Demo Breeding Program
+## 8                             Rubona
+## 9                        Ouagadougou
+## 10                           Hawassa

Which studies are there?

-
ba_studies_search(sp_base, programDbId = "140")
+
ba_studies_search(sp_base, programDbId = "140")
## Using GET
## No encoding supplied: defaulting to UTF-8.
-
## # A tibble: 204 x 15
-##    seasons active programName locationDbId trialDbId endDate  studyName   
-##  * <chr>   <chr>  <chr>       <chr>            <int> <chr>    <chr>       
-##  1 2015    ""     Ghana       18                 230 2015-Ju… 15FOD07Tono 
-##  2 2015    ""     Ghana       26                 230 2015-Ju… 15FOD07Wa   
-##  3 2015    ""     Ghana       28                 230 2015-Ju… 15HST03Ny   
-##  4 2015    ""     Ghana       26                 230 <NA>     15HST04Wa   
-##  5 2015    ""     Ghana       16                 230 <NA>     15ayt7SP_Im…
-##  6 2016    ""     Ghana       16                 232 2016-Au… 16CIP-Ghana…
-##  7 2016    ""     Ghana       22                 232 2016-Ma… 16CIP-Ghana…
-##  8 2010    ""     Ghana       38                 284 2010-Ma… 2010ASPGH_A…
-##  9 2010    ""     Ghana       16                 284 2010-Ap… 2010ASPGH_A…
-## 10 2010    ""     Ghana       39                 284 2010-Ju… 2010ASPGH_A…
-## # ... with 194 more rows, and 8 more variables: trialName <chr>,
+
## # A tibble: 210 x 15
+##    seasons active programName name         locationDbId trialDbId endDate 
+##  * <chr>   <chr>  <chr>       <chr>        <chr>        <chr>     <chr>   
+##  1 2015    ""     Ghana       15FOD07Tono  18           230       2015-Ju…
+##  2 2015    ""     Ghana       15FOD07Wa    26           230       2015-Ju…
+##  3 2015    ""     Ghana       15HST03Ny    28           230       2015-Ju…
+##  4 2015    ""     Ghana       15HST04Wa    26           230       <NA>    
+##  5 2015    ""     Ghana       15ayt7SP_Im… 16           230       <NA>    
+##  6 2016    ""     Ghana       16CIP-Ghana… 16           232       2016-Au…
+##  7 2016    ""     Ghana       16CIP-Ghana… 22           232       2016-Ma…
+##  8 2010    ""     Ghana       2010ASPGH_A… 38           284       2010-Ma…
+##  9 2010    ""     Ghana       2010ASPGH_A… 16           284       2010-Ap…
+## 10 2010    ""     Ghana       2010ASPGH_A… 39           284       2010-Ju…
+## # ... with 200 more rows, and 8 more variables: trialName <chr>,
 ## #   locationName <chr>, programDbId <chr>, startDate <chr>,
-## #   studyDbId <int>, studyType <chr>, additionalInfo.design <chr>,
+## #   studyDbId <chr>, studyType <chr>, additionalInfo.design <chr>,
 ## #   additionalInfo.description <chr>

Get a study (or fieldbook)

- -<<<<<<< HEAD -
- -======= -
- ->>>>>>> be4bcf08cee72dd59344ef8835745957d8db09e2 +

diff --git a/docs/authors.html b/docs/authors.html index 94736c2..c44dd5a 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -55,7 +55,7 @@ brapi - 0.9.1 + 0.9.4
diff --git a/docs/index.html b/docs/index.html index 5bb393d..ed61be7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -30,7 +30,7 @@ brapi - 0.9.1 + 0.9.4
@@ -82,15 +82,16 @@ BrAPI R package -
-

-This version is still under development. The implementation sometimes changes minor details.

-
+

This version is still under development. The implementation sometimes changes minor details.

+

Current support is mainly for BrAPI version 1.1.

+

Support for version 1.2 is underway.

+

For independent checks against database you may use http://webapps.ipk-gatersleben.de/brapivalidator.

+

It seems several databases may not currently be fully accessible due to protocol changes.

README

-

An R package to use the Breeding API (BrAPI) for accessing plant breeding data.

+

An R package to use the Breeding API (BrAPI) for accessing plant breeding data. See the documentation for details.

It can be installed using:

diff --git a/docs/news/index.html b/docs/news/index.html index 84b211b..e1fae55 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -55,7 +55,7 @@ brapi - 0.9.1 + 0.9.4
diff --git a/docs/reference/as.ba_db.html b/docs/reference/as.ba_db.html index 6a56a37..3c72d01 100644 --- a/docs/reference/as.ba_db.html +++ b/docs/reference/as.ba_db.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_calls.html b/docs/reference/ba_calls.html index 355f364..f7fe92c 100644 --- a/docs/reference/ba_calls.html +++ b/docs/reference/ba_calls.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_can_internet.html b/docs/reference/ba_can_internet.html index 52722a6..15969f0 100644 --- a/docs/reference/ba_can_internet.html +++ b/docs/reference/ba_can_internet.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_check.html b/docs/reference/ba_check.html index 282cb0e..a81ee2a 100644 --- a/docs/reference/ba_check.html +++ b/docs/reference/ba_check.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_connect.html b/docs/reference/ba_connect.html index ea22d43..77bcce2 100644 --- a/docs/reference/ba_connect.html +++ b/docs/reference/ba_connect.html @@ -59,7 +59,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_crops.html b/docs/reference/ba_crops.html index 3d34460..ff9204b 100644 --- a/docs/reference/ba_crops.html +++ b/docs/reference/ba_crops.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_db.html b/docs/reference/ba_db.html index 2fb9cce..dbb9a74 100644 --- a/docs/reference/ba_db.html +++ b/docs/reference/ba_db.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_genomemaps.html b/docs/reference/ba_genomemaps.html index 3a3f1f0..dbc1016 100644 --- a/docs/reference/ba_genomemaps.html +++ b/docs/reference/ba_genomemaps.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -168,6 +168,7 @@

See a

Other genotyping: ba_genomemaps_data_range, ba_genomemaps_data, ba_genomemaps_details, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_genomemaps_data.html b/docs/reference/ba_genomemaps_data.html index fb56dfc..ae797bf 100644 --- a/docs/reference/ba_genomemaps_data.html +++ b/docs/reference/ba_genomemaps_data.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -163,6 +163,7 @@

See a

Other genotyping: ba_genomemaps_data_range, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_genomemaps_data_range.html b/docs/reference/ba_genomemaps_data_range.html index 77b20d0..ff6795b 100644 --- a/docs/reference/ba_genomemaps_data_range.html +++ b/docs/reference/ba_genomemaps_data_range.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -116,8 +116,8 @@

ba_genomemaps_data_range

ba_genomemaps_data_range(con = NULL, mapDbId = "1",
-  linkageGroupName = "1", min = 1, max = 1000, page = 0,
-  pageSize = 30, rclass = "tibble")
+ linkageGroupName = "1", min = "", max = "", page = 0, pageSize = 30, + rclass = "tibble")

Arguments

@@ -136,11 +136,11 @@

Arg

- + - + @@ -176,6 +176,7 @@

See a

Other genotyping: ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_genomemaps_details.html b/docs/reference/ba_genomemaps_details.html index f6f674b..f486952 100644 --- a/docs/reference/ba_genomemaps_details.html +++ b/docs/reference/ba_genomemaps_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -150,6 +150,7 @@

See a

Other genotyping: ba_genomemaps_data_range, ba_genomemaps_data, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_germplasm_attributes.html b/docs/reference/ba_germplasm_attributes.html new file mode 100644 index 0000000..c6561ac --- /dev/null +++ b/docs/reference/ba_germplasm_attributes.html @@ -0,0 +1,226 @@ + + + + + + + + +ba_germplasm_attributes — ba_germplasm_attributes • brapi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+
+ + + +
+ +
+
+ + +
+ +

germplasm_attibutes call.

+ +
+ +
ba_germplasm_attributes(con = NULL, germplasmDbId = "",
+  attributeList = "", page = 0, pageSize = 10, rclass = "tibble")
+ +

Arguments

+

min

integer; default 1

character; default ''

max

integer; default 1000

character; default ''

page
+ + + + + + + + + + + + + + + + + + + + + + + + + +
con

brapi connection object

germplasmDbId

character; default: ''.

attributeList

character vector; default: ''.

page

integer; default: 0.

pageSize

integer; default: 10.

rclass

character; default: tibble; or else: json, list, data.frame.

+ +

Value

+ +

rclass as set by parameter.

+ +

References

+ +

github

+ +

See also

+ + + + +

Examples

+
if (interactive()) { + library(brapi) + # Need to connect to a database with genetic data + + # con <- ba_db()$xxxxx + + # ba_germplasmattributes_details(con = con, ...) +}
+ + + + +
+ + +
+

Site built with pkgdown.

+
+ +
+ + + + + + + diff --git a/docs/reference/ba_germplasm_details.html b/docs/reference/ba_germplasm_details.html index 53a42aa..7836947 100644 --- a/docs/reference/ba_germplasm_details.html +++ b/docs/reference/ba_germplasm_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_germplasm_details_study.html b/docs/reference/ba_germplasm_details_study.html index 7e88baa..e8d510e 100644 --- a/docs/reference/ba_germplasm_details_study.html +++ b/docs/reference/ba_germplasm_details_study.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_germplasm_markerprofiles.html b/docs/reference/ba_germplasm_markerprofiles.html index 3fd947a..92b0eca 100644 --- a/docs/reference/ba_germplasm_markerprofiles.html +++ b/docs/reference/ba_germplasm_markerprofiles.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -153,6 +153,7 @@

See a ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_search, ba_germplasmattributes_categories, ba_germplasmattributes_details, diff --git a/docs/reference/ba_germplasm_pedigree.html b/docs/reference/ba_germplasm_pedigree.html index 0e7cc18..74cca8b 100644 --- a/docs/reference/ba_germplasm_pedigree.html +++ b/docs/reference/ba_germplasm_pedigree.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_germplasm_search.html b/docs/reference/ba_germplasm_search.html index 3b0f4b1..a439f57 100644 --- a/docs/reference/ba_germplasm_search.html +++ b/docs/reference/ba_germplasm_search.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -184,6 +184,7 @@

See a ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasmattributes_categories, ba_germplasmattributes_details, diff --git a/docs/reference/ba_germplasmattributes.html b/docs/reference/ba_germplasmattributes.html index 95451f7..71155cc 100644 --- a/docs/reference/ba_germplasmattributes.html +++ b/docs/reference/ba_germplasmattributes.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -145,12 +145,14 @@

R

See also

-

Other germplasmattributes: ba_germplasmattributes_categories, +

Other germplasmattributes: ba_germplasm_attributes, + ba_germplasmattributes_categories, ba_germplasmattributes_details

Other genotyping: ba_genomemaps_data_range, ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_germplasmattributes_categories.html b/docs/reference/ba_germplasmattributes_categories.html index c2f7a39..6ab6035 100644 --- a/docs/reference/ba_germplasmattributes_categories.html +++ b/docs/reference/ba_germplasmattributes_categories.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4

@@ -149,12 +149,14 @@

R

See also

-

Other germplasmattributes: ba_germplasmattributes_details, +

Other germplasmattributes: ba_germplasm_attributes, + ba_germplasmattributes_details, ba_germplasmattributes

Other genotyping: ba_genomemaps_data_range, ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_details, diff --git a/docs/reference/ba_germplasmattributes_details.html b/docs/reference/ba_germplasmattributes_details.html index 1db10b2..a5c0096 100644 --- a/docs/reference/ba_germplasmattributes_details.html +++ b/docs/reference/ba_germplasmattributes_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4

@@ -157,12 +157,14 @@

R

See also

-

Other germplasmattributes: ba_germplasmattributes_categories, +

Other germplasmattributes: ba_germplasm_attributes, + ba_germplasmattributes_categories, ba_germplasmattributes

Other genotyping: ba_genomemaps_data_range, ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_locations.html b/docs/reference/ba_locations.html index 8223902..c378581 100644 --- a/docs/reference/ba_locations.html +++ b/docs/reference/ba_locations.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4

diff --git a/docs/reference/ba_login.html b/docs/reference/ba_login.html index 03766e6..fe82cec 100644 --- a/docs/reference/ba_login.html +++ b/docs/reference/ba_login.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4
diff --git a/docs/reference/ba_logout.html b/docs/reference/ba_logout.html index 410cd07..2e67032 100644 --- a/docs/reference/ba_logout.html +++ b/docs/reference/ba_logout.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4
diff --git a/docs/reference/ba_markerprofiles_allelematrix_search.html b/docs/reference/ba_markerprofiles_allelematrix_search.html index 07b24ce..a7ff33f 100644 --- a/docs/reference/ba_markerprofiles_allelematrix_search.html +++ b/docs/reference/ba_markerprofiles_allelematrix_search.html @@ -60,7 +60,7 @@ brapi - 0.9.1 + 0.9.4
@@ -193,6 +193,7 @@

See a ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_markerprofiles_details.html b/docs/reference/ba_markerprofiles_details.html index 8be4301..5273778 100644 --- a/docs/reference/ba_markerprofiles_details.html +++ b/docs/reference/ba_markerprofiles_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -176,6 +176,7 @@

See a ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_markerprofiles_search.html b/docs/reference/ba_markerprofiles_search.html index afe7791..38ba1cc 100644 --- a/docs/reference/ba_markerprofiles_search.html +++ b/docs/reference/ba_markerprofiles_search.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -176,6 +176,7 @@

See a ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_markers_details.html b/docs/reference/ba_markers_details.html index 07dfe56..03a01c0 100644 --- a/docs/reference/ba_markers_details.html +++ b/docs/reference/ba_markers_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -149,6 +149,7 @@

See a ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_markers_search.html b/docs/reference/ba_markers_search.html index 747292b..f801373 100644 --- a/docs/reference/ba_markers_search.html +++ b/docs/reference/ba_markers_search.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -171,6 +171,7 @@

See a ba_genomemaps_data, ba_genomemaps_details, ba_genomemaps, + ba_germplasm_attributes, ba_germplasm_markerprofiles, ba_germplasm_search, ba_germplasmattributes_categories, diff --git a/docs/reference/ba_observationvariables.html b/docs/reference/ba_observationvariables.html index c14580b..93e57e5 100644 --- a/docs/reference/ba_observationvariables.html +++ b/docs/reference/ba_observationvariables.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_observationvariables_datatypes.html b/docs/reference/ba_observationvariables_datatypes.html index cc5725e..0c493df 100644 --- a/docs/reference/ba_observationvariables_datatypes.html +++ b/docs/reference/ba_observationvariables_datatypes.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_observationvariables_details.html b/docs/reference/ba_observationvariables_details.html index ac9932a..525ea63 100644 --- a/docs/reference/ba_observationvariables_details.html +++ b/docs/reference/ba_observationvariables_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_observationvariables_ontologies.html b/docs/reference/ba_observationvariables_ontologies.html index 32030d8..35a150b 100644 --- a/docs/reference/ba_observationvariables_ontologies.html +++ b/docs/reference/ba_observationvariables_ontologies.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_observationvariables_search.html b/docs/reference/ba_observationvariables_search.html index 9aa6ee0..18faa16 100644 --- a/docs/reference/ba_observationvariables_search.html +++ b/docs/reference/ba_observationvariables_search.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_phenotypes_search.html b/docs/reference/ba_phenotypes_search.html index 483aeed..021eb4b 100644 --- a/docs/reference/ba_phenotypes_search.html +++ b/docs/reference/ba_phenotypes_search.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_programs.html b/docs/reference/ba_programs.html index 952329d..1872eee 100644 --- a/docs/reference/ba_programs.html +++ b/docs/reference/ba_programs.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_programs_search.html b/docs/reference/ba_programs_search.html index f1656d8..f709a61 100644 --- a/docs/reference/ba_programs_search.html +++ b/docs/reference/ba_programs_search.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_samples.html b/docs/reference/ba_samples.html index 04869a8..e4fe008 100644 --- a/docs/reference/ba_samples.html +++ b/docs/reference/ba_samples.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_samples_save.html b/docs/reference/ba_samples_save.html index ae8c200..dad84b7 100644 --- a/docs/reference/ba_samples_save.html +++ b/docs/reference/ba_samples_save.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_show_expiration.html b/docs/reference/ba_show_expiration.html index aba0c60..e8ec7f3 100644 --- a/docs/reference/ba_show_expiration.html +++ b/docs/reference/ba_show_expiration.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_show_info.html b/docs/reference/ba_show_info.html index 385beb7..c045b3f 100644 --- a/docs/reference/ba_show_info.html +++ b/docs/reference/ba_show_info.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_details.html b/docs/reference/ba_studies_details.html index 0fc23f4..0e8154b 100644 --- a/docs/reference/ba_studies_details.html +++ b/docs/reference/ba_studies_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_layout.html b/docs/reference/ba_studies_layout.html index 7c62c40..c2133ce 100644 --- a/docs/reference/ba_studies_layout.html +++ b/docs/reference/ba_studies_layout.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_observationlevels.html b/docs/reference/ba_studies_observationlevels.html index f875a11..6a33ef8 100644 --- a/docs/reference/ba_studies_observationlevels.html +++ b/docs/reference/ba_studies_observationlevels.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_observations.html b/docs/reference/ba_studies_observations.html index 06ef23c..fbe3dce 100644 --- a/docs/reference/ba_studies_observations.html +++ b/docs/reference/ba_studies_observations.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_observationunits.html b/docs/reference/ba_studies_observationunits.html index d11fc60..a03b61d 100644 --- a/docs/reference/ba_studies_observationunits.html +++ b/docs/reference/ba_studies_observationunits.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_observationunits_save.html b/docs/reference/ba_studies_observationunits_save.html index bbaeaa2..2e11f64 100644 --- a/docs/reference/ba_studies_observationunits_save.html +++ b/docs/reference/ba_studies_observationunits_save.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_observationvariables.html b/docs/reference/ba_studies_observationvariables.html index 5cffd60..dfc2b4c 100644 --- a/docs/reference/ba_studies_observationvariables.html +++ b/docs/reference/ba_studies_observationvariables.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_search.html b/docs/reference/ba_studies_search.html index 03e56d2..81f38b2 100644 --- a/docs/reference/ba_studies_search.html +++ b/docs/reference/ba_studies_search.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_seasons.html b/docs/reference/ba_studies_seasons.html index 622d338..164aea2 100644 --- a/docs/reference/ba_studies_seasons.html +++ b/docs/reference/ba_studies_seasons.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_studytypes.html b/docs/reference/ba_studies_studytypes.html index fd674a9..ff63599 100644 --- a/docs/reference/ba_studies_studytypes.html +++ b/docs/reference/ba_studies_studytypes.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_studies_table.html b/docs/reference/ba_studies_table.html index fa17f76..bde7cd2 100644 --- a/docs/reference/ba_studies_table.html +++ b/docs/reference/ba_studies_table.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 @@ -115,7 +115,7 @@

ba_studies_table

-
ba_studies_table(con = NULL, studyDbId = "", format = "json",
+    
ba_studies_table(con = NULL, studyDbId = "", format = "csv",
   rclass = "tibble")

Arguments

@@ -131,7 +131,7 @@

Arg format -

character; one of: json, csv, tsv. Default: json

+

character; one of: json, csv, tsv. Default: csv

rclass diff --git a/docs/reference/ba_studies_table_save.html b/docs/reference/ba_studies_table_save.html index 7da26a4..da15a86 100644 --- a/docs/reference/ba_studies_table_save.html +++ b/docs/reference/ba_studies_table_save.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_traits.html b/docs/reference/ba_traits.html index bbe7894..2666793 100644 --- a/docs/reference/ba_traits.html +++ b/docs/reference/ba_traits.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_traits_details.html b/docs/reference/ba_traits_details.html index d560a92..53afa66 100644 --- a/docs/reference/ba_traits_details.html +++ b/docs/reference/ba_traits_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_trials.html b/docs/reference/ba_trials.html index 9fe604d..1cca5d1 100644 --- a/docs/reference/ba_trials.html +++ b/docs/reference/ba_trials.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/ba_trials_details.html b/docs/reference/ba_trials_details.html index afcc0eb..848d61a 100644 --- a/docs/reference/ba_trials_details.html +++ b/docs/reference/ba_trials_details.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/brapi.html b/docs/reference/brapi.html index e98bfdf..18e6dff 100644 --- a/docs/reference/brapi.html +++ b/docs/reference/brapi.html @@ -61,7 +61,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/index.html b/docs/reference/index.html index 35b6e3d..7269bb5 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -55,7 +55,7 @@ brapi - 0.9.1 + 0.9.4 @@ -184,6 +184,12 @@

ba_genomemaps_details()

ba_genomemaps_details

+ + + +

ba_germplasm_attributes()

+ +

ba_germplasm_attributes

diff --git a/docs/reference/is.ba_con.html b/docs/reference/is.ba_con.html index a86e8b3..e5d5729 100644 --- a/docs/reference/is.ba_con.html +++ b/docs/reference/is.ba_con.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/print.ba_con.html b/docs/reference/print.ba_con.html index 55d356b..181ab71 100644 --- a/docs/reference/print.ba_con.html +++ b/docs/reference/print.ba_con.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/docs/reference/print.ba_db_list.html b/docs/reference/print.ba_db_list.html index 7ef2f2d..a99cd5c 100644 --- a/docs/reference/print.ba_db_list.html +++ b/docs/reference/print.ba_db_list.html @@ -58,7 +58,7 @@ brapi - 0.9.1 + 0.9.4 diff --git a/man/ba_genomemaps.Rd b/man/ba_genomemaps.Rd index 9a5c847..4f57ea2 100644 --- a/man/ba_genomemaps.Rd +++ b/man/ba_genomemaps.Rd @@ -52,6 +52,7 @@ Other genomemaps: \code{\link{ba_genomemaps_data_range}}, Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_genomemaps_data.Rd b/man/ba_genomemaps_data.Rd index 3882496..bcb96b7 100644 --- a/man/ba_genomemaps_data.Rd +++ b/man/ba_genomemaps_data.Rd @@ -49,6 +49,7 @@ Other genomemaps: \code{\link{ba_genomemaps_data_range}}, Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_genomemaps_data_range.Rd b/man/ba_genomemaps_data_range.Rd index 1bf2f13..429ee90 100644 --- a/man/ba_genomemaps_data_range.Rd +++ b/man/ba_genomemaps_data_range.Rd @@ -57,6 +57,7 @@ Other genomemaps: \code{\link{ba_genomemaps_data}}, Other genotyping: \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_genomemaps_details.Rd b/man/ba_genomemaps_details.Rd index d8c7976..e18123b 100644 --- a/man/ba_genomemaps_details.Rd +++ b/man/ba_genomemaps_details.Rd @@ -41,6 +41,7 @@ Other genomemaps: \code{\link{ba_genomemaps_data_range}}, Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_germplasm_attributes.Rd b/man/ba_germplasm_attributes.Rd new file mode 100644 index 0000000..60fd617 --- /dev/null +++ b/man/ba_germplasm_attributes.Rd @@ -0,0 +1,64 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ba_germplasm_attributes.R +\name{ba_germplasm_attributes} +\alias{ba_germplasm_attributes} +\title{ba_germplasm_attributes} +\usage{ +ba_germplasm_attributes(con = NULL, germplasmDbId = "", + attributeList = "", page = 0, pageSize = 10, rclass = "tibble") +} +\arguments{ +\item{con}{brapi connection object} + +\item{germplasmDbId}{character; default: ''.} + +\item{attributeList}{character vector; default: ''.} + +\item{page}{integer; default: 0.} + +\item{pageSize}{integer; default: 10.} + +\item{rclass}{character; default: tibble; or else: json, list, data.frame.} +} +\value{ +rclass as set by parameter. +} +\description{ +germplasm_attibutes call. +} +\examples{ +if (interactive()) { + library(brapi) + # Need to connect to a database with genetic data + + # con <- ba_db()$xxxxx + + # ba_germplasmattributes_details(con = con, ...) +} +} +\references{ +\href{https://github.com/plantbreeding/API/blob/master/Specification/GermplasmAttributes/GermplasmAttributeValuesByGermplasmDbId.md}{github} +} +\seealso{ +Other germplasmattributes: \code{\link{ba_germplasmattributes_categories}}, + \code{\link{ba_germplasmattributes_details}}, + \code{\link{ba_germplasmattributes}} + +Other genotyping: \code{\link{ba_genomemaps_data_range}}, + \code{\link{ba_genomemaps_data}}, + \code{\link{ba_genomemaps_details}}, + \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_markerprofiles}}, + \code{\link{ba_germplasm_search}}, + \code{\link{ba_germplasmattributes_categories}}, + \code{\link{ba_germplasmattributes_details}}, + \code{\link{ba_germplasmattributes}}, + \code{\link{ba_markerprofiles_allelematrix_search}}, + \code{\link{ba_markerprofiles_details}}, + \code{\link{ba_markerprofiles_search}}, + \code{\link{ba_markers_details}}, + \code{\link{ba_markers_search}} +} +\author{ +Reinhard Simon +} diff --git a/man/ba_germplasm_markerprofiles.Rd b/man/ba_germplasm_markerprofiles.Rd index d68c4ad..e1da8aa 100644 --- a/man/ba_germplasm_markerprofiles.Rd +++ b/man/ba_germplasm_markerprofiles.Rd @@ -43,6 +43,7 @@ Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, \code{\link{ba_germplasmattributes_details}}, diff --git a/man/ba_germplasm_search.Rd b/man/ba_germplasm_search.Rd index a46f20a..71aa0fc 100644 --- a/man/ba_germplasm_search.Rd +++ b/man/ba_germplasm_search.Rd @@ -65,6 +65,7 @@ Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasmattributes_categories}}, \code{\link{ba_germplasmattributes_details}}, diff --git a/man/ba_germplasmattributes.Rd b/man/ba_germplasmattributes.Rd index cf3d9b5..da10fcd 100644 --- a/man/ba_germplasmattributes.Rd +++ b/man/ba_germplasmattributes.Rd @@ -34,13 +34,15 @@ if (interactive()) { \href{https://github.com/plantbreeding/API/blob/master/Specification/GermplasmAttributes/ListAttributesByAttributeCategoryDbId.md}{github} } \seealso{ -Other germplasmattributes: \code{\link{ba_germplasmattributes_categories}}, +Other germplasmattributes: \code{\link{ba_germplasm_attributes}}, + \code{\link{ba_germplasmattributes_categories}}, \code{\link{ba_germplasmattributes_details}} Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_germplasmattributes_categories.Rd b/man/ba_germplasmattributes_categories.Rd index 0e851ff..0f7a549 100644 --- a/man/ba_germplasmattributes_categories.Rd +++ b/man/ba_germplasmattributes_categories.Rd @@ -36,13 +36,15 @@ if (interactive()) { \href{https://github.com/plantbreeding/API/blob/master/Specification/GermplasmAttributes/ListAttributeCategories.md}{github} } \seealso{ -Other germplasmattributes: \code{\link{ba_germplasmattributes_details}}, +Other germplasmattributes: \code{\link{ba_germplasm_attributes}}, + \code{\link{ba_germplasmattributes_details}}, \code{\link{ba_germplasmattributes}} Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_details}}, diff --git a/man/ba_germplasmattributes_details.Rd b/man/ba_germplasmattributes_details.Rd index 5bb2f02..69b9ab4 100644 --- a/man/ba_germplasmattributes_details.Rd +++ b/man/ba_germplasmattributes_details.Rd @@ -40,13 +40,15 @@ if (interactive()) { \href{https://github.com/plantbreeding/API/blob/master/Specification/GermplasmAttributes/GermplasmAttributeValuesByGermplasmDbId.md}{github} } \seealso{ -Other germplasmattributes: \code{\link{ba_germplasmattributes_categories}}, +Other germplasmattributes: \code{\link{ba_germplasm_attributes}}, + \code{\link{ba_germplasmattributes_categories}}, \code{\link{ba_germplasmattributes}} Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_markerprofiles_allelematrix_search.Rd b/man/ba_markerprofiles_allelematrix_search.Rd index 59b2972..264834d 100644 --- a/man/ba_markerprofiles_allelematrix_search.Rd +++ b/man/ba_markerprofiles_allelematrix_search.Rd @@ -65,6 +65,7 @@ Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_markerprofiles_details.Rd b/man/ba_markerprofiles_details.Rd index 67776fe..1eeae8c 100644 --- a/man/ba_markerprofiles_details.Rd +++ b/man/ba_markerprofiles_details.Rd @@ -55,6 +55,7 @@ Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_markerprofiles_search.Rd b/man/ba_markerprofiles_search.Rd index 6ccd04e..8e8c061 100644 --- a/man/ba_markerprofiles_search.Rd +++ b/man/ba_markerprofiles_search.Rd @@ -55,6 +55,7 @@ Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_markers_details.Rd b/man/ba_markers_details.Rd index bb744cb..baab631 100644 --- a/man/ba_markers_details.Rd +++ b/man/ba_markers_details.Rd @@ -40,6 +40,7 @@ Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_markers_search.Rd b/man/ba_markers_search.Rd index c9e1d8f..0ac1ccc 100644 --- a/man/ba_markers_search.Rd +++ b/man/ba_markers_search.Rd @@ -52,6 +52,7 @@ Other genotyping: \code{\link{ba_genomemaps_data_range}}, \code{\link{ba_genomemaps_data}}, \code{\link{ba_genomemaps_details}}, \code{\link{ba_genomemaps}}, + \code{\link{ba_germplasm_attributes}}, \code{\link{ba_germplasm_markerprofiles}}, \code{\link{ba_germplasm_search}}, \code{\link{ba_germplasmattributes_categories}}, diff --git a/man/ba_studies_table.Rd b/man/ba_studies_table.Rd index fe3214d..0aa4404 100644 --- a/man/ba_studies_table.Rd +++ b/man/ba_studies_table.Rd @@ -4,7 +4,7 @@ \alias{ba_studies_table} \title{ba_studies_table} \usage{ -ba_studies_table(con = NULL, studyDbId = "", format = "json", +ba_studies_table(con = NULL, studyDbId = "", format = "csv", rclass = "tibble") } \arguments{ @@ -12,7 +12,7 @@ ba_studies_table(con = NULL, studyDbId = "", format = "json", \item{studyDbId}{character; default: ''} -\item{format}{character; one of: json, csv, tsv. Default: json} +\item{format}{character; one of: json, csv, tsv. Default: csv} \item{rclass}{character; default: "tibble" possible other values: "json"/"list"/"data.frame"} } diff --git a/tests/testthat/test_sp_germplasm_attributes.R b/tests/testthat/test_sp_germplasm_attributes.R new file mode 100644 index 0000000..7b48c1d --- /dev/null +++ b/tests/testthat/test_sp_germplasm_attributes.R @@ -0,0 +1,24 @@ +context("sp germplasm_attributes") + +con <- ba_db()$sweetpotatobase + +test_that(" are present", { + + res <- ba_germplasm_attributes(con = con, germplasmDbId = "103412") + expect_that(nrow(res) >= 2, is_true()) + +}) + +test_that(" out formats work", { + + res <- ba_germplasm_attributes(con = con, germplasmDbId = "103412", rclass = "json") + expect_that("json" %in% class(res), is_true()) + + res <- ba_germplasm_attributes(con = con, germplasmDbId = "103412", rclass = "list") + expect_that("list" %in% class(res), is_true()) + + res <- ba_germplasm_attributes(con = con, germplasmDbId = "103412", rclass = "data.frame") + expect_that("data.frame" %in% class(res), is_true()) + +}) + diff --git a/tests/testthat/test_sp_germplasm_markerprofiles.R b/tests/testthat/test_sp_germplasm_markerprofiles.R new file mode 100644 index 0000000..29626ff --- /dev/null +++ b/tests/testthat/test_sp_germplasm_markerprofiles.R @@ -0,0 +1,27 @@ +context("sp germplasm_markerprofiles") + +con <- ba_db()$sweetpotatobase + +test_that(" are present", { + + + res <- ba_germplasm_markerprofiles(con = con, germplasmDbId = "103412") + expect_true(nrow(res) == 1) + + + +}) + +test_that(" out formats work", { + + res <- ba_germplasm_markerprofiles(con = con, germplasmDbId = "103412", rclass = "json") + expect_that("json" %in% class(res), is_true()) + + res <- ba_germplasm_markerprofiles(con = con, germplasmDbId = "103412", rclass = "list") + expect_that("list" %in% class(res), is_true()) + + res <- ba_germplasm_markerprofiles(con = con, germplasmDbId = "103412", rclass = "data.frame") + expect_that("data.frame" %in% class(res), is_true()) + +}) + diff --git a/tests/testthat/test_sp_germplasm_pedigree.R b/tests/testthat/test_sp_germplasm_pedigree.R new file mode 100644 index 0000000..289bd8b --- /dev/null +++ b/tests/testthat/test_sp_germplasm_pedigree.R @@ -0,0 +1,25 @@ +context("sp germplasm_pedigree") + +con <- ba_db()$sweetpotatobase + +test_that("Germplasm_pedigree results are present", { + + res <- ba_germplasm_pedigree(con = con, germplasmDbId = "103412") + expect_that(nrow(res) >= 1, is_true()) + expect_that(ncol(res) >= 7, is_true()) + +}) + +test_that("out formats work", { + + res <- ba_germplasm_pedigree(con = con, germplasmDbId = "103412", rclass = "json") + expect_that("json" %in% class(res), is_true()) + + res <- ba_germplasm_pedigree(con = con, germplasmDbId = "103412", rclass = "list") + expect_that("list" %in% class(res), is_true()) + + res <- ba_germplasm_pedigree(con = con, germplasmDbId = "103412", rclass = "data.frame") + expect_that("data.frame" %in% class(res), is_true()) + +}) + diff --git a/tests/testthat/test_sp_germplasmattributes.R b/tests/testthat/test_sp_germplasmattributes.R new file mode 100644 index 0000000..29a8a13 --- /dev/null +++ b/tests/testthat/test_sp_germplasmattributes.R @@ -0,0 +1,23 @@ +context("sp germplasmattributes") + +con <- ba_db()$sweetpotatobase + +test_that(" are present", { + + res <- ba_germplasmattributes(con = con) + expect_that(nrow(res) >= 7, is_true()) + +}) + +test_that(" out formats work", { + + res <- ba_germplasmattributes(con = con, rclass = "json") + expect_that("json" %in% class(res), is_true()) + + res <- ba_germplasmattributes(con = con, rclass = "list") + expect_that("list" %in% class(res), is_true()) + + res <- ba_germplasmattributes(con = con, rclass = "data.frame") + expect_that("data.frame" %in% class(res), is_true()) + +}) diff --git a/tests/testthat/test_sp_germplasmattributes_categories.R b/tests/testthat/test_sp_germplasmattributes_categories.R new file mode 100644 index 0000000..01ae155 --- /dev/null +++ b/tests/testthat/test_sp_germplasmattributes_categories.R @@ -0,0 +1,11 @@ +context("sp germplasmattributes_categories") + +con <- ba_db()$sweetpotatobase + +test_that(" are present", { + + res <- ba_germplasmattributes_categories(con = con) + expect_that(nrow(res) >= 1, is_true()) + +}) + diff --git a/tests/testthat/test_sp_markerprofiles_details.R b/tests/testthat/test_sp_markerprofiles_details.R new file mode 100644 index 0000000..1dce0cd --- /dev/null +++ b/tests/testthat/test_sp_markerprofiles_details.R @@ -0,0 +1,12 @@ +context("sp markerprofiles_details") + +con <- ba_db()$sweetpotatobase + +test_that(" are present", { + + + res <- ba_markerprofiles_details(con = con, markerprofilesDbId = "1" ) + expect_that(nrow(res) == 0, is_true()) + +}) + diff --git a/tests/testthat/test_sp_markerprofiles_search.R b/tests/testthat/test_sp_markerprofiles_search.R new file mode 100644 index 0000000..024d748 --- /dev/null +++ b/tests/testthat/test_sp_markerprofiles_search.R @@ -0,0 +1,11 @@ +context("ts markerprofiles_search") + +con <- ba_db()$sweetpotatobase + +test_that("Calls are present", { + + res <- ba_markerprofiles_search(con = con) + expect_that(nrow(res) >= 0, is_true()) + +}) + diff --git a/tests/testthat/test_sp_studies_table.R b/tests/testthat/test_sp_studies_table.R new file mode 100644 index 0000000..f0d3214 --- /dev/null +++ b/tests/testthat/test_sp_studies_table.R @@ -0,0 +1,41 @@ +context("sp studies_table") + +# Brapi test server does not return correct header row, so using sweetpotatobase for the moment! +con <- ba_db()$sweetpotatobase + +test_that("Studies_table are present", { + + res <- ba_studies_table(con = con, studyDbId = "148", format = 'csv') + expect_that(nrow(res) >= 8, is_true()) + +}) + + +test_that("Studies_table are presented as json", { + + res <- ba_studies_table(con = con, studyDbId = "148", format = 'csv', rclass = "json") + expect_that("json" %in% class(res), is_true()) + +}) + +test_that("Studies_table are presented as data.frame", { + + res <- ba_studies_table(con = con, studyDbId = "148", format = 'csv', rclass = "data.frame") + expect_that("data.frame" %in% class(res), is_true()) + +}) + + +test_that("Studies_table are requested as csv", { + + res <- ba_studies_table(con = con, studyDbId = "148", format = "csv") + expect_that(nrow(res) >= 8, is_true()) + +}) + +test_that("Studies_table are requested as tsv", { + + res <- ba_studies_table(con = con, studyDbId = "148", format = "tsv") + expect_that(nrow(res) >= 8, is_true()) + +}) diff --git a/tests/testthat/test_ts_germplasm_attributes.R b/tests/testthat/test_ts_germplasm_attributes.R new file mode 100644 index 0000000..e553782 --- /dev/null +++ b/tests/testthat/test_ts_germplasm_attributes.R @@ -0,0 +1,24 @@ +context("ts germplasm_attributes") + +con <- ba_db()$testserver + +test_that(" are present", { + + res <- ba_germplasm_attributes(con = con, germplasmDbId = '1') + expect_that(nrow(res) == 10, is_true()) + +}) + +test_that(" out formats work", { + + res <- ba_germplasm_attributes(con = con, germplasmDbId = "1", rclass = "json") + expect_that("json" %in% class(res), is_true()) + + res <- ba_germplasm_attributes(con = con, germplasmDbId = "1", rclass = "list") + expect_that("list" %in% class(res), is_true()) + + res <- ba_germplasm_attributes(con = con, germplasmDbId = "1", rclass = "data.frame") + expect_that("data.frame" %in% class(res), is_true()) + +}) + diff --git a/tests/testthat/test_ts_germplasm_markerprofiles.R b/tests/testthat/test_ts_germplasm_markerprofiles.R index cb00d56..667992e 100644 --- a/tests/testthat/test_ts_germplasm_markerprofiles.R +++ b/tests/testthat/test_ts_germplasm_markerprofiles.R @@ -20,8 +20,5 @@ test_that(" out formats work", { res <- ba_germplasm_markerprofiles(con = con, germplasmDbId = "1", rclass = "data.frame") expect_that("data.frame" %in% class(res), is_true()) - res <- ba_germplasm_markerprofiles(con = con, germplasmDbId = "1", rclass = "vector") - expect_that("character" %in% class(res), is_true()) - }) diff --git a/tests/testthat/test_ts_germplasm_pedigree.R b/tests/testthat/test_ts_germplasm_pedigree.R index 0655c98..b6dc81d 100644 --- a/tests/testthat/test_ts_germplasm_pedigree.R +++ b/tests/testthat/test_ts_germplasm_pedigree.R @@ -1,4 +1,4 @@ -context("germplasm_pedigree") +context("ts germplasm_pedigree") con <- ba_db()$testserver diff --git a/tests/testthat/test_ts_germplasm_search.R b/tests/testthat/test_ts_germplasm_search.R index 5fb0a01..50e6d46 100644 --- a/tests/testthat/test_ts_germplasm_search.R +++ b/tests/testthat/test_ts_germplasm_search.R @@ -1,4 +1,4 @@ -context("germplasm_search") +context("ts germplasm_search") con <- ba_db()$testserver diff --git a/tests/testthat/test_ts_germplasmattributes.R b/tests/testthat/test_ts_germplasmattributes.R index 0682753..3514f32 100644 --- a/tests/testthat/test_ts_germplasmattributes.R +++ b/tests/testthat/test_ts_germplasmattributes.R @@ -1,11 +1,23 @@ -context("germplasmattributes") +context("ts germplasmattributes") con <- ba_db()$testserver -test_that(" are present", { +test_that(" are present", { res <- ba_germplasmattributes(con = con) expect_that(nrow(res) == 10, is_true()) }) +test_that(" out formats work", { + + res <- ba_germplasmattributes(con = con, rclass = "json") + expect_that("json" %in% class(res), is_true()) + + res <- ba_germplasmattributes(con = con, rclass = "list") + expect_that("list" %in% class(res), is_true()) + + res <- ba_germplasmattributes(con = con, rclass = "data.frame") + expect_that("data.frame" %in% class(res), is_true()) + +}) diff --git a/tests/testthat/test_ts_germplasmattributes_categories.R b/tests/testthat/test_ts_germplasmattributes_categories.R index f98723e..f3bb283 100644 --- a/tests/testthat/test_ts_germplasmattributes_categories.R +++ b/tests/testthat/test_ts_germplasmattributes_categories.R @@ -1,8 +1,8 @@ -context("germplasmattributes_categories") +context("ts germplasmattributes_categories") con <- ba_db()$testserver -test_that("Studies_details are present", { +test_that(" are present", { res <- ba_germplasmattributes_categories(con = con) expect_that(nrow(res) == 4, is_true()) diff --git a/tests/testthat/test_ts_germplasmattributes_details.R b/tests/testthat/test_ts_germplasmattributes_details.R deleted file mode 100644 index eba800c..0000000 --- a/tests/testthat/test_ts_germplasmattributes_details.R +++ /dev/null @@ -1,23 +0,0 @@ -context("germplasmattributes_details") - -con <- ba_db()$testserver - -test_that(" are present", { - - res <- ba_germplasmattributes_details(con = con, germplasmDbId = "1" ) - expect_that(nrow(res) == 10, is_true()) - -}) - -test_that(" out formats work", { - - res <- ba_germplasmattributes_details(con = con, germplasmDbId = "1", rclass = "json") - expect_that("json" %in% class(res), is_true()) - - res <- ba_germplasmattributes_details(con = con, germplasmDbId = "1", rclass = "list") - expect_that("list" %in% class(res), is_true()) - - res <- ba_germplasmattributes_details(con = con, germplasmDbId = "1", rclass = "data.frame") - expect_that("data.frame" %in% class(res), is_true()) - -}) diff --git a/tests/testthat/test_ts_markerprofiles_details.R b/tests/testthat/test_ts_markerprofiles_details.R index eb22ee4..1956ce8 100644 --- a/tests/testthat/test_ts_markerprofiles_details.R +++ b/tests/testthat/test_ts_markerprofiles_details.R @@ -1,4 +1,4 @@ -context("markerprofiles_details") +context("ts markerprofiles_details") con <- ba_db()$testserver diff --git a/tests/testthat/test_ts_markerprofiles_search.R b/tests/testthat/test_ts_markerprofiles_search.R index d39e42c..943199d 100644 --- a/tests/testthat/test_ts_markerprofiles_search.R +++ b/tests/testthat/test_ts_markerprofiles_search.R @@ -1,4 +1,4 @@ -context("markerprofiles_search") +context("ts markerprofiles_search") con <- ba_db()$testserver diff --git a/tests/testthat/test_ts_studies_seasons.R b/tests/testthat/test_ts_studies_seasons.R index 7727d79..125bf86 100644 --- a/tests/testthat/test_ts_studies_seasons.R +++ b/tests/testthat/test_ts_studies_seasons.R @@ -1,4 +1,4 @@ -context("studies_seasons") +context("ts studies_seasons") con <- ba_db()$testserver diff --git a/tests/testthat/test_ts_studies_table.R b/tests/testthat/test_ts_studies_table.R index 08391e7..9070522 100644 --- a/tests/testthat/test_ts_studies_table.R +++ b/tests/testthat/test_ts_studies_table.R @@ -1,41 +1,42 @@ -context("studies_table") +context("ts studies_table") # Brapi test server does not return correct header row, so using sweetpotatobase for the moment! -con <- ba_db()$sweetpotatobase +con <- ba_db()$testserver test_that("Studies_table are present", { - res <- ba_studies_table(con = con, studyDbId = "148") - expect_that(nrow(res) >= 8, is_true()) + expect_error({ + res <- ba_studies_table(con = con, studyDbId = "1001") + }) }) -test_that("Studies_table are presented as json", { - - res <- ba_studies_table(con = con, studyDbId = "148", rclass = "json") - expect_that("json" %in% class(res), is_true()) - -}) - -test_that("Studies_table are presented as data.frame", { - - res <- ba_studies_table(con = con, studyDbId = "148", rclass = "data.frame") - expect_that("data.frame" %in% class(res), is_true()) - -}) - - -test_that("Studies_table are requested as csv", { - - res <- ba_studies_table(con = con, studyDbId = "148", format = "csv") - expect_that(nrow(res) >= 8, is_true()) - -}) - -test_that("Studies_table are requested as tsv", { - - res <- ba_studies_table(con = con, studyDbId = "148", format = "tsv") - expect_that(nrow(res) >= 8, is_true()) - -}) +# test_that("Studies_table are presented as json", { +# +# res <- ba_studies_table(con = con, studyDbId = "148", rclass = "json") +# expect_that("json" %in% class(res), is_true()) +# +# }) +# +# test_that("Studies_table are presented as data.frame", { +# +# res <- ba_studies_table(con = con, studyDbId = "148", rclass = "data.frame") +# expect_that("data.frame" %in% class(res), is_true()) +# +# }) +# +# +# test_that("Studies_table are requested as csv", { +# +# res <- ba_studies_table(con = con, studyDbId = "148", format = "csv") +# expect_that(nrow(res) >= 8, is_true()) +# +# }) +# +# test_that("Studies_table are requested as tsv", { +# +# res <- ba_studies_table(con = con, studyDbId = "148", format = "tsv") +# expect_that(nrow(res) >= 8, is_true()) +# +# })