This phase of analysis requires:
We need to choose a setting for the cutoff parameter value. Let's see how number of sites depends on cutoff threshold. A vector of cutoff values shows how many sites result from multiple settings. Note that the default values work for these data.
In practice, you will not need to use system.file()
unless you are
referring to an example alignment included with the swarmtools
package.
library(lassie) alignment_file <- system.file("extdata", "CH505-gp160.fasta", package="lassie") eg.swarmtools <- swarmtools(aas_file=alignment_file, tf_loss_cutoff=80) summary(eg.swarmtools) plot(eg.swarmtools) print(eg.swarmtools)
The 80% cutoff value gives 35 sites. Let's go with that.
This phase of analysis requires a SwarmTools object created in Phase I.
The SwarmTools object must have a list of selected sites, which happens only
when it was created using a single tf_loss_cutoff
value.
Let's just go with the defaults.
eg.swarmset <- swarmset(eg.swarmtools)
Got that? Here's the whole workflow:
library(lassie) alignment_file <- system.file("extdata", "CH505-gp160.fasta", package="lassie") eg.swarmtools <- swarmtools(aas_file=alignment_file, tf_loss_cutoff=80) summary(eg.swarmtools) print(eg.swarmtools) eg.swarmset <- swarmset(eg.swarmtools) summary(eg.swarmset) print(eg.swarmset) plot(eg.swarmset)
For some fun advanced plotting routines, try running
lassie::report.variant.frequencies(eg.swarmtools)
and
lassie::make.timepoint.logos(eg.swarmset)
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.