bootstrapTrees - Create a bootstrap distribution for clone sequence alignments, and estimate trees for each bootstrap replicate.
bootstrapTrees Phylogenetic bootstrap function.
bootstrapTrees( clones, bootstraps, nproc = 1, trait = NULL, dir = NULL, id = NULL, modelfile = NULL, build = "pratchet", exec = NULL, igphyml = NULL, fixtrees = FALSE, quiet = 0, rm_temp = TRUE, palette = NULL, resolve = 2, rep = NULL, keeptrees = TRUE, lfile = NULL, seq = "sequence", downsample = FALSE, tip_switch = 20, ... )
airrCloneobjects, the output of formatClones
- number of bootstrap replicates to perform
- number of cores to parallelize computations
- trait to use for parsimony models (required if
- 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
- location of igphyml executible if trait models desired
- keep tree topologies fixed? (bootstrapping will not be perfomed)
- 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?
- current bootstrap replicate (experimental)
- keep trees estimated from bootstrap replicates? (TRUE)
- lineage file input to igphyml if desired (experimental)
- column name containing sequence information
- downsample clones to have a maximum specified tip/switch ratio?
- maximum allowed tip/switch ratio if downsample=TRUE
- 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.
### Not run: data(ExampleAirr) # ExampleAirr$sample_id <- sample(ExampleAirr$sample_id) # clones <- formatClones(ExampleAirr, trait="sample_id") # # igphyml <- "~/apps/igphyml/src/igphyml" # btrees <- bootstrapTrees(clones[1:2], bootstraps=10, nproc=1, # igphyml=igphyml, trait="sample_id") # plotTrees(btrees$trees[])[] # testPS(btrees$switches)