Skip to content

Commit

Permalink
Merge pull request #55 from BIGslu/dev
Browse files Browse the repository at this point in the history
error: incorrect ref definition for kmFit contrasts
  • Loading branch information
kdillmcfarland authored May 26, 2022
2 parents 64153c4 + 205bdac commit 5b378db
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 5b378db

Please sign in to comment.