Skip to contents

This service allows the user to query information about variants on a certain chromosome at a certain location.

GTEx Portal API documentation

Usage

get_variant_by_location(
  start,
  end,
  chromosome,
  sortBy = "pos",
  sortDirection = "asc",
  page = 0,
  itemsPerPage = 250
)

Arguments

start

Integer.

end

Integer.

chromosome

String. One of "chr1", "chr2", "chr3", "chr4", "chr5", "chr6", "chr7", "chr8", "chr9", "chr10", "chr11", "chr12", "chr13", "chr14", "chr15", "chr16", "chr17", "chr18", "chr19", "chr20", "chr21", "chr22", "chrM", "chrX", "chrY".

sortBy

String. Options: "sampleId", "ischemicTime", "aliquotId", "tissueSampleId", "hardyScale", "pathologyNotes", "ageBracket", "tissueSiteDetailId", "sex".

sortDirection

String. Options: "asc", "desc". Default = "asc".

page

Integer (default = 0).

itemsPerPage

Integer (default = 250).

Value

A tibble.

Examples

get_variant_by_location(start = 153209600,
                        end = 153209700,
                        chromosome = "chr1")
#> 
#> ── Paging info ─────────────────────────────────────────────────────────────────
#>  numberOfPages = 1
#>  page = 0
#>  maxItemsPerPage = 250
#>  totalNumberOfItems = 4
#> # A tibble: 4 × 10
#>   snpId       b37VariantId       pos maf01 variantId alt   chromosome snpIdUpper
#>   <chr>       <chr>            <int> <lgl> <chr>     <chr> <chr>      <chr>     
#> 1 rs11205220  1_153182115_T_… 1.53e8 TRUE  chr1_153… C     chr1       RS11205220
#> 2 rs1410858   1_153182116_C_… 1.53e8 TRUE  chr1_153… A     chr1       RS1410858 
#> 3 rs139296761 1_153182120_C_… 1.53e8 FALSE chr1_153… T     chr1       RS1392967…
#> 4 rs80104092  1_153182149_T_… 1.53e8 FALSE chr1_153… C     chr1       RS80104092
#> # ℹ 2 more variables: datasetId <chr>, ref <chr>