Extends BestConfig_Ordered output from COLONY
pedigree reconstruction software with additional data about individuals included
in pedigree. The function adds missing parents to OffspringID, assigns
sex to each individual included in OffspringID and adds the computed
probabilities of paternity and maternity assignments (probability of assignments is visible
only if the out parameter is set to "table").
The function also prepares data so that the output of the function can be directly analyzed with
kinship2,
pedtools or
FamAgg packages.
get_colony(
colony_project_path,
sampledata,
rm_obsolete_parents = TRUE,
out = "FamAgg"
)A data frame describing a common pedigree structure. Each individual included in
pedigree represents one row. Columns describe individual identifier code, identifier code for
mother and father, sex and family of individual. Column names and arrangement depends on selected
output (out parameter).
Character string. Path to the folder where COLONY output files are saved. Has to include file path and project name (see Details).
Data frame. Metadata for all genetic samples that belong
to the individuals included in pedigree reconstruction analysis.
This data frame should adhere to the formatting and naming conventions
outlined in the check_sampledata() documentation.
Logical. Should unknown parents be removed from output.
Applies just to offspring for which both parents are unknown. Defaults to TRUE.
Character string. For use with which package should the output be formatted?
kinship2 (out = "kinship2"), pedtools (out = "pedtools"),
FamAgg (out = "FamAgg") or the created data.frame can be outputted as is
(out = "table"). Defaults to "FamAgg"
COLONY output tables needed for this function (.BestConfig_Ordered,
.Maternity and .Paternity) are read directly
from the colony output folder and do not need to be imported into R session.
The path to the outputs is defined with colony_project_path parameter.
When defining colony_project_path the user needs to define a complete path to
the directory where colony outputs are stored and also the file name
(file name of COLONY outputs equals the project name
eg. /path/to/the/COLONY/output/folder/COLONY_project_name).
# Define the path to COLONY output
path <- paste0(system.file("extdata", package = "wpeR"), "/wpeR_samplePed")
# Get pedigree data in FamAgg format
get_colony(
colony_project_path = path,
sampledata = wolf_samples
)
Run the code above in your browser using DataLab