R/analyze.R
xQTLanalyze_getSentinelSnp.Rd
Return sentinel snps whose pValue < 5e-8(default) and SNP-to-SNP distance > 1e6 bp.
xQTLanalyze_getSentinelSnp(
gwasDF,
pValueThreshold = 5e-08,
centerRange = 1e+06,
mafThreshold = 0.01,
genomeVersion = "grch38",
grch37To38 = FALSE
)
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.
Cutoff of gwas p-value. Default: 5e-8
SNP-to-SNP distance. Default:1e6
Cutoff of maf to remove rare variants.
Genome version of input file. "grch37" or "grch38" (default).
TRUE or FALSE, we recommend converting grch37 to grch38, or using a input file of grch38 directly. Package rtracklayer
is required.
A data.table object.
# \donttest{
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)
# }