From 85c22a2a214656b43ba6b819a0550ce12fafa32d Mon Sep 17 00:00:00 2001 From: Magnus Dehli Vigeland Date: Mon, 2 Oct 2023 15:30:31 +0200 Subject: [PATCH] Final tweak --- DESCRIPTION | 2 +- NEWS.md | 13 +++++++++++-- R/marker_utils.R | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 425174d..542fcc1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: pedtools Title: Creating and Working with Pedigrees and Marker Data -Version: 2.3.1.9000 +Version: 2.4.0 Authors@R: person("Magnus Dehli", "Vigeland", , "m.d.vigeland@medisin.uio.no", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9134-4962")) diff --git a/NEWS.md b/NEWS.md index 5bdda56..d5cd426 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,20 @@ -# Development version +# pedtools 2.4.0 -* `plot.list()` now handles general (unnested) lists of `ped` objects. This means that, for instance, with `x = list(nuclearPed(1), cousinPed(1))`, the command `plot(x)` simply works. Previously all ped lists had to be handled by `plotPedList()`. (This is still needed for finer control of each component, and with nested lists.) +## New features + +* The `plot()` method now handles general (unnested) lists of `ped` objects. This means that, for instance, with `x = list(nuclearPed(1), cousinPed(1), singleton(1))`, the command `plot(x)` simply works. Previously all ped lists had to be handled by `plotPedList()`. (This is still needed for finer control of each component, and with nested lists.) * `nMarkers()` and `hasMarkers()` have a new argument `compwise` for more detailed output for ped lists. * `linearPed(0)` now produces a singleton (instead of an error). +* `setAfreq()` now automatically updates the mutation model of the affected marker, if present. + +* `readFreqDatabase()` now accepts frequency files using the *long format* of MERLIN. + +* `readFreqDatabase()` gains a logical argument `scale1`, which, if TRUE, scales all vectors to sum 1. + + # pedtools 2.3.1 ## New features diff --git a/R/marker_utils.R b/R/marker_utils.R index 3e8cb64..36f90e6 100644 --- a/R/marker_utils.R +++ b/R/marker_utils.R @@ -64,7 +64,7 @@ nMarkers = function(x, compwise = FALSE) { return(nvec) if(!listIdentical(nvec)) - stop2("The pedigree components have different number of markers") + stop2("The pedigree components have different number of markers attached") return(nvec[[1]]) } stop2("Input to `nMarkers()` must be a `ped` object or a list of such")