Closed gevro closed 2 years ago
Corrected in Biostrings 2.65.5:
pattern: a character vector or ‘XStringSet’ derivative of any length,
or an ‘XString’ derivative.
subject: a character vector or ‘XStringSet’ derivative of length 1 or
‘length(pattern)’, or an ‘XString’ derivative.
H.
Thanks. And just making sure, is this what it is doing? => Matching pattern[1] to subject[1], pattern[2] to subject[2], pattern[3] to subject[3] ...
Just clarified that too:
Value:
If ‘scoreOnly == FALSE’ (the default), the function returns a
‘PairwiseAlignmentsSingleSubject’ object (if a single subject was
supplied) or a ‘PairwiseAlignments’ object (if more than one
subject was supplied). In both cases, the returned object contains
N _optimal pairwise alignments_ where N is the number of supplied
patterns, that is, N = ‘length(pattern)’ if ‘pattern’ is a
character vector or ‘XStringSet’ derivative, or N = 1 if it's an
‘XString’ derivative. If more than one subject was supplied, the
alignments in the returned ‘PairwiseAlignments’ object are
obtained by aligning ‘pattern[[1]]’ to ‘subject[[1]]’,
‘pattern[[2]]’ to ‘subject[[2]]’, ‘pattern[[3]]’ to
‘subject[[3]]’, etc...
...
Thanks so much for confirming.
Hi, The documentation for pairwiseAlignment says:
However, the function seems to work even when pattern = character vector of length N, and subject = XStringSet object of length N, where N > 1.
This doesn't match the documentation, yet it seems to be aligning pattern[1] to subject[1], pattern[2] to subject[2], ...
See here for example:
So just making sure, is matching of pattern[1] to subject[1], pattern[2] to subject[2], pattern[3] to subject[3] ... , the expected behavior when subject is an XStringSet of length > 1?
If so, this would be worth adding to the documentation, and also specifying that pattern and subject must be the same length.
Thanks.