parse_lagrange_python_output: Parse the output file from python 'LAGRANGE'

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_readwrite_v1.R

Description

Parse the output of a python LAGRANGE.

Usage

1
2
3
4
  parse_lagrange_python_output(outfn = "output.results.txt",
    outputfiles = FALSE, results_dir = getwd(),
    new_splits_fn = TRUE, new_states_fn = FALSE,
    filecount = 0, append = FALSE)

Arguments

outfn

The python LAGRANGE output text file.

outputfiles

Should parsed output be written to files? Default FALSE.

results_dir

The directory outfn is in.

new_splits_fn

Should a text file containing a table of the splits and their probabilities be output? Default TRUE.

new_states_fn

Should a text file containing a table of the states and their probabilities be output? Default FALSE, as I don't believe python LAGRANGE will output the states at the nodes (C++ LAGRANGE will, however).

filecount

The starting number for the filecount (relevant if one is processing many files).

append

Should results be appended to preexisting file? (default FALSE)

Details

Python LAGRANGE is run from a UNIX/Terminal command-line with a command such as "python lagrangefilename.py". You will need to have the "lagrange" python directory in your working directory.

The input file can be obtained from http://www.reelab.net/lagrange/configurator/index (Ree (2009)).

Python comes installed on many machines, or can be downloaded from the Enthought Python Distribution (https://www.enthought.com/products/epd/).

Value

sumstats A data.frame containing the summary statistics (LnL, d and e rates, etc.) The splits filename is output to screen.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

https://code.google.com/p/lagrange/ https://www.enthought.com/products/epd/ http://www.reelab.net/lagrange/configurator/index

Ree2009configurator

Matzke_2012_IBS

ReeSmith2008

See Also

get_lagrange_nodenums, LGpy_splits_fn_to_table

Examples

1
test=1

Example output

Loading required package: rexpokit
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

Loading required package: Rcpp
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.