prepare_graph constructs a graph based on mother, father, and offspring links.

prepare_graph(
  .tbl,
  icol,
  fcol,
  mcol,
  thresholds,
  lower_col = "lower",
  upper_col = "upper",
  missingID_patterns = "^0$"
)

Arguments

.tbl

tibble with columns icol, fcol, mcol. Additional columns will be attributes in the constructed graph.

icol

column name of column with proband ids.

fcol

column name of column with father ids.

mcol

column name of column with mother ids.

thresholds

tibble with icol, lower_col and upper_col. Used to assign lower and upper thresholds to individuals in the graph as attributes.

lower_col

Column name of column with proband's lower threshold.

upper_col

Column name of column with proband's upper threshold.

missingID_patterns

string of missing values in the ID columns. Multiple values can be used, but must be separated by "|". Defaults to "^0$".

Value

An igraph object. A (directed) graph object based on the links provided in .tbl with the lower and upper thresholds stored as attributes.