Bioconductor / pwalign

Perform pairwise sequence alignments
1 stars 0 forks source link

Terminal gaps not considered as InDel #2

Open Close-your-eyes opened 1 year ago

Close-your-eyes commented 1 year ago

The alignment below induces terminal gaps in the subject. This is not indicated as an indel. So, from looking at the meta-data of the alignment only, one may think that it is a 'perfect' alignment.

Is that behaviour expected or desired?

aln <- pwalign::pairwiseAlignment("CCGGATCG", "ATCG", type = "global-local")
aln

Global-Local PairwiseAlignmentsSingleSubject (1 of 1)
pattern:     CCGGATCG
subject: [1] ----ATCG
score: -18.07298 

pwalign::indel(aln)

An object of class "InDel"
Slot "insertion":
IRangesList object of length 1:
[[1]]
IRanges object with 0 ranges and 0 metadata columns:
       start       end     width
   <integer> <integer> <integer>

Slot "deletion":
IRangesList object of length 1:
[[1]]
IRanges object with 0 ranges and 0 metadata columns:
       start       end     width
   <integer> <integer> <integer>
acvill commented 1 year ago

An older, related post from the Bioconductor forum:

indels located at the edges of subject and Biostrings pairwiseAlignment function