Developer guide

Functions

  • Function name is title of API endpoint in lower case, with words separated by underscores.
  • @description section is copied verbatim from the API documentation site and ends with a link to the corresponding API endpoint documentation.
  • Further notes may be added under @details.
  • Arguments
    • Names match those for API endpoint, except where the argument accepts an array (vector in R) of values, in which case it is pluralised.1
    • Default values also match those for API endpoint.
    • Query parameters flagged as “required” in the GTEx Portal API documentation do not have default values.2
    • Are all documented in gtexr_arguments.R. All functions therefore use @inheritParams gtexr_arguments for documentation.
  • Use @family roxygen tag to match categories on API documentation. This is used to categorise functions on pkgdown site reference page.
  • Return a tibble.
  • The first example in @examples must produce output and be a single function call without assignment (e.g. get_news_items(), not x <- get_news_items()). This is used to pre-populate argument values in the gtexr shiny app with a working example.
  • All examples should be surrounded by \dontrun{}.

  1. Note that the Get Genomic Features endpoint takes a path parameter “featureId”. The corresponding gtexr argument is prefixed with “.” (.featureId).↩︎

  2. Note however that while variantId is not flagged as “required” for Get Linkage Disequilibrium By Variant Data, no default value is provided in get_linkage_disequilibrium_by_variant_data() as providing NULL or an unrecognised variant ID returns an empty response.↩︎