Phylogenetic Tree tutorial AWS

Report 1 Downloads 120 Views
Phylogenetic Tree tutorial BiteSize Bioinformatics Session based on a tutorial from MolecularEcology.com 6 December 2017 R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: setwd("/mnt/galaxy/home/researcher/phylotree")

Molecular ecology tutorial This document follows the tutorial from http://www.molecularecologist.com/2016/02/quick-and-dirty-tree-building-in-r/.

Loading libraries If one or more libraries are not installed, yet, it’s possible to install them with the install.packages("packagename") command. We are going to use the ape, phangorn and seqinr packages: # Load libraries library(ape) library(phangorn) library(seqinr) ## ## Attaching package: 'seqinr' ## The following objects are masked from 'package:ape': ## ## as.alignment, consensus

Alignment File Formats and Conversion Using the read.dna() function in the package ape, you’ll import your sequence data, choosing between “interleaved,” “sequential”, “clustal” and “fasta” formats. From there, you’ll want to convert your alignment to a “phyDat” object for use in phangorn, the major package for treebuilding in R. Once it’s imported, it’s easy to subset your data and only include, say, the first ten taxa: # Import data [mammals.dna=https://pastebin.com/8Mt3QUTV] mammals