globalAlignnmentNeedlemanWunsch: Needleman Wunsch

Description Usage Arguments Value References Examples

View source: R/NeedlemanWunsch.R

Description

Core function of the package, performs the Needleman-Wunsch algorithm

Usage

1
2
3
4
5
6
7
globalAlignnmentNeedlemanWunsch(
  matchCost,
  mismatchCost,
  gapPenalty,
  sequenceA,
  sequenceB
)

Arguments

matchCost

The cost of a match

mismatchCost

The cost of a mismatch

gapPenalty

The gap penalty(cost of gap/indel)

sequenceA

The first nucleotide sequence (positioned on the rows)

sequenceB

The second nucleotide sequence (positioned on the columns)

Value

a list containing the score matrix, the direction matrix, the first alignment, the second alignment

References

https://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm

Examples

1
2
3
4
5
6
sequenceA <- "GTT"
sequenceB <- "GCATT"
matchCost <- 7
mismatchCost <- -3
gapPenalty <- -4
result <- globalAlignnmentNeedlemanWunsch(matchCost,mismatchCost,gapPenalty,sequenceA,sequenceB)

BeatriceBa/RProjectNW documentation built on Dec. 17, 2021, 10:47 a.m.