pastis_main: Phylogenetic Assembly with Soft Taxonomic Inferences

Description Usage Arguments Details Value See Also Examples

View source: R/pastis.R

Description

This function assimilates sequences, taxonomic information and tree constraints into a mrBayes file. This permits the construction of trees that are compatible with all of these sources of tdata and contain all known taxa.

Usage

1
2
3
4
5
  pastis_main(pastisData = NULL, constraint_tree,
    taxa_list, missing_clades = NA, sequences = NA,
    output_template = NA, output_file = "output.nex",
    paraphyly_constrains = TRUE,
    monophyly_constrains = TRUE, omit_sequences = FALSE)

Arguments

pastisData

Input data object of class pastisData

output_file

The filename for the mrBayes output file (will be overwritten if it exists)

paraphyly_constrains

If TRUE, missing clades are prevented from entering paraphyletic clades.

monophyly_constrains

If TRUE, missing clades are precented from entering monophyletic clades.

omit_sequences

If set to TRUE the sequence file (if any) will be ignored. This is useful for testing the constraints created by pastis as mrBayes runs much quicker without sequence data!

constraint_tree

A tree with constraints that are forced to be present in all output trees. Either a filename to a nexus file readable by read.tree or a ape phylo object.

taxa_list

A list of all taxa and their clades. Either a data frame with columns "taxa" and "clade" or a filename for a file readable by read.csv with those columns

missing_clades

A file containing missing clades. Each line of the missing clades file consists of the missing clade, the word "include" or "exclude" and a list of the reference clades (all separated by commas). Lines containing "include" specify that a taxon is contained below the MRCA of the reference clades. Lines containing "exclude" specify that the missing clade cannot attach below the MRCA of the reference clades. #'

sequences

A file with all the available sequence information in fasta format for details on that format see read.dna in the ape package.

output_template

The filename for a template for the output nexus file. This file should look like a regular mrBayes input file with special tags replacing content that will be filled by pastis. In particular:

<sequences> will be replaced by the sequences (and should go below the MATRIX line)

<ntax> the number of taxa (i.e. "ntax=<ntax>" must be somewhere in your template)

<nchar> the number of characters

<constraints> the constraints will go here

<outputfile> where the summaries will be written, (i.e. "sumt filename=<outputfile> burnin ...." should be in your template)

see default_output_template for an example (which is used by default)

Details

This is the main function in pastis which assimilates sequences, taxonomic information and tree constraints and creates a mrBayes input file. This input file contains the tree structure specified by constraint_tree with missing taxa in taxa_list and missing clades in missing_clades added and placed loosely in the tree using the constraint logic outlined in Thomas et al. MEE (in review) and Jetz et al. (2012 Nature, 491, 444-448).

See read_input for a description of the required format of the input files. At a minimum the constraining input tree and taxa list must be provided.

In addition to the input checks conducted by read_input this function also checks for compatibility between the missing genus constraints and constraint tree.

PASTIS: Phylogenetic Assembly with Soft Taxonomic InferenceS?

1
2
3
4
 A bright motmot was
  acting quite rowdy- weaving and squawking quite loudly
  "Pastis is delise" he burped with a sneese "but why is
  everything suddenly cloudy?"

Arne Mooers

Value

NULL

See Also

pastis_simple provides a simplified interface to pastis_main.

read_input describes the required file formats

default_output_template provides an example of the output template (also the default)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
# Generate MrBayes input files with constraints
data(accipitridaeFullPastis)
pastis_main(accipitridaeFullPastis, output_file="Accipitridae.nexus")

data(accipitridaeBasicPastis)
pastis_main(accipitridaeBasicPastis, output_file="AccipitridaeBasic.nexus")

## End(Not run)

data(pastis_data_1)
pastis_main(pastis_data_1, output_file="pastis_data_1")
unlink("pastis_data_1.nexus")

data(pastis_data_2)
pastis_main(pastis_data_2, output_file="pastis_data_2")
unlink("pastis_data_2.nexus")

data(pastis_data_3)
pastis_main(pastis_data_3, output_file="pastis_data_3")
unlink("pastis_data_3.nexus")

pastis documentation built on May 2, 2019, 7:24 a.m.