Checks the validity of the p and maxval input arguments that
is used within the ctar package.
Usage
check_p(p, maxval, two_traits = FALSE)
Arguments
- p
list of numeric vectors. Contains the p-values from each GWAS.
- maxval
numeric scalar in range \((0, 1]\) (default: 1).
The maximum value for p-values to be considered for analysis.
- two_traits
logical (default: FALSE). Is the call for two traits?
Value
check_p returns a list with three elements:
Examples
p <- list(c(0.01, 0.02), c(0.03, 0.04))
maxval <- 0.05
check_p(p, maxval)
#> $number_of_traits
#> [1] 2
#>
#> $number_of_snps
#> [1] 2 2
#>
#> $p_matrix
#> [,1] [,2]
#> [1,] 0.01 0.03
#> [2,] 0.02 0.04
#>