Skip to contents

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"
))
#> Error: 'fread' is not an exported object from 'namespace:bigreadr'
Pagwas <- GWAS_summary_input(
  Pagwas = Pagwas,
  gwas_data = gwas_data,
  maf_filter = 0.1
)
#> Input gwas summary data frame!
#> Error in eval(expr, envir, enclos): object 'gwas_data' not found
Pagwas$gwas_data_gene_df <- SnpToGene(
  gwas_data = Pagwas$gwas_data,
  block_annotation = block_annotation,
  marg = 10000
)