Plot HBD segments identified with the ZooROH model for one or several populations.
zooplot_partitioning(input, cols = NULL, plotids = TRUE, toplot = NULL,
randomids = FALSE, nrandom = NULL, seed = 100, ylim = c(0, 1),
border = TRUE, nonhbd = TRUE, vertical = FALSE)
a named list with one or several zres objects obtained after running zoorun. The zres objects are the output of the zoorun function. For instance, putting list(name1 = zres1, name2 = zres2). The function will then use the names in the plot (in case several zres objects are used).
A vector with the colors to be used for each population or zres object.
A logical indicating whether the IDs of the individuals are plotted on the graph (TRUE by default).
A list of vectors indicating the zres@ids to be plotted. This option can be used to select the individuals to plot. The list must contain one vector per population or zres object. By default, all individuals are plotted.
A logical indicating whether a randomset of individuals is plotted. This option allows to reduce the number of individuals in the plot. The option can not be used simultaneously with the toplot option. By default, randomids is FALSE.
A vector indicating the number of individuals to be randomly sampled per population or per zres object when randomids is TRUE. By default, we select 10 individuals per zres object. This vector must have the same length as the input list.
A value for the random seed used to sample individuals to plot (when the randomids option is TRUE).
The limits of the y-axis.
Whether a border is plotted around each block of the barplot. When set to FALSE, it allows to get a less dense plot when many individuals are plotted.
Whether the a border is plotted around the non-hbd contribution. When set to FALSE, it allows to get a less dense plot when many individuals are plotted.
Whether the populations or zres labels are printed vertically or not.
The function plots the HBD segments identified in the region, using different colors for different zres object. Each line represents a different individual.