File: dist.alignment.Rd

package info (click to toggle)
r-cran-seqinr 3.4-5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,876 kB
  • sloc: ansic: 1,987; makefile: 14
file content (41 lines) | stat: -rw-r--r-- 1,537 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
\name{dist.alignment}
\alias{dist.alignment}
\title{ Pairwise Distances from Aligned Protein or DNA/RNA Sequences }
\description{
  These functions compute a matrix of pairwise distances from aligned sequences 
  using similarity (Fitch matrix, for protein sequences only) or identity matrix 
  (for protein and DNA sequences).
  The resulting matrix contains the squared root of the pairwise distances.
  For example, if identity between 2 sequences is 80%, the matrix will gives
  the squared root of (1.0 - 0.8) i.e. 0.4472136.

}
\usage{
dist.alignment(x, matrix = c("similarity", "identity"),gap)
}
\arguments{
  \item{x}{an object of class \code{alignment}, as returned by 
  \code{read.alignment} for instance}
  \item{matrix}{the matrix distance to be used, partial matching allowed }
  \item{gap}{-optional- with nucleotides, if set to 1, gaps will be counted in the identity measure }
}
\value{
  The distance matrix, object of class \code{dist}, computed by using the 
  specified distance measure.
}
\references{ 
The reference for the similarity matrix is :\cr
Fitch, W.M. (1966) An improved method of testing for evolutionary homology. 
\emph{J. Mol. Biol.}, \bold{16}:9-16.\cr

\code{citation("seqinr")}
}
\author{D. Charif, J.R. Lobry}
\seealso{  \code{\link{read.alignment} } }
\examples{
 myseqs <- read.alignment(file = system.file("sequences/test.mase", 
 package = "seqinr"), format = "mase")
 dist.alignment(myseqs, matrix = "identity" )
 as.matrix(dist.alignment(myseqs, matrix = "identity" ))
}
\keyword{ manip }