pvdiv_fdr: Compute Adjusted False Discovery Rate for pvdiv_gwas output.

Description Usage Arguments Value Examples

View source: R/pvdiv_gwas_results.R

Description

Determines the false discovery rate for p-values from a dataframe. By default, this function uses a Benjamini-Hochberg correction on a column called "p.value" to determine a new column of FDR-adjusted p-values.

Usage

1
pvdiv_fdr(gwas_obj, alpha = 0.05, proc = "BH")

Arguments

gwas_obj

A dataframe with a p.value column.

alpha

The type I error threshold. Default is 0.05.

proc

The procedure (used wholesale from multtest::mt.rawp2adjp) used to calculate the False Discovery Rate. Default is Benjamini Hochberg, "BH".

Value

A tbl_df() of the original dataframe with a new column named FDR_adjusted_p.

Examples

1
2
3
4
5
6
7
8
## Not run: 
gwas_df <- read_csv(file = "LEN.full.GWAS.csv.gz", col_names = TRUE,
    col_types = "ciinnnn")
gwas_fdr_1 <- pvdiv_fdr(gwas_obj = gwas_df, alpha = 0.1)
gwas_fdr_05 <- pvdiv_fdr(gwas_obj = gwas_df)
gwas_fdr_bonf <- pvdiv_fdr(gwas_obj = gwas_df, proc = "Bonferroni")

## End(Not run)

Alice-MacQueen/switchgrassGWAS documentation built on Jan. 23, 2022, 7:55 p.m.