phsc.read.trees: Read short read trees

View source: R/phyloscan.fun.private.R

phsc.read.treesR Documentation

Read short read trees

Description

This function reads short read trees that are generated with the phyloscanner toolkit.

Usage

phsc.read.trees(
  prefix.infiles,
  prefix.run = "ptyr",
  regexpr.trees = "Subtrees_r_.*\\.rda$",
  prefix.wfrom = "Window_",
  prefix.wto = "Window_[0-9]+_to_",
  save.file = NA,
  resume = FALSE,
  zip = FALSE
)

Arguments

prefix.infiles

Full path name identifying likely transmissions summary files

prefix.run

Character string to identify separate phyloscanner runs. After the prefix, an integer number is expected. For example, if prefix.run='ptyr', then files are expected to start like 'ptyr123_'.

regexpr.trees

Regular expression that identifies tree summary files in the directory. By default, this is 'Subtrees_r_.*\.rda$' or 'Subtrees_c_.*\.rda$' from the phyloscanner toolkit.

prefix.wfrom

Character string to identify the start of a short read window. After the prefix, an integer number is expected. For example, if prefix.wfrom='Window_', then 'Window_800_to_1100' has start coordinate 800.

prefix.wto

Character string to identify the end of a short read window. After the prefix, an integer number is expected. For example, if prefix.wto='Window_[0-9]+_to_', then 'Window_800_to_1100' has end coordinate 1100.

save.file

If not missing, function output (a data.table) will be stored to 'save.file', input files will be zipped, and input files will be deleted.

resume

If TRUE and save.file is not missing, the function loads and returns trees stored in save.file.

zip

If TRUE and save.file is not missing, the function zips and removes trees and tree pdfs that match the regular expression for trees.

Value

list of named trees in ape format.


olli0601/phyloscan documentation built on March 28, 2024, 11:18 p.m.