Learn R Programming

pcadapt (version 1.0)

fdrList: Auxiliary function

Description

fdrList returns a list of false discovery rates for different thresholds.

Usage

fdrList(snps, adjpval, list_selection, thresholds = seq(0.01, 0.5, length =
  100))

Arguments

snps
a vector of indices.
adjpval
a vector of adjusted p-values.
list_selection
a vector of indices containing the list of all the SNPs under selection.
threholds
a vector containing the control thresholds. Default value set to seq(0.01,0.50,length=100).

Examples

Run this code
x <- read4pcadapt("geno3pops",option="example")
y <- pcadapt(x,K=3)
P <- pval(y)
ranked_snps <- order(P[,1],decreasing=FALSE)
adjpval <- p.adjust(sort(P[,1]),method="BH",n=length(P[,1]))
fdrList(ranked_snps,adjpval,1:250,thresholds=seq(0.05,0.5,length=10))

Run the code above in your browser using DataLab