View source: R/zooroh_accessor.R
| merge_zres | R Documentation |
The function is used for example when the analysis has been split in several tasks. All the zres must come from the same original zoodata (zoorun is applied to the same zoodata with the same model). In addition, the data should not overlap (the same individual, or the same pair in an IBD analysis, should not be present in multiple zres).
merge_zres(list_zres)
list_zres |
A list with the name of the zres objects to be merged. |
The function works both for a standard (HBD) analysis and for an IBD analysis (zoorun run with ibd = TRUE), and detects automatically which one it is from the format of @sampleids. For a standard analysis, @ids are kept unchanged (they are absolute, stable positions in the original zoodata file) and only sorted, exactly as before. For an IBD analysis, @ids are only local to each zoorun() call and are therefore not comparable across the different zres objects being merged: the merged pairs are re-sorted numerically on (id1, hap1, id2, hap2) - or alphabetically if identifiers are not numeric - and @ids are reassigned as new, globally consistent numbers.
a single zres object containing the results from the merged zres objects. Note that the HBD/IBD segments are not sorted by ID number.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.