prepare_hap_umap | R Documentation |
prepare_hap_umap() builds a large composite ggplot2 object ready for faceting and animation (see vignette) for visualizing SNP alleles (coloured by Marker Group) possessed by individuals with each haplotype. UMAP coordinates for each SNP can be generated using umap::umap(), with the LD matrix generated for run_haplotyping() as input. When fully rendered and faceted, the resultant GIF intuitively visualizes the shared loci within each Marker Group that are constant within each haplotype combination.
prepare_hap_umap(
umap_in,
hetmiss_as = "allele",
HapObject,
epsilon,
vcf,
nsamples = 25
)
umap_in |
UMAP results produced for a haplotype object at a given epsilon. |
hetmiss_as |
If hetmiss_as = "allele", heterozygous-missing SNPs './N' are recoded as 'N/N', if hetmiss_as = "miss", the site is recoded as missing. |
HapObject |
Haplotype object created by run_haplotyping(). |
epsilon |
Epsilon matching the haplotype object used for umap_in. |
vcf |
Input vcf. |
nsamples |
Number of times to sample each haplotype group, will directly translate to the number of frames in animation. Should be the same as the nframes passed to gganimate::animate(). |
A large ggplot2 object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.