get_smarter_variants: Get SMARTER variants

View source: R/variants.R

get_smarter_variantsR Documentation

Get SMARTER variants

Description

Retrieve information on SMARTER SNPs. Only informations about the supported assemblies are returned (see get_smarter_info for more information). Cached token is used or a new token is generated if not provided when calling this function (see get_smarter_token for more information)

Usage

get_smarter_variants(species, assembly, query = list(), token = NULL)

Arguments

species

a smarter species ("Goat", "Sheep")

assembly

the smarter working assembly for such species

query

a list of query arguments

token

a string with a valid token

Value

Returns a dataframe with selected variants

About SMARTER supported assemblies

Currently SMARTER supports OAR3 and OAR4 assemblies for Sheep and CHI1 and ARS1 assemblies for goat. For each assembly, only the evidences used to create the smarter database are returned. Retrieving all variant for a certain assembly and species could require time and memory.

Examples

# get variants by region (chrom:start-end)
variants <- get_smarter_variants(
  species = "Goat",
  assembly = "ARS1",
  query = list(region = "1:1-100000")
)
## Not run: 
# get available assemblies from info endpoint
names(get_smarter_info()$working_assemblies)

# collect variants from goat ARS1 endpoint (takes a lot of time)
ars1_variant <- get_smarter_variants(
  species = "Goat",
  assembly = "ARS1"
)

## End(Not run)

cnr-ibba/r-smarter-api documentation built on Nov. 1, 2022, 4:24 a.m.