| qtlFinder | R Documentation |
Distance-based signal identification
qtlFinder(
d,
Chromosome = "Chromosome",
Position = "Position",
MarkerName = "MarkerName",
Allele1 = "Allele1",
Allele2 = "Allele2",
EAF = "Freq1",
Effect = "Effect",
StdErr = "StdErr",
log10P = "log10P",
N = "N",
radius = 1e+06,
collapse.hla = TRUE,
build = "hg19"
)
d |
Input data frame containing summary association statistics. |
Chromosome |
Chromosome column. |
Position |
Genomic position column (bp). |
MarkerName |
Variant identifier (e.g. rsID or SNP ID). |
Allele1 |
Effect allele. |
Allele2 |
Other allele. |
EAF |
Effect allele frequency. |
Effect |
Effect estimate. |
StdErr |
Standard error of the effect estimate. |
log10P |
Column containing log10(P) values, typically as produced by METAL. Values are converted internally to -log10(P) for ranking signals. |
N |
Sample size. |
radius |
Maximum gap (bp) allowed between consecutive variants when defining a locus. |
collapse.hla |
Logical flag indicating whether variants within the HLA region should be collapsed. |
build |
Genome build used to define HLA boundaries ("hg19" or "hg38"). |
Variants are merged into non-overlapping loci using
valr::bed_merge(max_dist = radius). Variants connected through a chain of
gaps less than or equal to radius belong to the same locus.
The most significant variant (largest -log10(P)) within each merged locus is selected as the lead signal.
When collapse.hla=TRUE, signals within the HLA region are collapsed using
HLA boundaries:
hg19/GRCh37: chr6:28477797-33448354
hg38/GRCh38: chr6:28510020-33480577
A tibble containing one lead variant per non-overlapping genomic locus.
Loci are defined by single-linkage clustering of variants separated by at most
radius base pairs. Each locus is represented by its most significant variant
(largest -log10(P)).
chrom: chromosome
start, end: position of the lead variant
rsid: variant identifier
a1, a2: effect and other allele
EAF: effect allele frequency
b: effect size
SE: standard error
mlog10p: -log10(P) used for ranking
n: sample size
regionStart, regionEnd: boundaries of the merged locus
Each row corresponds to a non-overlapping locus defined using
valr::bed_merge(max_dist = radius).
The lead variant is selected as the SNP with the highest mlog10p.
## Not run:
threshold <- log10(5*10^-8)
varlist <- c(
"Chromosome","Position","MarkerName","Allele1","Allele2",
"Freq1","FreqSE","MinFreq","MaxFreq",
"Effect","StdErr","log10P","Direction",
"HetISq","HetChiSq","HetDf","logHetP","N"
)
tbl <- "~/Caprion/analysis/METAL_dr/ZPI_dr-1.tbl.gz"
sumstats <- read.table(tbl, col.names = varlist, check.names = FALSE)
res1 <- qtlFinder(sumstats)
res1
subset(res1,mlog10p>=-threshold)
d <- subset(sumstats, log10P <= threshold)
res2 <- qtlFinder(d)
res2
sentinels <- "~/Caprion/analysis/METAL_dr/sentinels/ZPI_dr.p.gz"
d2 <- read.table(sentinels, col.names = varlist, check.names = FALSE)
res3 <- qtlFinder(d2)
res3
# A tibble: 2 × 14
# Groups: chrom, regionStart, regionEnd [2]
chrom start end rsid a1 a2 EAF b SE mlog10p n
<chr> <dbl> <dbl> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <int>
1 chr13 113800622 113800622 13:11… t c 0.373 -0.541 0.0306 69.0 2491
2 chr14 94750486 94750486 14:94… t c 0.989 1.52 0.136 28.5 2491
# 3 more variables: regionStart <dbl>, regionEnd <dbl>, .overlap <int>
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.