Learn R Programming

SNPannotator (version 1.4.3)

findGenomicPos: Query GTEx portal for Variant's genomic position based on rsID Retrieves variant information from the GTEx portal using either an rsID or a variant ID formatted as CHR_POS_REF_ALT. If an rsID is provided, the function returns the corresponding genomic positions in both GRCh37 and GRCh38 builds. When searching for an rsID based on genomic position, the position parameter should be specified according to the GRCh38 reference genome.

Description

Query GTEx portal for Variant's genomic position based on rsID Retrieves variant information from the GTEx portal using either an rsID or a variant ID formatted as CHR_POS_REF_ALT. If an rsID is provided, the function returns the corresponding genomic positions in both GRCh37 and GRCh38 builds. When searching for an rsID based on genomic position, the position parameter should be specified according to the GRCh38 reference genome.

Usage

findGenomicPos(id, type = "rsid", file_path = NULL)

Value

A data.table containing variant information including:

  • rsid: variant id in rsID format

  • chromosome: chromosome number

  • position_b37: genomic position

  • position_b38: genomic position

  • ref: reference allele

  • alt: alternate allele

Arguments

id

Character string representing the rsID (e.g., "rs12345") or the variant ID in the format "CHR_POS_REF_ALT" (e.g., "1_1234567_A_T"), depending on type.

type

Character string specifying the type of query. Must be either "rsid" or "varid".

file_path

character, path to a file for saving results as Excell spreadsheet.