Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions R/checkIDs.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ checkIDs <- function(ped, verbose = FALSE, repair = FALSE) {
if (length(validation_results$non_unique_ids) > 0) {
# loop through each non-unique ID

processed <- dropIdenticalDuplicateIDs(ped = repaired_ped,
processed <- dropIdenticalDuplicateIDs(
ped = repaired_ped,
ids = validation_results$non_unique_ids,
changes = changes)
changes = changes
)
repaired_ped <- processed$ped
changes <- processed$changes
}
Expand Down
9 changes: 3 additions & 6 deletions R/checkParents.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ checkParentIDs <- function(ped, verbose = FALSE, repair = FALSE,
validation_results$single_parents <- (length(missing_fathers) + length(missing_mothers)) > 0





if (verbose && validation_results$single_parents) cat("Missing single parents found.\n")
if (verbose && !validation_results$single_parents) cat("No missing single parents found.\n")

Expand Down Expand Up @@ -269,12 +266,12 @@ checkParentIDs <- function(ped, verbose = FALSE, repair = FALSE,
}

# restore orginal names that the user orginally provided
ped <- restorePedColnames(ped,
ped <- restorePedColnames(ped,
famID = famID,
personID = personID,
momID = momID,
dadID = dadID)

dadID = dadID
)
}
#' Repair Parent IDs
#'
Expand Down
3 changes: 1 addition & 2 deletions R/helpChecks.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
#' @param ped A data frame representing the pedigree.
#' @param ids A vector of IDs to check for duplicates in the pedigree.
#' @param changes An optional list to log changes made during the process.
dropIdenticalDuplicateIDs <- function(ped, ids, changes = NULL
) {
dropIdenticalDuplicateIDs <- function(ped, ids, changes = NULL) {
if (!is.data.frame(ped)) {
stop("ped must be a data frame")
}
Expand Down
Loading
Loading