Skip to content

Commit

Permalink
Fix Issue #103 re read.cross.csvs with just id as phenotype
Browse files Browse the repository at this point in the history
  • Loading branch information
kbroman committed Sep 18, 2023
1 parent 1acfc04 commit 1f4da07
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 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.61-1
Date: 2023-07-15
Version: 1.61-2
Date: 2023-09-19
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
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Revision history for the R/qtl package

## Version 1.61, 2023-07-15
## Version 1.61, 2023-09-19

### Bug fixes

- Fixed bug in `summary.scanone()` for the case `format="onepheno"` but
`threshold` has length > 1. (Issue #102.)

- Fixed bug in `read.cross()` for format `"csvs"` when the phenotype
file contains only the identifiers. (Issue #103.)


## Version 1.60, 2023-04-18

Expand Down
4 changes: 3 additions & 1 deletion R/read.cross.csvs.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,11 @@ read.cross.csvs <-
else
map <- rep(0,ncol(gen))

colnames(pheno) <- unlist(pheno[1,])
colnames_pheno <- unlist(pheno[1,])

pheno <- apply(pheno, 2, function(a) { a[!is.na(a) & a==""] <- NA; a })
pheno <- as.data.frame(pheno[-1,], stringsAsFactors=TRUE)
colnames(pheno) <- colnames_pheno

# replace empty cells with NA
gen <- sapply(gen,function(a) { a[!is.na(a) & a==""] <- NA; a })
Expand Down

0 comments on commit 1f4da07

Please sign in to comment.