Description Private Fields Private Methods Methods Examples
The check for loops runs on repeated depth-first-traversals of all vertices in the directed graph that represents a pedigree.
tbl_pedigree
node-list representation of pedigree as tibble
n_ani_col
column index for animal ids
n_sire_col
column index for sire ids
n_dam_col
column index for dam ids
l_set_wgb
list of white, grey and black set
b_report_cycle
Flag indicating whether vertices in a cycle must be reported
tbl_cycle
Tibble storing pairs of parent and offspring in the cycle
b_debug
Flag for debugging mode
qprp_logger
Logger object from log4r
dfs(p_current_vertex)
Depth-first-search starting at vertex p_current_vertex
move_grey_black(p_current_vertex)
Move vertex p_current_vertex from grey set to black set
move_white_grey(p_current_vertex)
Move vertex p_current_vertex from white set to grey set
get_neighbors(p_current_vertex)
Find vector of neighbor vertices of current vertex p_current_vertex
new()
Initialise fields in object at creation.
PedigreeCycleCheck$new()
read_pedigree()
read pedigree from file given by ps_pedigree_path
PedigreeCycleCheck$read_pedigree( ps_pedigree_path, ps_delim = "|", pn_ani_col = 1, pn_sire_col = 2, pn_dam_col = 3, ... )
ps_pedigree_path
path to pedigree input file
ps_delim
delimiting character between columns
pn_ani_col
animal id column
pn_sire_col
sire id column
pn_dam_col
dam id column
...
additional arguments passed to readr::read_delim
tbl_pedigree pedigree as tibble
has_cycle()
Run a depth-first traversal with all vertices (animals in the pedigree) until a cycle has been found.
PedigreeCycleCheck$has_cycle()
set_tbl_pedigree()
Setter method for the field tbl_pedigree
PedigreeCycleCheck$set_tbl_pedigree(ptbl_pedigree)
ptbl_pedigree
current tibble with pedigree
set_n_ani_col()
Setter method for n_ani_col
PedigreeCycleCheck$set_n_ani_col(pn_ani_col)
pn_ani_col
current value for index of animal column
set_n_sire_col()
Setter method for n_sire_col
PedigreeCycleCheck$set_n_sire_col(pn_sire_col)
pn_sire_col
current value for index of sire column
set_n_dam_col()
Setter method for n_dam_col
PedigreeCycleCheck$set_n_dam_col(pn_dam_col)
pn_dam_col
current value for index of dam column
set_b_report_cycle()
Setter method for b_report_cycle
PedigreeCycleCheck$set_b_report_cycle(pb_report_cycle)
pb_report_cycle
current value for b_report_cycle
set_b_debug()
Setter method for b_debug
PedigreeCycleCheck$set_b_debug(pb_debug)
pb_debug
current value of b_debug to be set
get_tbl_cycle()
Getter method for tbl_cycle
PedigreeCycleCheck$get_tbl_cycle()
tbl_cycle tibble with parent offspring pairs in cycle
clone()
The objects of this class are cloneable with this method.
PedigreeCycleCheck$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 | ## Not run:
pcc <- PedigreeCycleCheck$new()
pcc$read_pedigree(ps_pedigree_path = system.file('extdata','data_sample2.csv', package = 'qprppedigree'))
pcc$has_cycle()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.