identity {bio3d} | R Documentation |
Determine the percent identity scores for aligned sequences.
identity(alignment)
alignment |
sequence alignment obtained from
read.fasta or an alignment character matrix. |
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.
Returns a numeric matrix with all pairwise identity values.
Barry Grant
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
read.fasta
, ide.filter
, entropy
, consensus
## 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,]) )