Plot PCA contribution of each variable.

plot_pca_contribution(
  pca,
  component = 1,
  chrom,
  pos,
  locus_type = NULL,
  y_buffer = 0
)

Arguments

pca

output of pca_wsaf() function.

component

which component to plot.

chrom

the chromosome corresponding to each contribution value.

pos

the genomic position corresponding each contribution value.

locus_type

defines the colour of each bar.

y_buffer

(percent). A buffer added to the bottom of each y-axis, making room for other annotations to be added.