xQTLanalyze_getSentinelSnp: Detect sentinel SNPs for GWAS using summary statistics data

View source: R/analyze.R

xQTLanalyze_getSentinelSnpR Documentation

Detect sentinel SNPs for GWAS using summary statistics data

Description

Return sentinel snps whose pValue < 5e-8(default) and SNP-to-SNP distance > 1e6 bp.

Usage

xQTLanalyze_getSentinelSnp(
  gwasDF,
  pValueThreshold = 5e-08,
  centerRange = 1e+06,
  mafThreshold = 0.01,
  genomeVersion = "grch38",
  grch37To38 = FALSE
)

Arguments

gwasDF

A data.frame or a data.table object. Five columns are required (arbitrary column names is supported):

⁠Col 1⁠. "snps" (character), , using an rsID (e.g. "rs11966562").

⁠Col 2⁠. "chromosome" (character), one of the chromosome from chr1-chr22.

⁠Col 3⁠. "postion" (integer), genome position of snp.

⁠Col 4⁠. "P-value" (numeric).

⁠Col 5⁠. "MAF" (numeric). Allel frequency.

⁠Col 6⁠. "beta" (numeric). effect size.

⁠Col 7⁠. "se" (numeric). standard error.

pValueThreshold

Cutoff of gwas p-value. Default: 5e-8

centerRange

SNP-to-SNP distance. Default:1e6

mafThreshold

Cutoff of maf to remove rare variants.

genomeVersion

Genome version of input file. "grch37" or "grch38" (default).

grch37To38

TRUE or FALSE, we recommend converting grch37 to grch38, or using a input file of grch38 directly. Package rtracklayer is required.

Value

A data.table object.

Examples


url<-"http://bioinfo.szbl.ac.cn/xQTL_biolinks/xqtl_data/GLGC.txt"
gwasDF <- data.table::fread(url)
gwasDF <- gwasDF[, .(rsid, chr, position, P, maf, beta, se)]
sentinelSnpDF <- xQTLanalyze_getSentinelSnp(gwasDF)


xQTLbiolinks documentation built on Sept. 15, 2023, 1:06 a.m.