knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Introduction

The package BEAUtiXMLConvert is designed to produce XML files for use with the phylogenetic analysis tool BEAST. The package contains three functions: convert_XML, import_sequences and template_xml.

Usage

Main function

The main function of this package is convert_XML(). This function provides the ability to import sequence alignments into a precreated XML file such as those produced by BEAUti.

In its simplest form the function only requires a compatible XML file and a sequence alignment file. The function removes the alignment from the orginal XML file and replaces it with the alignment imported from the provided alignment file. The newly created XMl file is then saved at the specified location.

The alignment in the XML file will have the following atrributes

ID = sequence name with "seq_" as a prefix

taxon = sequence name

totalcount = 4 if nucleotide data, 20 if amino acid data, 2 if binary data

value = sequence data

convert_XML() also allows for tip dates and locations to be imported as parameters into the file. This requires a template XML file that contains location data that is then replaced

The data must be imported using the name of a tab delimited file containing the name of the sequence and the data.

The MCMC chain length and the store every value can also be changed using the chainLength and storeEvery arguments.

Secondary functions

The function import_sequences() is used to produce a dataframe of sequences and their names from a specified alignment file. This function is used in the convert_xml

The function template_XML() produces an new file from the file specified. THis file has the original alignment and other references to the alignment, such as tip date and location information removed. This file is not compatible with the convert_XML function

Session info

sessionInfo()


JoelJWilson/BEAUtiXMLconvert documentation built on May 30, 2019, 6:12 a.m.