Skip to content

Commit 425d07c

Browse files
Clean up docs and comments in ped2genDist.R
remove non-ASCII
1 parent 38755b7 commit 425d07c

3 files changed

Lines changed: 8 additions & 14 deletions

File tree

R/ped2genDist.R

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# ── Internal helper ───────────────────────────────────────────────────────────
2-
31
#' Reduce an ancestor distance matrix to a pairwise generational distance matrix
42
#'
53
#' Given the \code{n x n} ancestor distance matrix returned by
64
#' \code{ped2com(component = "distance")}, computes a pairwise distance matrix
7-
#' \code{D} where \code{D[i, j]} summarises the relationship between individuals
5+
#' \code{D} where \code{D[i, j]} summarizes the relationship between individuals
86
#' \code{i} and \code{j} through their common ancestors.
97
#'
108
#' For each potential common ancestor column \code{c}, the combined step count
@@ -62,22 +60,20 @@
6260
D[D == -Inf] <- NA_real_
6361

6462
} else {
65-
# mrca_all aggregation strategy across ALL common ancestors is
63+
# mrca_all - aggregation strategy across ALL common ancestors is
6664
# domain-specific (sum? mean? something else?).
6765
# TODO: define aggregation and replace this stop().
6866
# Options to consider:
69-
# sum(total_steps) total path weight through every shared ancestor
70-
# mean(total_steps) average distance across all shared ancestors
67+
# sum(total_steps) - total path weight through every shared ancestor
68+
# mean(total_steps) - average distance across all shared ancestors
7169
# Your domain knowledge of what "all paths" should mean for pedigree
7270
# analysis goes here. For inbred pedigrees this will differ substantially.
73-
stop("mrca_all aggregation not yet implemented please define the aggregation strategy.")
71+
stop("mrca_all aggregation not yet implemented - please define the aggregation strategy.")
7472
}
7573

7674
D
7775
}
7876

79-
# ── User-facing functions ─────────────────────────────────────────────────────
80-
8177
#' Compute the generational distance between two individuals
8278
#'
8379
#' @description
@@ -96,8 +92,7 @@
9692
#' (fewest combined steps to reach a shared ancestor).}
9793
#' \item{\code{"mrca_max"}}{Total steps via the most distant common ancestor
9894
#' (most combined steps to reach a shared ancestor).}
99-
#' \item{\code{"mrca_all"}}{Aggregated distance across all common ancestors
100-
#' — aggregation strategy to be defined.}
95+
#' \item{\code{"mrca_all"}}{Aggregated distance across all common ancestors}
10196
#' }
10297
#' @param personID Character. ID column name. Default \code{"ID"}.
10398
#' @param momID Character. Mother ID column name. Default \code{"momID"}.

man/dot-pairDistFromAnc.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/getGenDist.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)