GithubHelp home page GithubHelp logo

asr's Introduction

ASR

An R package that performs ancestral sequence reconstruction, returns result files and generates visualisations relevant to reconstruction. The key inputs for ASR are an alignment file (Clustal or fasta) and a phylogenetic tree (Newick string). Using these inputs a reconstruction of ancestral sequences can be performed using Joint of Marginal inference. Different inference approaches provide different results. Using Joint inference will generate output containing the sequences of the reconstructed nodes. Using Marginal inference will generate output containing the probabilities of each amino acid occurring in each column of the alignment. In both cases, the original tree will be returned with all internal/ancestral nodes consistently labelled.

This ASR package will not only create the reconstruction data but also reload existing datasets (generated by this reconstruction approach) into a format that can be passed to available functions. Key functions include alignment visualisation, distribution visualisation and tree and subtree visualisation.


To use the package you only need to download and install the latest ASR_x.x.x.tar.gz file.

The ASR folder which contains the source files should be used for development purposes.


Download and install R 3.2.2

http://cran.us.r-project.org/

Mac and Windows – use precompiled binaries

Linux – use source code, untar, ./configure, make, make install, make check


Install RStudio

https://www.rstudio.com/products/rstudio/download/


Open RStudio and install required packages:

install.packages(“ggplot2”)
install.packages(“ape”)

Install ASR package

Session -> Set working directory -> Select location of ASR_x.x.x.tar.gz

install.packages("ASR_x.x.x.tar.gz", repos = NULL, type = "source")

Common errors:

Wrong version of R - requires 3.2.2

Package dependencies (ape and ggplot2) are not installed


Load package

library(ASR)

Load existing data

data(asrStructure)

Perform ASR on new data

versions 1.0 to 1.0.4:

asr <- runASR("tree.nwk", "aln.aln", id="runASR")

version 1.0.5:

asr <- runASR("tree.nwk", "aln.aln")

Reload data from runASR

asr <- loadASR("runASR")

Use loaded data (from run or load ASR)

plot_aln(asrStructure)

Access help

?plot_aln

Run examples

examples(plot_aln)

Further examples of functions available in ASR can be found in test.R

asr's People

Contributors

aesse avatar arianemora avatar bradbalderson avatar gabefoley avatar marnie-lea avatar mikaelboden avatar rhysnewell avatar

Watchers

 avatar

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.