Skip to content

Added parentage functions#59

Open
josuechinchilla wants to merge 13 commits into
developmentfrom
add_parentage_functions
Open

Added parentage functions#59
josuechinchilla wants to merge 13 commits into
developmentfrom
add_parentage_functions

Conversation

@josuechinchilla
Copy link
Copy Markdown
Collaborator

Added 2 parentage functions along with test files for them. updated imporFrom statemetns for ped_check

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates package exports/imports to support new pedigree/parentage-related functionality, including exposing validate_pedigree() and tightening check_ped() dependency declarations.

Changes:

  • Export validate_pedigree() and add its data.table roxygen imports.
  • Replace broad @import directives in check_ped() with more specific @importFrom entries.
  • Regenerate/update NAMESPACE accordingly (including adding tools::file_path_sans_ext and janitor::clean_names imports).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
R/validate_pedigree.R Adds @importFrom data.table ... for validate_pedigree() and ensures it’s exported.
R/check_ped.R Switches roxygen imports to @importFrom for dplyr/janitor and adds tools::file_path_sans_ext.
NAMESPACE Updates exports/imports to match roxygen (adds export(validate_pedigree), switches janitor import style, adds additional dplyr imports).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/check_ped.R Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/validate_pedigree.R Outdated
#' \item{Best_Female_Parent_Error_Pct}{Homozygous mismatch percentage for the best female parent candidate.}
#' }
#' @export
#' @importFrom data.table fread fwrite copy data.table set rbindlist
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The roxygen @importFrom data.table ... line is redundant with the current implementation, since all referenced data.table APIs are called via data.table::.... Consider either removing this @importFrom (and relying on data.table::), or dropping the data.table:: qualifiers and keeping the import—having both makes the dependency surface harder to reason about.

Suggested change
#' @importFrom data.table fread fwrite copy data.table set rbindlist

Copilot uses AI. Check for mistakes.
Comment thread R/check_ped.R Outdated
Comment on lines +42 to +45
#' @importFrom janitor clean_names
#' @importFrom stats setNames
#' @importFrom utils read.table
#' @importFrom tools file_path_sans_ext
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These @importFrom tags for janitor::clean_names, stats::setNames, and tools::file_path_sans_ext are currently unused because the code calls them with explicit namespaces (janitor::, stats::, tools::). Consider removing the unused imports, or alternatively removing the namespace qualifiers if you want to rely on imports—mixing both makes it harder to audit dependencies.

Suggested change
#' @importFrom janitor clean_names
#' @importFrom stats setNames
#' @importFrom utils read.table
#' @importFrom tools file_path_sans_ext
#' @importFrom utils read.table

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 54.51713% with 146 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.96%. Comparing base (ccc0952) to head (f798362).

Files with missing lines Patch % Lines
R/find_parentage.R 16.45% 66 Missing ⚠️
R/validate_pedigree.R 32.63% 64 Missing ⚠️
R/check_ped.R 89.11% 16 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development      #59      +/-   ##
===============================================
- Coverage        81.53%   78.96%   -2.58%     
===============================================
  Files               23       23              
  Lines             2616     2814     +198     
===============================================
+ Hits              2133     2222      +89     
- Misses             483      592     +109     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josuechinchilla josuechinchilla removed the request for review from alex-sandercock April 23, 2026 20:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

man/validate_pedigree.Rd:90

  • The function always writes corrected_pedigree.txt to the working directory (even when write_results = FALSE), but this side-effect isn’t documented here. Please document this output file (including when it’s written and how it relates to write_results) so users aren’t surprised by unexpected files in their working directory.
\description{
Validates parent-offspring trios by calculating Mendelian error rates from
SNP genotype data. Identifies incorrect parentage assignments and suggests
best-matching replacements. If a list of founders is supplied, trios that
are declared founders (both parents coded as 0) are preserved unchanged
with no recommendations. Trios removed due to missing genotype data are
retained in the output with a NO_GENOTYPE_DATA status.
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/find_parentage.R Outdated
Comment on lines +351 to +353
# Replace any empty strings with NA
for (col in base::names(final_df)) {
data.table::set(final_df, which(final_df[[col]] == ""), col, NA_character_)
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In best_pair, the post-merge loop that replaces empty strings uses final_df[[col]] == "" for all columns and then assigns NA_character_ via data.table::set(). This can coerce numeric/integer columns (e.g., Markers_Tested) to character or error depending on data.table coercion rules. Restrict the empty-string cleanup to character columns (and assign NA_character_ only there), or use type-appropriate NA values per column.

Suggested change
# Replace any empty strings with NA
for (col in base::names(final_df)) {
data.table::set(final_df, which(final_df[[col]] == ""), col, NA_character_)
# Replace any empty strings with NA in character columns only
char_cols <- base::names(final_df)[
base::vapply(final_df, base::is.character, logical(1))
]
for (col in char_cols) {
empty_idx <- which(final_df[[col]] == "")
if (base::length(empty_idx) > 0) {
data.table::set(final_df, empty_idx, col, NA_character_)
}

Copilot uses AI. Check for mistakes.
Comment thread R/find_parentage.R Outdated
linewidth = 1
) +
ggplot2::scale_x_continuous(breaks = seq(0, 100, by = 5)) +
ggplot2::scale_y_continuous(breaks = seq(0, 10000, by = 5)) +
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scale_y_continuous(breaks = seq(0, 10000, by = 5)) creates ~2000 y-axis breaks, which can significantly slow plot rendering and often produces unreadable axes. Consider removing the explicit y breaks (let ggplot pick), or use a much coarser/pretty break strategy based on the actual range (e.g., scales::pretty_breaks()).

Suggested change
ggplot2::scale_y_continuous(breaks = seq(0, 10000, by = 5)) +
ggplot2::scale_y_continuous(breaks = scales::pretty_breaks()) +

Copilot uses AI. Check for mistakes.
Comment thread R/find_parentage.R
Comment on lines 374 to +378
if (write_txt) {
output_filename <- "parentage_results_dt.txt"
output_filename <- "parentage_testing_results.txt"
tryCatch({
data.table::fwrite(final_df, file = output_filename, sep = "\t", quote = FALSE)
data.table::fwrite(final_df, file = output_filename, sep = "\t", quote = FALSE,
na = na_string)
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output filename for write_txt = TRUE is hard-coded to parentage_testing_results.txt. Since this used to be a different filename, this is a behavioral breaking change for scripts that relied on the old name, and there’s no way to override it. Consider adding an output_filename argument (with the current value as default) and/or supporting the previous filename via a deprecated option to avoid breaking existing workflows.

Copilot uses AI. Check for mistakes.
Comment thread R/check_ped.R Outdated
#### check 4: missing parents ####
all_ids <- unique(data$id)
ref_ids <- unique(c(data$male_parent, data$female_parent))
ref_ids <- ref_ids[ref_ids != "0"]
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref_ids <- ref_ids[ref_ids != "0"] does not drop NA values (because NA != "0" yields NA), so missing_ids <- setdiff(ref_ids, all_ids) can include NA. That can lead to a founder row with id = NA being added when correct = TRUE. Filter out NA explicitly (and consider trimming empty strings) before computing missing_ids.

Suggested change
ref_ids <- ref_ids[ref_ids != "0"]
ref_ids <- trimws(ref_ids)
ref_ids <- ref_ids[!is.na(ref_ids) & ref_ids != "" & ref_ids != "0"]

Copilot uses AI. Check for mistakes.
Comment thread R/check_ped.R Outdated
#### zip export ####
if (save_zip) {
tmp_dir <- tempfile()
dir.create(tmp_dir)
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When save_zip = TRUE, a temporary directory is created (tmp_dir <- tempfile(); dir.create(tmp_dir)) but it’s never cleaned up. Add an on.exit(unlink(tmp_dir, recursive = TRUE), add = TRUE) (or equivalent) so tests/usage don’t leave temp folders behind.

Suggested change
dir.create(tmp_dir)
dir.create(tmp_dir)
on.exit(unlink(tmp_dir, recursive = TRUE), add = TRUE)

Copilot uses AI. Check for mistakes.
Comment thread R/validate_pedigree.R Outdated
ggplot2::theme(legend.position = "top")
print(p)
if (write_results) {
plot_filename <- base::sub("\\.[^.]+$", ".jpg", output_filename)
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plot_filename <- sub("\\.[^.]+$", ".jpg", output_filename) only changes the name if output_filename already has an extension. If a user passes output_filename = "report", the plot would be saved as report (no .jpg). Consider building the plot filename with tools::file_path_sans_ext(output_filename) + .jpg to handle both cases reliably.

Suggested change
plot_filename <- base::sub("\\.[^.]+$", ".jpg", output_filename)
plot_filename <- paste0(tools::file_path_sans_ext(output_filename), ".jpg")

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread NAMESPACE
Comment on lines 25 to 30
export(updog2vcf)
export(validate_pedigree)
import(dplyr)
import(janitor)
import(parallel)
import(quadprog)
import(stringr)
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

janitor was removed from the NAMESPACE imports, and there are no remaining references in the R code. The package still lists janitor under Imports in DESCRIPTION, which will keep it as a hard dependency unnecessarily. Consider removing it from DESCRIPTION (or re-adding the NAMESPACE import if it's still intended to be required).

Copilot uses AI. Check for mistakes.
Comment thread R/validate_pedigree.R
comparisons <- base::sum(!base::is.na(cand_hom) & !base::is.na(prog_hom))
if (comparisons == 0) return(NA_real_)
(base::sum(cand_hom != prog_hom, na.rm = TRUE) / comparisons) * 100
})
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In find_best_parent(), if all candidate mismatch rates are NA (e.g., no overlapping homozygous markers), which.min(errors) returns integer(0), so candidates[best_idx] becomes character(0) instead of NA. This can propagate empty strings/zero-length values into Best_*_Candidate and make downstream logic/tests brittle. Consider explicitly handling the all-NA case (e.g., if all(is.na(errors)) then return list(id = NA_character_, error_pct = NA_real_)).

Suggested change
})
})
if (base::all(base::is.na(errors)))
return(base::list(id = NA_character_, error_pct = NA_real_))

Copilot uses AI. Check for mistakes.
Comment thread man/validate_pedigree.Rd
Comment on lines +45 to +56
\item{write_results}{Logical. If TRUE, writes the validation results to
output_filename and saves the plot as a .jpg file (default: TRUE).}

\item{output_filename}{Character. Path/name of the output file
(default: "pedigree_validation_results.txt").}
\item{output_filename}{Character. Path/name of the output results file
(default: "__validation_report.txt"). The plot will be saved using the
same base name with a .jpg extension.}

\item{plot_results}{Logical. If TRUE, prints a histogram of Trio Mendelian
Error percentages with a threshold line (default: TRUE). If write_results
is also TRUE, the plot is additionally saved as a .jpg file.}

\item{na_string}{Character. String for missing values in the output file.
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate_pedigree() always writes corrected_pedigree.txt to the working directory, but the Rd docs don't mention this side effect or how (if at all) it can be disabled/configured. Since this can surprise callers (and is why tests now need temp working dirs), please document the corrected pedigree output (and ideally add a parameter to control its generation or output path).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

NAMESPACE:33

  • NAMESPACE no longer imports janitor, and a repo-wide search shows no remaining janitor:: usage. However, DESCRIPTION still lists janitor under Imports, which will typically trigger an R CMD check NOTE about unused imports. Either remove janitor from DESCRIPTION or reintroduce an actual use/import as appropriate.
import(dplyr)
import(parallel)
import(quadprog)
import(stringr)
import(tibble)
import(tidyr)
import(vcfR)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/check_ped.R
Comment on lines 139 to 145
detect_all_cycles <- function(data) {
adj_list <- lapply(data$id, function(x) {
row <- data[data$id == x, ]
c(row$sire, row$dam)
c(row$male_parent, row$female_parent)
})
names(adj_list) <- data$id

Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detect_all_cycles() builds adj_list using data$id and then sets names(adj_list) <- data$id. If id is duplicated (which is explicitly one of the issues this function detects), the adjacency list and the visited/rec_stack named vectors end up with duplicate names. Indexing by name (visited[node], adj_list[[node]]) then becomes ambiguous and can silently mis-detect or miss cycles. Consider running cycle detection on a de-duplicated/normalized pedigree (e.g., one row per id after duplicate removal / conflict resolution) or explicitly constructing the graph from unique(data$id) (or a key) so node names are unique.

Copilot uses AI. Check for mistakes.
Comment thread R/check_ped.R Outdated
Comment on lines +307 to +310
invisible(capture.output(
utils::zip(zipfile = zip_path, files = zip_files, flags = "-j")
))
if (verbose) cat(paste0("\nZip archive saved to: ", zip_path, "\n"))
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The save_zip path calls utils::zip(...) without any error handling. On systems without an available zip utility (or where getOption("zip") points to a missing binary), this will error and abort check_ped(), even though zipping is an optional feature. Wrap the zip creation in tryCatch() (and/or preflight with nzchar(Sys.which(getOption("zip")))) so failures produce a clear warning/error message without leaving partial output behind.

Suggested change
invisible(capture.output(
utils::zip(zipfile = zip_path, files = zip_files, flags = "-j")
))
if (verbose) cat(paste0("\nZip archive saved to: ", zip_path, "\n"))
zip_cmd <- getOption("zip")
zip_bin <- if (nzchar(zip_cmd)) Sys.which(zip_cmd) else ""
if (!nzchar(zip_bin)) {
warning(
paste0(
"Zip archive was not created because no usable zip utility was found. ",
"Configure options(zip = ...) to point to a valid zip binary."
),
call. = FALSE
)
} else {
zip_ok <- tryCatch({
invisible(capture.output(
utils::zip(zipfile = zip_path, files = zip_files, flags = "-j")
))
TRUE
}, error = function(e) {
if (file.exists(zip_path)) unlink(zip_path)
warning(
paste0("Zip archive could not be created: ", conditionMessage(e)),
call. = FALSE
)
FALSE
})
if (zip_ok && verbose) cat(paste0("\nZip archive saved to: ", zip_path, "\n"))
}

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/check_ped.R
Comment on lines 138 to 169
detect_all_cycles <- function(data) {
adj_list <- lapply(data$id, function(x) {
row <- data[data$id == x, ]
c(row$sire, row$dam)
c(row$male_parent, row$female_parent)
})
names(adj_list) <- data$id

dfs <- function(node, visited, rec_stack, path) {
visited[node] <- TRUE
visited[node] <- TRUE
rec_stack[node] <- TRUE
path <- append(path, node)
path <- append(path, node)
cycles <- list()

for (neighbor in adj_list[[node]]) {
if (neighbor %in% names(adj_list)) {
if (!visited[neighbor]) {
cycles <- append(cycles, dfs(neighbor, visited, rec_stack, path))
} else if (rec_stack[neighbor]) {
cycle_start <- match(neighbor, path)
cycles <- append(cycles, list(path[cycle_start:length(path)]))
}
}
}

rec_stack[node] <- FALSE
return(cycles)
}

visited <- stats::setNames(rep(FALSE, length(adj_list)), names(adj_list))
visited <- stats::setNames(rep(FALSE, length(adj_list)), names(adj_list))
rec_stack <- stats::setNames(rep(FALSE, length(adj_list)), names(adj_list))
all_cycles <- list()

for (node in names(adj_list)) {
if (!visited[node]) {
node_cycles <- dfs(node, visited, rec_stack, character())
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cycle detection can error when the input pedigree contains duplicate IDs (which is exactly what check_ped is meant to detect). adj_list and visited/rec_stack are keyed by data$id (which may include duplicates), so expressions like if (!visited[node]) / if (!visited[neighbor]) can receive a vector and throw the condition has length > 1. Build the adjacency list over unique(data$id) (and aggregate parents per ID), ensuring visited/rec_stack have unique names before running DFS.

Copilot uses AI. Check for mistakes.
Comment thread R/find_parentage.R
Comment on lines +401 to +403
plot_df <- final_df[!is.na(final_df$Mendelian_Error_Pct)]
plot_df$Mendelian_Error_Pct <- base::as.numeric(plot_df$Mendelian_Error_Pct)

Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plot code has to coerce Mendelian_Error_Pct with as.numeric(), which suggests the results column is not consistently numeric. That makes downstream comparisons and summaries more error-prone (and can introduce NAs if formatting changes). Prefer keeping Mendelian_Error_Pct numeric in the returned data.table for all methods, and only format it as a string when writing/printing.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 19 changed files in this pull request and generated 7 comments.

Files not reviewed (6)
  • man/allele_freq_poly.Rd: Language not supported
  • man/check_ped.Rd: Language not supported
  • man/find_parentage.Rd: Language not supported
  • man/imputation_concordance.Rd: Language not supported
  • man/solve_composition_poly.Rd: Language not supported
  • man/validate_pedigree.Rd: Language not supported
Comments suppressed due to low confidence (1)

DESCRIPTION:66

  • janitor remains listed under Imports, but there are no longer any janitor:: (or clean_names) usages in the R sources. This makes janitor an unnecessary hard dependency; consider removing it from DESCRIPTION Imports if it's truly unused.
Imports: 
    parallel,
    dplyr,
    Rdpack (>= 0.7),
    readr (>= 2.1.5),
    reshape2 (>= 1.4.4),
    rlang,
    tidyr (>= 1.3.1),
    vcfR (>= 1.15.0),
    Rsamtools,
    Biostrings,
    pwalign,
    janitor,
    quadprog,
    tibble,
    stringr,
    data.table
Suggests: 

Comment thread R/check_ped.R
Comment on lines 54 to 69
data <- utils::read.table(ped.file, header = TRUE) %>%
janitor::clean_names() %>%
mutate(
id = as.character(id),
sire = as.character(sire),
dam = as.character(dam)
dplyr::mutate(
id = as.character(id),
male_parent = as.character(male_parent),
female_parent = as.character(female_parent)
)

# Validate required column names before any processing
required_cols <- c("id", "male_parent", "female_parent")
missing_cols <- setdiff(required_cols, colnames(data))
if (length(missing_cols) > 0) {
stop(
"Input file is missing required column(s): ",
paste(missing_cols, collapse = ", "),
".\nExpected columns: id, male_parent, female_parent."
)
Comment thread R/check_ped.R
Comment on lines +45 to +49
check_ped <- function(ped.file,
seed = NULL,
verbose = TRUE,
correct_conflicting_trios = TRUE,
correct_inconsistent_sex_roles = TRUE) {
Comment thread R/check_ped.R
Comment on lines 226 to 234
input_ped_report <- list(
exact_duplicates = exact_duplicates,
repeated_ids_diff = repeated_ids_report,
messy_parents = messy_parents,
missing_parents = missing_parents,
dependencies = data.frame(Dependency = unique(unlist(errors)))
exact_duplicates = exact_duplicates,
conflicting_trios = repeated_ids_report,
inconsistent_sex_roles = inconsistent_sex_roles,
missing_parents = missing_parents,
dependencies = data.frame(Dependency = unique(unlist(errors)),
stringsAsFactors = FALSE),
corrected_pedigree = data %>% dplyr::select(-row_number)
)
Comment on lines +17 to +33
test_that("check_ped returns a named list of length 5", {
ped <- data.frame(
id = c("A", "B", "C"),
male_parent = c("0", "A", "A"),
female_parent = c("0", "0", "0")
)
out <- check_ped(write_ped(ped), seed = 1, verbose = FALSE, correct = FALSE)

#Calculations
output.list <- check_ped(ped_file,
seed = 101919,
verbose = FALSE)
expect_type(out, "list")
expect_length(out, 5)
expect_named(out, c(
"exact_duplicates",
"repeated_ids_diff",
"inconsistent_sex_roles",
"missing_parents",
"dependencies"
))
Comment thread man/check_ped.Rd
Comment on lines +7 to 29
check_ped(
ped.file,
seed = NULL,
verbose = TRUE,
correct = TRUE,
save_zip = FALSE,
save_corrected_zip = FALSE
)
}
\arguments{
\item{ped.file}{Path to the pedigree text file.}

\item{seed}{Optional seed for reproducibility.}
\item{seed}{Optional integer seed for reproducibility.}

\item{verbose}{Logical. If TRUE (default), prints errors and prompts for interactive saving.}
\item{verbose}{Logical. Print findings to the console? Default \code{TRUE}.}

\item{correct}{Logical. Build and save a corrected pedigree? Default \code{TRUE}.}

\item{save_zip}{Logical. Export report components as a \code{.zip} archive? Default \code{FALSE}.}

\item{save_corrected_zip}{Logical. Include corrected pedigree in the \code{.zip}?
Only applies when \code{save_zip = TRUE} and \code{correct = TRUE}. Default \code{FALSE}.}
}
Comment thread NAMESPACE
Comment on lines +65 to +71
importFrom(ggplot2,aes)
importFrom(ggplot2,element_text)
importFrom(ggplot2,geom_bar)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,labs)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_minimal)
#'
#' @importFrom dplyr %>% filter arrange
#' @importFrom stats reorder
#' @importFrom ggplot2 ggplot aes geom_bar labs theme_minimal theme element_text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in_progress not ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants