get_gtex_variants: Get variants from GTEx linked to the given ensembl genes

View source: R/gtex.R

get_gtex_variantsR Documentation

Get variants from GTEx linked to the given ensembl genes

Description

Take as input one or more tissue files from "GTEx_Analysis_v8_eQTL" (or v7), as well as a vector of ensembl gene ids. This function will return the variants that are associated with changes in the expression of the selected genes in the selected tissues. The assocations are based on the "signif_variant_gene_pairs" files. The ensembl ids from the GTEx file will be converted to stable ids.

Usage

get_gtex_variants(
  tissue_files,
  omim_genes,
  gtex_lookup_file,
  snp_mart,
  verbose = FALSE
)

Arguments

tissue_files

a vector containing the name of the "signif_variant_gene_pairs.txt.gz" files. This will be read using gzfile. Output from select_gtex_tissues can be used.

omim_genes

output from get_omim_genes

gtex_lookup_file

the lookup file, GTEx to rsids. "GTEx_Analysis_2017-06-05_v8_WholeGenomeSeq_838Indiv_Analysis_Freeze.lookup_table.txt.gz" Can be obtained using vargen_install.

snp_mart

optional, a connection to ensembl snp mart, can be created using connect_to_snp_ensembl (If missing this function will be used to create the connection).

verbose

will be given to subsequent functions to print progress.

Value

a data.frame with information about the variants associated with a change in expression on the gene of interest. The data.frame will contain the following columns:

  • chr (chromosome)

  • pos (position of the variant)

  • rsid (variant ID)

  • ensembl_gene_id ("gene id" of the gene associated with the variant)

  • hgnc_symbol ("hgnc symbol" of the gene associated with the variant)

  • source (here the value will be "gtex")


MCorentin/vargen documentation built on Feb. 6, 2024, 2:32 p.m.