SnpToGene: Functions for mapping Snps to Genes

View source: R/SnpToGene.R

SnpToGeneR Documentation

Functions for mapping Snps to Genes

Description

Maps SNPs to their nearest genes within TSS windows.

Usage

SnpToGene(gwas_data, block_annotation, marg = 10000)

Arguments

gwas_data

(data.frame) the result for GWAS_summary_input

block_annotation

(data.frame) Start and end points for block traits, usually genes.

marg

(integer) region upstream and downstream(default=10000).

Value

data frame for gwas_data mapping to gene.

Examples

library(scPagwas)
Pagwas <- list()
gwas_data <- bigreadr::fread(system.file("extdata",
  "GWAS_summ_example.txt",
  package = "scPagwas"
))
Pagwas <- GWAS_summary_input(
  Pagwas = Pagwas,
  gwas_data = gwas_data,
  maf_filter = 0.1
)
Pagwas$gwas_data_gene_df <- SnpToGene(
  gwas_data = Pagwas$gwas_data,
  block_annotation = block_annotation,
  marg = 10000
)

dengchunyu/scPagwas documentation built on Nov. 29, 2024, 2:53 p.m.