Skip to content

Commit

Permalink
Merge pull request #2 from GregFa/main
Browse files Browse the repository at this point in the history
Added ".geno" format to group name in the query.
  • Loading branch information
kbroman authored Sep 26, 2022
2 parents a0ff43d + d863b88 commit 49732cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ get_pheno <-
#'
#' @param group Name of group
#' @param url The URL for the GeneNetwork API
#' @param format The group's genotypes format
#'
#' @return A data frame
#'
Expand All @@ -72,11 +73,11 @@ get_pheno <-
#' @examples
#' g <- get_geno("QSM")
get_geno <-
function(group, url=gnapi_url())
function(group, url=gnapi_url(), format = "geno")
{
stopifnot(length(group) == 1)

result <- query_gn(paste0("genotypes/", group), url=url, output="text")
result <- query_gn(paste0("genotypes/", group, ".", format), url=url, output="text")

# replace @ with #
result <- gsub("@", "#", result, fixed=TRUE)
Expand Down

0 comments on commit 49732cb

Please sign in to comment.