creatingMatrix: Creation of the scores matrix

Description Usage Arguments Value Examples

View source: R/NeedlemanWunsch.R

Description

creatingMatrix creates a matrix containing the scores of the alignment for the NW algorithm

Usage

1
creatingMatrix(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 matrix containing the scores of the alignment

Examples

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

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