Description Usage Arguments Examples
Run PATHd8, see https://www2.math.su.se/PATHd8/PATHd8manual.pdf for more information.
1 | pathd8(input_file, output_file)
|
input_file |
File path to input file containing tree and constraint information. |
output_file |
File path to output file. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | library(outsider)
pathd8 <- module_import('pathd8', repo = 'dombennett/om..pathd8')
# Taken from manual
# https://www2.math.su.se/PATHd8/PATHd8manual.pdf
input_text <- "
Sequence length = 1823;
((((Rat:0.007148,Human:0.001808):0.024345,Platypus:0.016588):0.012920,(Ostrich:0.018119,Alligator:0.006232):0.004708):0.028037,Frog:0);
mrca: Rat, Ostrich, minage=260;
mrca: Human, Platypus, fixage=125;
mrca: Alligator, Ostrich, minage=150;
name of mrca: Platypus, Rat, name=crown_mammals;
name of mrca: Human, Rat, name=crown_placentals;
name of mrca: Ostrich, Alligator, name=crown_Archosaurs;
# my own notes, not executed by PATHd8
# fossil Archosaurus minage=260
# fossil Archaeopteryx minage=150
# fossil Eomaia minage=125
"
# write out input file as binary
input_file <- file.path(tempdir(), 'pathd8_input.txt')
input_connection <- file(input_file, 'wb')
write(x = input_text, file = input_connection)
close(input_connection)
# run pathd8
output_file <- file.path(tempdir(), 'pathd8_output.txt')
pathd8(input_file = input_file, output_file = output_file)
# check output
cat(readLines(con = output_file), sep = '\n')
# clean up
file.remove(input_file)
file.remove(output_file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.