Skip to contents

Protein Sequence Alignment for Two Protein Sequences

Usage

calcTwoProtSeqSim(seq1, seq2, type = "local", submat = "BLOSUM62")

Arguments

seq1

A character string, containing one protein sequence.

seq2

A character string, containing another protein sequence.

type

Type of alignment, default is 'local', could be 'global' or 'local', where 'global' represents Needleman-Wunsch global alignment; 'local' represents Smith-Waterman local alignment.

submat

Substitution matrix, default is 'BLOSUM62', could be one of 'BLOSUM45', 'BLOSUM50', 'BLOSUM62', 'BLOSUM80', 'BLOSUM100', 'PAM30', 'PAM40', 'PAM70', 'PAM120', 'PAM250'.

Value

An Biostrings object containing the scores and other alignment information.

Details

This function implements the sequence alignment between two protein sequences.

See also

See calcParProtSeqSim for paralleled pairwise protein similarity calculation based on sequence alignment. See calcTwoProtGOSim for calculating the GO semantic similarity between two groups of GO terms or two Entrez gene IDs.

Examples

s1 = readFASTA(system.file('protseq/P00750.fasta', package = 'Rcpi'))[[1]]
s2 = readFASTA(system.file('protseq/P10323.fasta', package = 'Rcpi'))[[1]]
# \donttest{
seqalign = calcTwoProtSeqSim(s1, s2)
seqalign
#> [1] "Error in .load_package_gracefully(\"pwalign\", \"Starting with BioC 3.19, \",  : \n  Could not load package pwalign. Is it installed?\n\n  Note that Starting with BioC 3.19, calling pairwiseAlignment() requires\n  the pwalign package. Please install it with:\n\n    BiocManager::install(\"pwalign\")\n"
#> attr(,"class")
#> [1] "try-error"
#> attr(,"condition")
#> <simpleError in .load_package_gracefully("pwalign", "Starting with BioC 3.19, ",     "calling ", fun, "()"): Could not load package pwalign. Is it installed?
#> 
#>   Note that Starting with BioC 3.19, calling pairwiseAlignment() requires
#>   the pwalign package. Please install it with:
#> 
#>     BiocManager::install("pwalign")>
slot(seqalign, "score")# }
#> Error in slot(seqalign, "score"): no slot of name "score" for this object of class "try-error"