mat.dif {bios2mds}R Documentation

Matrices of difference scores between sequences

Description

Computes a matrix providing the distances based on the difference scores between sequences from two multiple sequence alignments.

Usage

mat.dif(align1, align2, gap = FALSE, aa.strict = FALSE, sqrt = FALSE)

Arguments

align1

a list of character vectors representing a first multiple sequence aligment.

align2

a list of character vectors representing a second multiple sequence aligment.

gap

a logical value indicating whether gap character should be taken as supplementary symbol (TRUE) or not (FALSE). Default is FALSE.

aa.strict

a logical value indicating whether only strict amino acids should be taken into account (TRUE) or not (FALSE). To be used only for amino acid sequences. Default is FALSE.

sqrt

a logical value indicating whether the distance should be equal to the squared root of the difference score (TRUE) or not (FALSE). Default is FALSE.

Details

If align1 and align2 are identical, mat.dif computes the symetrical matrix of distances between each sequence of the alignment.

Before using mat.dif, users must check the alignment of sequences within align1 and align2 and between align1 and align2.

Value

A named numeric matrix providing the difference-based distances between each pair of sequences from align1 and align2. The number of rows and columns is identical to the number of sequences in align1 and align2, respectively.

Author(s)

Julien Pele and Jean-Michel Becu

See Also

identity function from bio3d package.

Examples

# calculating the matrix of distances based on the difference scores
# between GPCRs sample from H. sapiens and D. melanogaster:
aln_human <- import.fasta(system.file("msa/human_gpcr.fa", package = "bios2mds"))
aln_drome <- import.fasta(system.file("msa/drome_gpcr.fa", package = "bios2mds"))
mat.dif1 <- mat.dif(aln_human[1:5], aln_drome[1:5])
mat.dif1

[Package bios2mds version 1.2.3 Index]