Pure. The batched query uses aliases v1, v2, and so on, so rows are
mapped back by alias index rather than by the echoed id. A variant gnomAD
has not seen comes back as null under its alias, with a
"Variant not found" entry in errors, and becomes a row of NA.
Value
A tibble with one row per entry in variant_ids, same order. See
gnomad_parse_variant() for the columns.
References
Chen et al. (2024). A genomic mutational constraint map using variation in 76,156 human genomes. Nature 625(7993), 92-100. doi:10.1038/s41586-023-06045-0
Service documentation: https://gnomad.broadinstitute.org/
Examples
body <- list(data = list(
v1 = list(variant_id = "17-7676154-G-C", exome = list(af = 0.72)),
v2 = NULL
))
gnomad_parse_variants(body, c("17-7676154-G-C", "17-7676154-G-GTTTTT"))
#> # A tibble: 2 × 16
#> variant_id rsid exome_af exome_ac exome_an exome_nhomalt genome_af genome_ac
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 17-7676154… NA 0.72 NA NA NA NA NA
#> 2 17-7676154… NA NA NA NA NA NA NA
#> # ℹ 8 more variables: genome_an <dbl>, genome_nhomalt <dbl>, grpmax_af <dbl>,
#> # grpmax_an <dbl>, grpmax_id <chr>, faf95 <dbl>, faf95_pop <chr>,
#> # filters <chr>