plot_barcode: Plot encoded traits

View source: R/plot_barcode.R

plot_barcodeR Documentation

Plot encoded traits

Description

Plots a barcode showing each locus in the genome and the trait they code for.

Usage

plot_barcode(arch, xaxis = "location", size = 0.1)

Arguments

arch

A data frame containing locus-wise genetic architecture data (see ?read_architecture)

xaxis

What to show on the x-axis. Either of "location" for genomic location (continuous between 0 and 1) or "locus" for locus index.

size

Size of the segments showing the loci, to be passed to geom_segment

Value

A ggplot

See Also

read_architecture

Examples


root <- system.file("extdata", "sim-example", package = "speciomer")
arch <- read_architecture(root)$nodes
arch <- arch %>% dplyr::mutate(trait = recode_traits(trait))
plot_barcode(arch)


rscherrer/speciomer documentation built on March 11, 2023, 5:37 p.m.