Skip to content

Commit

Permalink
bug fix: reporting genome-wide sign P
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-Murphy committed Jul 22, 2023
1 parent 5ad4a42 commit 45259df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: MungeSumstats
Type: Package
Title: Standardise summary statistics from GWAS
Version: 1.9.13
Version: 1.9.14
Authors@R:
c(person(given = "Alan",
family = "Murphy",
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## CHANGES IN VERSION 1.9.14

### Bug fix
* Fix reporting of genome-wide sign variants before formatting.

## CHANGES IN VERSION 1.9.13

### Bug fix
Expand Down
3 changes: 3 additions & 0 deletions R/report_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ report_summary <- function(sumstats_dt,
NULL
}
P_msg <- if ("P" %in% colnames(sumstats_dt)) {
if (!is.numeric(sumstats_dt$P)){
sumstats_dt[,P:=as.numeric(P)]
}
paste0("\n - ",
formatC(nrow(subset(sumstats_dt, P < 5e-8)),
big.mark = ",", format = "fg"),
Expand Down

0 comments on commit 45259df

Please sign in to comment.