Skip to content

Commit 92deafe

Browse files
Update convertPedigree.R
made subfunction variables explict
1 parent 08f0165 commit 92deafe

1 file changed

Lines changed: 42 additions & 14 deletions

File tree

R/convertPedigree.R

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ ped2mit <- ped2mt <- function(ped, max.gen = 25,
387387
saveable = FALSE,
388388
resume = FALSE,
389389
save_rate = 5,
390-
save_rate_gen = save_rate_gen,
390+
save_rate_gen = save_rate,
391391
save_rate_parlist = 1000 * save_rate,
392392
save_path = "checkpoint/",
393393
...) {
@@ -624,7 +624,8 @@ ped2ce <- function(ped,
624624
} else {
625625
stop("Unknown relatedness component requested")
626626
}
627-
list_of_adjacency <- list(iss=iss, jss=jss)
627+
list_of_adjacency <- list(iss=iss,
628+
jss=jss)
628629
return(list_of_adjacency)
629630
}
630631

@@ -646,26 +647,53 @@ compute_parent_adjacency <- function(ped, component,
646647
...) {
647648
if (adjacency_method == "loop") {
648649
if (lastComputed < nr) { # Original version
649-
list_of_adjacency <- .adjLoop(ped, component, saveable, resume,
650-
save_path, verbose, lastComputed,
651-
nr, checkpoint_files, update_rate,
652-
parList, lens, save_rate_parlist,
650+
list_of_adjacency <- .adjLoop(ped=ped,
651+
component=component,
652+
saveable=saveable,
653+
resume = resume,
654+
save_path = save_path,
655+
verbose = verbose,
656+
lastComputed = lastComputed,
657+
nr = nr,
658+
checkpoint_files = checkpoint_files,
659+
update_rate = update_rate,
660+
parList = parList,
661+
lens=lens,
662+
save_rate_parlist=save_rate_parlist,
653663
...)
654664
}
655665
} else if (adjacency_method == "indexed") { # Garrison version
656666
if (lastComputed < nr) {
657-
list_of_adjacency <- .adjIndexed(ped, component, saveable, resume,
658-
save_path, verbose, lastComputed,
659-
nr, checkpoint_files, update_rate,
660-
parList, lens, save_rate_parlist,
667+
list_of_adjacency <- .adjIndexed(ped=ped,
668+
component=component,
669+
saveable=saveable,
670+
resume = resume,
671+
save_path = save_path,
672+
verbose = verbose,
673+
lastComputed = lastComputed,
674+
nr = nr,
675+
checkpoint_files = checkpoint_files,
676+
update_rate = update_rate,
677+
parList = parList,
678+
lens=lens,
679+
save_rate_parlist=save_rate_parlist,
661680
...)
662681
}
663682
} else if (adjacency_method == "direct"){ # Hunter version
664683
if (lastComputed < nr){
665-
list_of_adjacency <- .adjDirect(ped, component, saveable, resume,
666-
save_path, verbose, lastComputed,
667-
nr, checkpoint_files, update_rate,
668-
parList, lens, save_rate_parlist,
684+
list_of_adjacency <- .adjDirect(ped=ped,
685+
component=component,
686+
saveable=saveable,
687+
resume = resume,
688+
save_path = save_path,
689+
verbose = verbose,
690+
lastComputed = lastComputed,
691+
nr = nr,
692+
checkpoint_files = checkpoint_files,
693+
update_rate = update_rate,
694+
parList = parList,
695+
lens=lens,
696+
save_rate_parlist=save_rate_parlist,
669697
...)
670698
}
671699
} else {

0 commit comments

Comments
 (0)