Function to visualise the haplotypes of a certain region in certain individuals
visualiseHaplo(
IBD_list,
display_by = c("phenotype", "name"),
linkage_group = NULL,
Phenotype.df = NULL,
genotype.ID = NULL,
trait.ID = NULL,
pheno_range = NULL,
cM_range = "all",
highlight_region = NULL,
select_offspring = NULL,
recombinant_scan = NULL,
allele_fish = NULL,
presence_threshold = 0.95,
xlabl = TRUE,
ylabl = TRUE,
mainTitle = NULL,
multiplot = NULL,
append = FALSE,
colPal = c("white", "navyblue", "darkred"),
hap.wd = 0.4,
recombination_data = NULL,
reset_par = TRUE,
log = NULL
)
If recombinant_scan
vector is supplied, a vector of recombinant offspring ID in the region of interest (otherwise NULL
).
List of IBD probabilities
Option to display a subset of the population's haplotypes either by "phenotype"
or "name"
.
If "phenotype"
is supplied, then Phenotype.df
,genotype.ID
,trait.ID
and pheno_range
must also be specified.
if "name"
is supplied, then select_offspring
must be specified.
Numeric identifier of the linkage group being examined, based on the order of IBD_list
.
Only a single linkage group is allowed. If IBD_list
corresponds to a single linkage group, default value
of NULL
will suffice
A data.frame containing phenotypic values, which can be used to select a subset of the population
to visualise (with extreme phenotypes for example). By default NULL
, in which case a subset of the
population may be selected using the select_offspring
argument.
The colname of Phenotype.df
that contains the population identifiers (F1 names) (must be a colname of Phenotype.df
)
The colname of Phenotype.df
that contains the response variable to use in the model (must be a colname of Phenotype.df
)
Vector of numeric bounds of the phenotypic scores to include (offspring selection).
Vector of numeric bounds of the genetic region to be explored. If none are specified, the default of "all"
means all cM positions will be included.
Option to hightlight a particular genetic region on the plot; can be a single position or a vector of 2 positions. By default NULL
.
Vector of offspring identifiers to visualise, must be supplied if display_by
= "name"
. Specifying "all"
will result in
all offspring haplotypes being visualised.
Vector of homologue numbers between which to search for recombinant offspring in the visualised region and selected individuals.
By default NULL
, in which case no search is preformed.
Vector of homologue numbers of interest, for which to search for offspring that carry these homologues (in the visualised
region). By default NULL
, in which case no search ("fishing") is performed.
Numeric. The minimum probability used to declare presence of a homologue in an individual. This is only needed if a recombinant_scan
is
performed. By default a value of 0.95 is used. When searching for recombinants, this value is also used to denote the proportion of loci carrying the required number
of homologues (i.e. by default 95 per cent of loci should have between 0.95 and 1.1 copies of the specified recombinant homologues).
Logical, by default TRUE
. Should an x-axis label be used?
Logical, by default TRUE
. Should a y-axis label be used?
Option to override default plot titles with a (vector of) captions. By default NULL
.
Vector of integers. By default NULL
so haplotypes are plotted singly;
otherwise a vector specifying the number of rows and columns in the plot layout.
Option to allow user to append new plots to spaces generated by multiplot
, otherwise these are
filled with blank plots. By default FALSE
. If TRUE
, then a large enough multiplot
grid should be
generated to make this option meaningful.
Colour palette to use in the visualisation (best to provide 3 colours).
The width of the haplotype tracks to be plotted, generally recommended to be about 0.4 (default value)
List object as returned by the function count_recombinations
. By default NULL
,
in which case no overlay of predicted recombination events is performed. However, it can be useful
to visualise predicted recombination events, particularly as this might help inform the choice of argument plausible_pairing_prob
of that function. See count_recombinations
for more details.
By default TRUE
, reset par on exit.
Character string specifying the log filename to which standard output should be written. If NULL
log is send to stdout.
data("IBD_4x")
visualiseHaplo(IBD_list = IBD_4x,
display_by = "name",
linkage_group = 1,
select_offspring = "all",
multiplot = c(3,3))
Run the code above in your browser using DataLab