identity {bio3d}R Documentation

Percent Identity

Description

Determine the percent identity scores for aligned sequences.

Usage

  identity(alignment)

Arguments

alignment sequence alignment obtained from read.fasta or an alignment character matrix.

Details

The percent identity value is a single numeric score determined for each pair of aligned sequences. It measures the number of identical residues (“matches”) in relation to the length of the alignment.

Value

Returns a numeric matrix with all pairwise identity values.

Author(s)

Barry Grant

References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.

See Also

read.fasta, ide.filter, entropy, consensus

Examples

## Not run: 
#aln <- read.fasta( system.file("examples/kinesin_xray.fa",
#                     package = "bio3d") )
## End(Not run)

data(kinesin)
attach(kinesin)

ide.mat <- identity(aln)

# Plot identity matrix
plot.dmat(ide.mat, color.palette=mono.colors,
          main="Sequence Identity", xlab="Structure No.",
          ylab="Structure No.")

# Histogram of pairwise identity values
hist(ide.mat[upper.tri(ide.mat)], breaks=30,xlim=c(0,1),
     main="Sequence Identity", xlab="Identity")

# Compare two sequences
identity( rbind(aln$ali[1,], aln$ali[20,]) )


[Package bio3d version 1.0-5 Index]