findPalindrome / palindromeLeftArm and mismatches - extends into loop
@hpages ci sta già lavorando.
Dal 29/10/2019.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
hi there,
Another thought about findPalindromes. Something about the way it treats mismatches between palindrome arms is a little unintuitive, biologically, while it is probably correct in the formal sense. My biologist's intuition is that mismatches should be tolerated WITHIN the palindrome arms. However, the code also allows mismatches at the termini of palindromes, so that palindromes get extended into the loop region. I want to tolerate mismatches so I can recognize diverged palindrome arms, but I don't want to artificially extend the palindrome arm into the loop. See code below.
I also found some weird behavior with one of my examples - also illustrated below.
thanks again,
Janet
library(Biostrings)
#### set up test data
# pal1 is a perfect 10 char palindrome with a 7 char loop
# pal2 is the same thing, but with one mismatch between arms
pal1 <- BString("abcdefghijNOPQRSTjihgfedcba")
pal2 <- BString("abcXefghijNOPQRSTjihgfedcba")
## without mismatches (pal1), things look good:
findPalindromes(pal1, max.looplength=7)
# Views on a 27-letter BString subject
# subject: abcdefghijNOPQRSTjihgfedcba
# views:
# start end width
# [1] 1 27 27 [abcdefghijNOPQRSTjihgfedcba]
palindromeLeftArm(pal1, max.looplength=7)
# 10-letter "BString" instance
# seq: abcdefghij
## allowing mismatches extends the palidrome into the loop. I want to tolerate mismatches within arms, but not to extend them.
palindromeLeftArm(pal1, max.looplength=7, max.mismatch=1)
# 11-letter "BString" instance
# seq: abcdefghijN
palindromeLeftArm(pal1, max.looplength=7, max.mismatch=2)
# 12-letter "BString" instance
# seq: abcdefghijNO
palindromeLeftArm(pal1, max.looplength=7, max.mismatch=3)
# 13-letter "BString" instance
# seq: abcdefghijNOP
## and I found something weird (an error??) with pal2 (where there's a mismatch). palindromeLeftArm finds the longer palindrome when I allow a mismatch, but findPalindromes misses the longer palindrome and only reports the shorter one, truncating at the mismatch. Are they using different algorithms? Maybe it's worth including a brief description of the algorithm used in the help.
findPalindromes(pal2, max.looplength=7, max.mismatch=1)
# Views on a 27-letter BString subject
# subject: abcXefghijNOPQRSTjihgfedcba
# views:
# start end width
# [1] 5 23 19 [efghijNOPQRSTjihgfe]
palindromeLeftArm(pal2, max.looplength=7, max.mismatch=1)
# 10-letter "BString" instance
# seq: abcXefghij
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
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 methods base
other attached packages:
[1] Biostrings_2.53.0 XVector_0.25.0 IRanges_2.19.10 S4Vectors_0.23.17 BiocGenerics_0.31.4
loaded via a namespace (and not attached):
[1] zlibbioc_1.31.0 compiler_3.6.1 tools_3.6.1
- Lingua principale
- R
- Stelle
- 72
- Fork
- 17
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Bioconductor/Biostrings
-
low level utilities packageAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Bioconductor/Biostrings#142 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Bioconductor/Biostrings#141 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Bioconductor/Biostrings#140 · 2 commenti ·
-
Single-pass file readingAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Bioconductor/Biostrings#138 ·
-
Improve error message for `subseq` when called on a vectorForse di nuovo libera @ahl27 l’ha presa 307 giorni fa e non c’è nessuna pull request aperta. Aperta
Bioconductor/Biostrings#135 · 1 assegnatario ·
Tutte le issue di Bioconductor/Biostrings
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
nmfs-ost/stockplotr#518 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
nf-core/ampliseq#1146 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
HelenaLC/spatialdataR#295 ·
-
size-time-budget
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
kapelner/EDI#66 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Openscapes/blogscapes#61 ·
I maintainer di solito rispondono entro 1 giorno