test_by_wFDX: Perform hypothesis testing using weighted false discovery...

Description Usage Arguments Value Examples

View source: R/wrappers.R

Description

Perform hypothesis testing using weighted false discovery controlling quantities wFDR and/or wFDX.

Usage

1
2
test_by_wFDR(scc_scan_file, sampled_nngps_file, outpath, alpha = .01, nthresh = 100, return = FALSE)
test_by_wFDX(scc_scan_file, sampled_nngps_file, outpath, alpha = .01, beta = 0.01, nthresh = 100, return = FALSE)

Arguments

scc_scan_file

Path to the rds file output by run_scc_scan

sampled_nngps_file

Path to the rds file output by sample_new_nngps

outpath

Path to where the output will be written. The output file should be given the .rds file extension.

alpha

Confidence level at which to control false discoveries for the hypothesis text.

beta

Additional exceedance threshold used for testing wFDX. Recommended to set to the same value as alpha.

nthresh

Number of thresholds used to approximate wFDR and wFDX. Defaults to 100.

return

Logical. Should the output also be returned by the function?

Value

If return = TRUE, this function outputs a list of genomic loci and an indicator of whether or not the locus was rejected.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Compute rejections based on weighted false discovery rate
test_by_wFDR(
    scc_scan_file = "inst/extdata/output/z.rds",
    sampled_nngps_file = "inst/extdata/output/pred.rds",
    outpath = "inst/extdata/output/wfdr.rds",
    alpha = 0.1
    )

# Compute rejections based on weighted false discovery exceedence
test_by_wFDX(
    scc_scan_file = "inst/extdata/output/z.rds",
    sampled_nngps_file = "inst/extdata/output/pred.rds",
    outpath = "inst/extdata/output/wfdx.rds",
    alpha = 0.1,
    beta = 0.1
    )

hillarykoch/locdiffr documentation built on April 25, 2021, 6:26 p.m.