validate_data_cherryDist {MethEvolSIM} | R Documentation |
Validate Structure of Input Data for Cherry Distance Computation
Description
This function checks whether the provided input data has the required structure. It ensures that the number of tips is sufficient and that the data structure is consistent across tips and structures.
Usage
validate_data_cherryDist(cherryDist, data)
Arguments
cherryDist |
A data frame containing cherry pair distances, including tip indices (output from |
data |
A nested list representing structured data for each tip, following the format |
Details
The function performs several validation steps:
Ensures that the number of tips in
data
is at least as large as the highest tip index incherryDist
.Checks that all tips contain at least one structure and that the number of structures is consistent across tips.
Verifies that within each structure, all tips have the same number of sites and no zero-length structures.
If any of these conditions fail, the function throws an error with a descriptive message.