GithubHelp home page GithubHelp logo

phylolsnodist's Introduction

phyloLSnoDist

This package performs phylogenetic inference under the least squares framework but without the use of traditional evolutionary distances, as described in ``Phylogenetic least squares estimation without genetic distances''.

Installation

First, two packages need to be installed:

  • robustDist
  • phyloLSnoDist

Installation of robustDist can be accomplished with the following:

install.packages("robustDist", repos=c("http://R-Forge.R-project.org",
                                       "http://cran.at.r-project.org"),dependencies=TRUE)

You may also need to include the option INSTALL_opts = c('--no-lock').

Then, the easiest way to install phyloLSnoDist will be to use install_github from the devtools package:

install.packages("remotes") # if not installed already
remotes::install_github("vnminin/phyloLSnoDist")

Simple Example

First we must load the phyloLSnoDist package, which should also load its dependencies:

library(phyloLSnoDist)

Using the rtree function from the ape package, we generate a 4-taxon tree which we will use for demonstration:

set.seed(100)
my_tree <- rtree(4)
plot(my_tree, type='u')

With this tree, let us generate some DNA nucleotide sequence data, and convert it to phyDat format for usage by the phylo.ls.nodist function:

my_DNA <- simSeq(my_tree, 2000)
my_DNA_pD <- as.phyDat(my_DNA)

Then, we run our phylo.ls.nodist function to run phylogenetic inference with our new loss function. Since there are only three unrooted topologies, we do an exhaustive search by setting search.all = TRUE:

nodist_tree <- phylo.ls.nodist(my_DNA_pD, search.all = TRUE)
plot(nodist_tree, type='u')

Extended Vignette

A longer vignette, showing the above code with its intended output, along with replication of select simulation experiments from the manuscript, is available in the vignette directory. The output pdf is vignette.pdf along with associated R Markdown file, vignette.Rmd.

Other Notes

The analysis directory of this repository contains scratchwork, older versions of code, and unpublished simulation experiments. All final code for the manuscript is in the manuscript directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.