batchAstral: batchAstral

View source: R/batchAstral.R

batchAstralR Documentation

batchAstral

Description

Function for running many astral analyses across many datasets. Runs setupAstral and runAstral when given a folder that contains folders of gene trees.

Usage

batchAstral(
  genetree.datasets = NULL,
  output.dir = NULL,
  overwrite = FALSE,
  taxa.remove = NULL,
  min.n.samples = 4,
  min.sample.prop = NULL,
  make.polytomy = TRUE,
  polytomy.limit = 0,
  astral.path = NULL,
  astral.t = 2,
  quiet = TRUE,
  multi.thread = TRUE,
  memory = "1g"
)

Arguments

genetree.datasets

a folder with folders of genetrees to prepare for astral analyses

output.dir

the save name for the output directory

overwrite

whether to overwrite an existing dataset

taxa.remove

species that you would like removed from each gene tree

min.n.samples

the minimum number of samples to keep a gene tree

min.sample.prop

the minimum proportion of samples to keep a gene tree

make.polytomy

whether to collapse poorly supported nodes into polytomies

polytomy.limit

if make.polytomy = TRUE, the threshold value for node collapsing

astral.path

the absolute path to astral. Needed because astral needs it.

astral.t

the t value from astral for different annotations.

quiet

hides the screen output from astral if desired

multi.thread

whether to use Astral-MP multithreading or not.

memory

memory value to be passed to java. Should be in "Xg" format, X = an integer

Value

applies setupAstral and runAstral to a folder, that contains folders of gene trees. Facilitates running the preparation and ASTRAL-III analysis for many different datasets at once. Genetree files and the astral output are saved in the desired output directory that can be read in individually as an AstralPlane object and plooted using AstralProjection.

Examples


genetree.folder = "file/path/to/folder/of/genetree/folders"
taxa.delete = c("species_one", "species_two")

batchAstral(genetree.datasets = genetree.folder,
            output.dir = "test-dataset",
            overwrite = TRUE,
            taxa.remove = taxa.delete,
            min.n.samples = 4,
            min.sample.prop = 0.1,
            make.polytomy = TRUE,
            polytomy.limit = 10,
            astral.path = astral.path,
            astral.t = 2,
            quiet = F,
            multi.thread = TRUE,
            memory = "8g")


chutter/AstralPlane documentation built on Aug. 29, 2024, 5:21 p.m.