Skip to content

Commit

Permalink
Revise cross2_to_grcm39 to consider GM/MM combination (Issue rqtl#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbroman committed Mar 17, 2023
1 parent e6e0a18 commit 2da7a37
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: mmconvert
Version: 0.3-2
Version: 0.3-3
Date: 2023-03-17
Title: Mouse Map Converter
Description: Function to convert mouse genome positions between the build 39 physical map and the Cox genetic map <doi:10.1534/genetics.109.105486>.
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
## mmconvert 0.3-2 (2023-03-17)
## mmconvert 0.3-3 (2023-03-17)

- Revised Cox genetic maps, estimated using the original crimap software.

- Revised MUGAmaps, using the corrected Cox genetic maps.

- Revised `cross2_to_grcm39()` so that it will also consider that
markers are from the combination of GigaMUGA and MegaMUGA arrays
(Issue #6).


## mmconvert 0.2-4 (2021-10-13)

Expand Down
8 changes: 8 additions & 0 deletions R/cross2_to_grcm39.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ cross2_to_grcm39 <-
# compare marker names to the four MUGA arrays
# use the one with the most matches

# include the combination of GM and MM
muga_maps$gm_n_mm <- rbind(muga_maps$gm, muga_maps$mm[!(muga_maps$mm$marker %in% muga_maps$gm$marker),])
muga_maps$gm_n_mm <- muga_maps$gm_n_mm[order( factor(muga_maps$gm_n_mm$chr, c(1:19,"X")),
muga_maps$gm_n_mm$bp_grcm39,
muga_maps$gm_n_mm$cM_cox,
muga_maps$gm_n_mm$marker), ]


n_match <- vapply(muga_maps, function(a,b) sum(b %in% a$marker), 0, markers)
if(!any(n_match > 0)) {
stop("No markers found in the MUGA arrays")
Expand Down

0 comments on commit 2da7a37

Please sign in to comment.