Learn R Programming

BioGeoBEARS (version 0.2.1)

parse_lagrange_python_output_old: Parse the output file from python LAGRANGE -- old version

Description

Parse the output of a python LAGRANGE output file. This is an older version useful for automating the parsing of a large number of files.

Usage

parse_lagrange_python_output_old(outfn = "output.results.txt", results_dir = getwd(), new_splits_fn = TRUE, new_states_fn = FALSE, filecount = 0)

Arguments

outfn
The python LAGRANGE output text file.
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 splits 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).

Value

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

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/).

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

Run this code
test=1

Run the code above in your browser using DataLab