diff --git a/DESCRIPTION b/DESCRIPTION index eaff096..c8a36d5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: kimma Type: Package Title: Kinship In Mixed Model Analysis of RNA-seq -Version: 1.2.0 +Version: 1.3.0 Author: Kim Dill-McFarland Maintainer: Kim Dill-McFarland Description: Linear mixed effects models with pairwise kinship for RNA-seq data. diff --git a/R/kmFit_contrast.R b/R/kmFit_contrast.R index d6c196d..9c76756 100644 --- a/R/kmFit_contrast.R +++ b/R/kmFit_contrast.R @@ -9,7 +9,7 @@ #' @keywords internal kmFit_contrast <- function(fit, contrast.var, to.model.gene, metrics){ - contrast.i <- term <- p.value <- contrast_ref <- contrast_lvl <- contrast <- null.value <- NULL + contrast.i <- term <- p.value <- contrast_ref <- contrast_lvl <- contrast <- null.value <- estimate <- NULL contrast.result <- data.frame() #Fit variables in contrast.var @@ -55,7 +55,10 @@ kmFit_contrast <- function(fit, contrast.var, to.model.gene, metrics){ }} contrast.result.format <- contrast.result %>% dplyr::rename(variable=term, pval=p.value) %>% - dplyr::select(-null.value) + dplyr::select(-null.value) %>% + #Switch estimate sign to match lvl-ref calculation + #THE REF AND LVL VALUES ARE INCORRECT UNTIL YOU DO THIS + dplyr::mutate(estimate = -estimate) return(contrast.result.format) }