knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
raxml
through outsider
in RRandomized Axelerated Maximum Likelihood (RAxML): Phylogenetic Analysis and Post-Analysis of Large Phylogenies
library(outsider) module_install(repo = "dombennett/om..raxml") #module_help(repo = "dombennett/om..raxml")
All demonstrations are taken from the RAxML "hands-on"
# ---- # Data # ---- # example DNA dna_phy <- "10 60 Cow ATGGCATATCCCATACAACTAGGATTCCAAGATGCAACATCACCAATCATAGAAGAACTA Carp ATGGCACACCCAACGCAACTAGGTTTCAAGGACGCGGCCATACCCGTTATAGAGGAACTT Chicken ATGGCCAACCACTCCCAACTAGGCTTTCAAGACGCCTCATCCCCCATCATAGAAGAGCTC Human ATGGCACATGCAGCGCAAGTAGGTCTACAAGACGCTACTTCCCCTATCATAGAAGAGCTT Loach ATGGCACATCCCACACAATTAGGATTCCAAGACGCGGCCTCACCCGTAATAGAAGAACTT Mouse ATGGCCTACCCATTCCAACTTGGTCTACAAGACGCCACATCCCCTATTATAGAAGAGCTA Rat ATGGCTTACCCATTTCAACTTGGCTTACAAGACGCTACATCACCTATCATAGAAGAACTT Seal ATGGCATACCCCCTACAAATAGGCCTACAAGATGCAACCTCTCCCATTATAGAGGAGTTA Whale ATGGCATATCCATTCCAACTAGGTTTCCAAGATGCAGCATCACCCATCATAGAAGAGCTC Frog ATGGCACACCCATCACAATTAGGTTTTCAAGACGCAGCCTCTCCAATTATAGAAGAATTA" # example partition simpleDNApartition <- "DNA, p1=1-30 DNA, p2=31-60" # Save as binary files input_file <- file.path(tempdir(), 'dna.phy') input_connection <- file(input_file, 'wb') write(file = input_connection, x = dna_phy) close(input_connection) partition_file <- file.path(tempdir(), 'simpleDNApartition.txt') partition_connection <- file(partition_file, 'wb') write(file = partition_connection, x = simpleDNApartition) close(partition_connection) # ----- # RAxML # ----- library(outsider) # import function raxml <- module_import(fname = 'raxml', repo = "dombennett/om..raxml") # create folder to host results results_dir <- file.path(tempdir(), 'raxml_example') dir.create(results_dir) # run raxml # arglist = command arguments that would have been passed to command-line # program. # Note: R objects are allowed in the arglist, e.g. input_file raxml(arglist = c('-m', 'GTRGAMMA', '-p', '12345', '-q', partition_file, '-s', input_file, '-n', 'T21'), outdir = results_dir)
# clean-up file.remove(input_file) file.remove(partition_file) unlink(results_dir, recursive = TRUE, force = TRUE) # uninstall module_uninstall(repo = 'dombennett/om..raxml')
Some key arguments for running the RAxMl program.
|Argument|Usage|Description| |--------|-----|-----------| |m |-m |Model to run, e.g. GTRGAMMA or GTRCAT| |p |-p # |Specify seed #| |s|-s file|Specify input file| |#|-# #|Specify # iterations| |n|-n name|Specify name of analysis| |q|-q file|Specify partition file|
Additionally, the R interface allows a user to specify an outdir
where all the
resulting files should be saved. By default, the outdir
is the current
working directory.
```{bash, ml-shell, eval=FALSE}
raxmlHPC -m BINGAMMA -p 12345 -s binary.phy -# 20 -n T5
```r # R raxml(arglist = c('-m', 'BINGAMMA', '-p', '12345', '-s', 'binary.phy', '-#', '20', '-n', 'T5'))
```{bash, om-shell, eval=FALSE}
raxmlHPC -p 12345 -m MULTIGAMMA -s multiState.phy -K ORDERED -n T12
```r # R raxml(arglist = c('-p', '12345', '-m', 'MULTIGAMMA', '-s', 'multiState.phy', '-K', 'ORDERED', '-n', 'T12'))
```{bash, bs-shell, eval=FALSE}
raxmlHPC -m GTRCAT -p 12345 -f b -t RAxML_bestTree.T13 -z RAxML_bootstrap.T14 \ -n T15
```r # R raxml(arglist = c('-m', 'GTRCAT', '-p', '12345', '-f', 'b', '-t', 'RAxML_bestTree.T13', '-z', 'RAxML_bootstrap.T14', '-n', 'T15'))
Find out more by visiting the RAxML's homepage
An outsider
module
Learn more at outsider website. Want to build your own module? Check out outsider.devtools
website.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.