get_ped {wpeR} | R Documentation |
Organizes pedigree data
Description
Offers an alternative to get_colony()
function in cases where the pedigree
was not reconstructed with COLONY
software. It takes a pedigree dataframe and assigns sex to each individual.
The function also prepares data so that the output of the function can be directly analyzed with
kinship2
,
pedtools
or
FamAgg
packages.
Usage
get_ped(ped, sampledata, out = "FamAgg")
Arguments
ped |
Data frame. Pedigree data frame with the most basic structure.
Three columns corresponding to offspring, father and mother (see
Details). Unknown parents should be represented by |
sampledata |
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 |
out |
Character string. For use with which package should the output be formatted?
|
Details
The custom pedigree specified through the ped
parameter should mirror the
structure of a COLONY pedigree and share the same column names.
It should consist of three columns for each offspring:
OffspringID
, FatherID
, MotherID
. When considering
unknown parents they should be represented by NA
values.
Value
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 and sex of individual. Column names and arrangement depends on selected
output (out
parameter).
Examples
#example pedigree dataframe
ped <- data.frame(
OffspringID = c(
"M273P", "M20AM", "M2757", "M2ALK", "M2ETE", "M2EUJ", "MSV00E",
"MSV018", "MSV05L", "MSV0M6", "MSV0T4", "MSV0T7", "MSV0TJ", "MSV0UL"
),
FatherID = c(
NA, NA, "M20AM", "M20AM", "M20AM", "M20AM", "M20AM",
"M20AM", "M20AM", "M20AM", "M20AM", "M20AM", "M20AM", "M20AM"
),
MotherID = c(
NA, NA, "M273P", "M273P", "M273P", "M273P", "M273P",
"M273P", "M273P", "M273P", "M273P", "M273P", "M273P", "M273P"
)
)
#Get pedigree data in FamAgg format
get_ped(
ped = ped,
sampledata = wolf_samples
)