Skip to content

Commit

Permalink
Fix bug in addint and addcovarint re X chr QTL (Issue #101)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbroman committed Mar 24, 2023
1 parent d414c01 commit 65d4f5a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: qtl
Version: 1.59-1
Date: 2023-02-18
Version: 1.59-2
Date: 2023-03-23
Title: Tools for Analyzing QTL Experiments
Author: Karl W Broman <broman@wisc.edu> and Hao Wu, with
ideas from Gary Churchill and Saunak Sen and contributions from
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Revision history for the R/qtl package

## Version 1.59, 2023-02-18
## Version 1.59-2, 2023-03-23

### Minor changes

- In the CITATION file, change from `citEntry()` to `bibentry()`.

### Bug fixes

- Fixed bug in addint() and addcovarint(): when X chr QTL and missing
phenotypes, would halt with error because cross wasn't getting
subset. (Issue #101)


## Version 1.58, 2022-12-22

Expand Down
6 changes: 4 additions & 2 deletions R/addqtl.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# addqtl.R
#
# copyright (c) 2007-2021, Karl W. Broman
# last modified Mar, 2021
# copyright (c) 2007-2023, Karl W. Broman
# last modified Mar, 2023
# first written Nov, 2007
#
# This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -133,6 +133,7 @@ addint <-
qtl$prob <- lapply(qtl$prob, function(a) a[!hasmissing,,drop=FALSE])

if(!is.null(covar)) covar <- covar[!hasmissing,,drop=FALSE]
cross <- subset(cross, ind=!hasmissing)
}
}

Expand Down Expand Up @@ -1284,6 +1285,7 @@ addcovarint <-
qtl$prob <- lapply(qtl$prob, function(a) a[!hasmissing,,drop=FALSE])

covar <- covar[!hasmissing,,drop=FALSE]
cross <- subset(cross, ind=!hasmissing)
}
}

Expand Down

0 comments on commit 65d4f5a

Please sign in to comment.