This function takes in the p-values tibble that mvmapit returned. It then computes the combined p-values grouped by variant id.

harmonic_combined(pvalues, group_col = "id", p_col = "p")

Arguments

pvalues

Tibble with p-values from mvmapit function call. Grouping is based on the column named "id"

group_col

String that denotes column by which to group and combine p-values.

p_col

String that denotes p-value column.

Value

A Tibble with the combined p-values.

Examples

set.seed(837)
p <- 200
n <- 100
d <- 2
X <- matrix(
    runif(p * n),
    ncol = p
)
Y <- matrix(
    runif(d * n),
    ncol = d
)
mapit <- mvmapit(
    t(X),
    t(Y),
    test = "normal", cores = 1, logLevel = "INFO"
)
#> 2023-10-16 16:39:04.21806 INFO:mvmapit:Running normal C++ routine.
harmonic <- harmonic_combined(mapit$pvalues)