Skip to content

Commit

Permalink
error: incorrect ref definition for kmFit contrasts
Browse files Browse the repository at this point in the history
  • Loading branch information
kdillmcfarland committed May 26, 2022
1 parent 2107809 commit 205bdac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 <kadm@uw.edu>
Description: Linear mixed effects models with pairwise kinship for RNA-seq data.
Expand Down
7 changes: 5 additions & 2 deletions R/kmFit_contrast.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}

0 comments on commit 205bdac

Please sign in to comment.