causal_loci {KnockoffHybrid}R Documentation

Identification of causal loci

Description

Identification of causal loci using KnockoffHybrid's feature statistics

Usage

causal_loci(window, M = 10, fdr = 0.2)

Arguments

window

The result window from KnockoffHybrid. If there are multiple windows, please use rbind to combine the windows.

M

A positive integer for the number of knockoffs. The default is 10.

fdr

A real number in a range of (0,1) indicating the target FDR level. The default is 0.2.

Value

A list that contains:

window

A data frame for an updated window that includes an extra column for KnockoffHybrid's Q-values. A locus with a Q-value <= the target FDR level, i.e., window$q<=fdr, is considered as causal.

thr.w

A positive real number indicating the significance threshold for KnockoffTrio's feature statistics. A locus with a feature statistic >= thr.w, i.e., window$w>=thr.w is considered as causal. The loci selected by window$w>=thr.w are equivalent to those by window$q<=fdr. No loci are selected at the target FDR level if thr.w=Inf.

Examples

data(KnockoffHybrid.example)
dat.ko<-create_knockoff(KnockoffHybrid.example$dat.hap,KnockoffHybrid.example$pos,M=10)
weight<-calculate_weight(geno=KnockoffHybrid.example$dat.pop,y=KnockoffHybrid.example$y.pop)
window<-KnockoffHybrid(dat=KnockoffHybrid.example$dat,dat.ko=dat.ko,
        pos=KnockoffHybrid.example$pos,weight=weight)
result<-causal_loci(window,M=10,fdr=0.2)

[Package KnockoffHybrid version 1.0.0 Index]