Bioconductor / pwalign

Perform pairwise sequence alignments
1 stars 0 forks source link

Incorrect alignment/score when using gap penalty = Inf #4

Open traversc opened 3 years ago

traversc commented 3 years ago

I want to do an alignment where pattern is contained within subject without gaps. Here's a quick example:

 q <- "TCAGT"
s <- "TCAGGTCAGT"
smat <- nucleotideSubstitutionMatrix(match = 0, mismatch = -1, baseOnly = TRUE)

pairwiseAlignment(q, s, substitutionMatrix=smat, gapOpening=Inf, gapExtension=Inf, type = "global-local")
Global-Local PairwiseAlignmentsSingleSubject (1 of 1)
pattern:     TCAGT
subject: [1] TCAGG
score: -1 

pairwiseAlignment(q, s, substitutionMatrix=smat, gapOpening=100, gapExtension=100, type = "global-local")
Global-Local PairwiseAlignmentsSingleSubject (1 of 1)
pattern:     TCAGT
subject: [6] TCAGT
score: 0