report.variant.frequencies: Summarize and plot the frequency dynamics per site.

Description Usage Arguments Value Examples

Description

The option color_lut_type is used to specify alternative columns from the defined color scheme (see help(pixmap_colors)). For example, 'taylor' in the vignette uses the colors described in Wittgensteinean fashion by W. Taylor, Protein Engineering, Vol 10 , 743-746 (1997).

Usage

1
2
3
4
report.variant.frequencies(S, min_variant_count = 2, conf_int = F,
  col_min = 10, is_time_in_weeks = T, color_lut_type = "charge",
  annotate_env = F, number_sites = F, T_max = NULL, barplot = F,
  stacked = T, barplot_width = 4/5, hide_tf = F, ...)

Arguments

S

swarmtools object, with list of selected sites.

min_variant_count

Disregard mutations that appear fewer than this number of times across the entire alignment.

conf_int

If true, 95% confidence intervals will be computed on frequencies from sample counts using the binomial distribution. Requires package(binom).

col_min

Only show variants that ever exceed this minimum value.

is_time_in_weeks

If true, labels plot x-axis accordingly. Otherwise, time units are assumed to be days. This influences the annual grey lines and labels that appear in the plots.

color_lut_type

Optional string for color lookup table, currently only implemented for amino acids as 'aa', 'charge' and 'taylor'.

annotate_env

If true, will name bnAbs in associated sites.

number_sites

If true, prefix each the site name above each panel with the panel number.

T_max

If defined, limits the upper bound on the x (time) axis. Units are given by the is_time_in_weeks value, i.e. days if false.

barplot

If true, plots histograms per timepoint, rather than lines and dots.

stacked

If this and barplot are true, plots stacked histograms per timepoint.

barplot_width

If barplot is true, this specifies its proportionate width per timepoint.

hide_tf

If true, omits the first timepoint frequency, generally 100% TF virus.

...

Other options passed to plotting functions.

Value

NULL if no plot made, 1 if plot was made

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
A <- lassie::swarmtools(aas_file=system.file("extdata", "CH505-gp160.fasta",
            package="lassie"), tf_loss_cutoff=80)
outfile='variant-frequencies-min-10.pdf'
pdf(outfile, paper='USr', width=11, height=8.5, useDingbats=F, pointsize=10)
par(mar=c(2,2,0,0), oma=c(0,0,1,1), lend=1, ljoin=1, xaxt='n', yaxt='n')
layout(matrix(1:35, ncol=7, byrow=T))
report.variant.frequencies(A, conf_int=T, is_time_in_weeks=F, col_min=10)
dev.off()
system(paste("open", outfile))

## End(Not run)

phraber/lassie documentation built on May 25, 2019, 6:01 a.m.