diff --git a/NEWS.md b/NEWS.md index b5a21be..a5efd80 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +## propr 5.0.4 +--------------------- +* Added fixseed option for runGraflex +* Fix bug: NAs produced by integer overflow in getOR + ## propr 5.0.3 --------------------- * Added fixseed option for updatePermutes diff --git a/R/2d-propd-graflex.R b/R/2d-propd-graflex.R index 4572255..68d6a67 100644 --- a/R/2d-propd-graflex.R +++ b/R/2d-propd-graflex.R @@ -53,7 +53,6 @@ binTab <- function(A, G) { #' This function calculates the overlap between #' two vectors or two adjacency matrices. #' It returns the OR as well as other metrics. -#' @inheritParams binTab #' @return A \code{data.frame} of results. getOR <- function(A, G) { tab <- binTab(A, G) @@ -75,7 +74,6 @@ getOR <- function(A, G) { #' #' Note that this function calculates overlap for the #' lower-left triangle of the input matrices. -#' @inheritParams permuteOR calculateOR <- function(A, G) { Astar <- A[lower.tri(A)] Gstar <- G[lower.tri(G)] @@ -109,7 +107,6 @@ getFDR <- function(actual, permuted) { #' false discovery rate (FDR) by counting the number of #' times the actual OR was greater than #' (or less than) a permuted OR. -#' @inheritParams permuteOR #' @param A An adjacency matrix. #' @param K A knowledge database where each row is a graph node #' and each column is a concept. diff --git a/man/calculateOR.Rd b/man/calculateOR.Rd index 4b4f4e7..46556f7 100644 --- a/man/calculateOR.Rd +++ b/man/calculateOR.Rd @@ -6,9 +6,6 @@ \usage{ calculateOR(A, G) } -\arguments{ -\item{A, G}{An adjacency matrix.} -} \description{ This function calculates an odds ratio for the edge overlap between two non-random graphs. diff --git a/man/getOR.Rd b/man/getOR.Rd index a5e35c0..8fdef45 100644 --- a/man/getOR.Rd +++ b/man/getOR.Rd @@ -6,9 +6,6 @@ \usage{ getOR(A, G) } -\arguments{ -\item{A, G}{A vector or adjacency matrix.} -} \value{ A \code{data.frame} of results. } diff --git a/man/permuteOR.Rd b/man/permuteOR.Rd index 71d4401..9162559 100644 --- a/man/permuteOR.Rd +++ b/man/permuteOR.Rd @@ -4,12 +4,15 @@ \alias{permuteOR} \title{Permute Odds Ratio} \usage{ -permuteOR(A, G, p = 500) +permuteOR(A, G, p = 500, fixseed = FALSE) } \arguments{ \item{A, G}{An adjacency matrix.} \item{p}{An integer. The number of overlaps to permute.} + +\item{fixseed}{A logical. If \code{TRUE}, the seed is fixed +for reproducibility.} } \description{ This function permutes \code{p} odds ratios for the diff --git a/man/runGraflex.Rd b/man/runGraflex.Rd index 648ac94..3184dd1 100644 --- a/man/runGraflex.Rd +++ b/man/runGraflex.Rd @@ -4,7 +4,7 @@ \alias{runGraflex} \title{Permute FDR for Multiple Concepts} \usage{ -runGraflex(A, K, p = 500) +runGraflex(A, K, p = 500, fixseed = FALSE) } \arguments{ \item{A}{An adjacency matrix.} @@ -13,6 +13,9 @@ runGraflex(A, K, p = 500) and each column is a concept.} \item{p}{An integer. The number of overlaps to permute.} + +\item{fixseed}{A logical. If \code{TRUE}, the seed is fixed +for reproducibility.} } \description{ This function calls \code{\link{permuteOR}} for each