I noticed that the findComplementedPalindromes
function does not consistently find all complementary palindromes. For example, in the code below, both strings contain complementary palindromes that are 5 sequences long. In fact, because the second string is the reverse of the first string it contains the same complementary palindromes as the first only reversed.
library(Biostrings) seq1 = DNAString("TTTAA") findComplementedPalindromes(seq1, min.armlength=2) seq2 = DNAString("AATTT") findComplementedPalindromes(seq2, min.armlength=2)
However, this is the output I get:
> seq1 = DNAString("TTTAA") > findComplementedPalindromes(seq1, min.armlength=2) Views on a 5-letter DNAString subject subject: TTTAA views: start end width [1] 1 5 5 [TTTAA] [2] 2 5 4 [TTAA] > > seq2 = DNAString("AATTT") > findComplementedPalindromes(seq2, min.armlength=2) Views on a 5-letter DNAString subject subject: AATTT views: start end width [1] 1 4 4 [AATT]
The output does not show that the second string contains a 5 sequence long complementary palindrome like the output for first string does. Is this a bug or expected behavior?
The output of sessionInfo() is:
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin14.0.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] Biostrings_2.34.0 XVector_0.6.0 IRanges_2.0.0
[4] S4Vectors_0.4.0 BiocGenerics_0.12.1
loaded via a namespace (and not attached):
[1] zlibbioc_1.12.0
Hi ggarzaz39,
Sorry for the late answer. You found a bug. Thanks for reporting! Will get back to you when it's fixed.
H.