findSwitches - Create a bootstrap distribution for clone sequence alignments, and estimate trees for each bootstrap replicate.
findSwitches Phylogenetic bootstrap function.
findSwitches( clones, permutations, trait, igphyml, fixtrees = FALSE, downsample = TRUE, tip_switch = 20, nproc = 1, dir = NULL, id = NULL, modelfile = NULL, build = "pratchet", exec = NULL, quiet = 0, rm_temp = TRUE, palette = NULL, resolve = 2, rep = NULL, keeptrees = FALSE, lfile = NULL, seq = NULL, boot_part = "locus", force_resolve = FALSE, ... )
airrCloneobjects, the output of formatClones
- number of bootstrap replicates to perform
- trait to use for parsimony models
- location of igphyml executible
- keep tree topologies fixed? (bootstrapping will not be perfomed)
- downsample clones to have a maximum specified tip/switch ratio?
- maximum allowed tip/switch ratio if downsample=TRUE
- number of cores to parallelize computations
- directory where temporary files will be placed (required
- unique identifer for this analysis (required if
- file specifying parsimony model to use
- program to use for tree building (phangorn, dnapars)
- location of desired phylogenetic executable
- amount of rubbish to print to console
- remove temporary files (default=TRUE)
- a named vector specifying colors for each state
- how should polytomies be resolved? 0=none, 1=max parsminy, 2=max ambiguity + polytomy skipping, 3=max ambiguity
- current bootstrap replicate (experimental)
- keep trees estimated from bootstrap replicates? (TRUE)
- lineage file input to igphyml if desired (experimental)
- column name containing sequence information
- is “locus” bootstrap columns for each locus separately
- continue even if polytomy resolution fails?
- additional arguments to be passed to tree building program
A list of trees and/or switch counts for each bootstrap replicate.
Tree building details are the same as getTrees.
keeptrees=TRUE (default) the returned object will contain a list
named “trees” which contains a list of estimated tree objects for each
bootstrap replicate. The object is structured like:
igphyml is specified
(as well as
trait), the returned object
will contain a
tibble named “switches” containing switch count
information. This object can be passed to testSP and other functions
to perform parsimony based trait value tests.
Trait values cannot contain values N, UCA, or NTIP. These are reserved for use by test statistic functions.
### Not run: data(ExampleAirr) # ExampleAirr$sample_id <- sample(ExampleAirr$sample_id) # clones <- formatClones(ExampleAirr, trait="sample_id") # # igphyml <- "~/apps/igphyml/src/igphyml" # btrees <- findSwitches(clones[1:2,], permutations=10, nproc=1, # igphyml=igphyml, trait="sample_id") # plotTrees(btrees$trees[])[] # testPS(btrees$switches)
Uses output from formatClones with similar arguments to getTrees. Output can be visualized with plotTrees, and tested with testPS, testSC, and testSP.