Description Usage Arguments Details Value Examples

View source: R/melt_distance.R

This will take an alignment, will calculate the evolutionary distance between all pairs of sequence, and will transform the distance matrix to long format. It will remove upper triangle, and diagonal elements, so you end with only (n)*(n-1)/2 rows, where n are the total number of rows in the distance matrix.

1 |

`aln` |
An object of class matrix, it must be square |

`order` |
A character vector of size n with the order of the columns and rows (default: NULL) |

`dist` |
A string naming the model to calculate distances (accepted values are those in ape::dist.dna) |

`tree` |
An object of class phylo |

If a tree is optionally given, a fourth column is returned with the cophenetic distance across all elements of tree. It assumes the tree was generated from the alignment.

A data.frame with three or four columns: (1) iso1; (2) iso2: (3) dist. If a tree is given then a fourth column (evol_dist) containig the distances from the tree is also supplied.

1 2 3 4 5 |

harrietr documentation built on Dec. 1, 2017, 9:02 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.