Skip to content

Commit

Permalink
list_groups(): no longer seems to take an individual group name
Browse files Browse the repository at this point in the history
  • Loading branch information
kbroman committed Sep 26, 2022
1 parent 05a2a1d commit 130b4a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
16 changes: 2 additions & 14 deletions R/get_lists.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ list_species <-
#' Get list of available groups
#'
#' @param species Optional species name, for just the groups for that species.
#' @param group Optional name for a specific group
#' @param url URL for GeneNetwork API
#'
#' @return Data frame with columns `FullName`, `Id`, `Name`, and `TaxonomyId`.
Expand All @@ -45,21 +44,10 @@ list_species <-
#' @examples
#' list_groups()
#' list_groups("barley")
#' list_groups("rat", "HSNIH-Palmer")
#' list_groups(group="HSNIH-Palmer")
list_groups <-
function(species=NULL, group=NULL, url=gnapi_url())
function(species=NULL, url=gnapi_url())
{
if(!is.null(group) && group != "") { # note this uses group/ rather than groups/
query <- "group/"
if(!is.null(species) && species != "") {
query <- paste0(query, "/", species)
}
result <- query_gn(paste0(query, "/", group), url=url)
if(is.null(result)) return(NULL)
return(as.data.frame(result))
}
else if(!is.null(species) && species != "") {
if(!is.null(species) && species != "") {
stopifnot(length(species)==1)
result <- query_gn(paste0("groups/", species), url=url)
} else {
Expand Down
6 changes: 1 addition & 5 deletions man/list_groups.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 130b4a2

Please sign in to comment.