findPalindrome / palindromeLeftArm and mismatches - extends into loop
@hpages ya está trabajando en esto.
Desde el 29/10/2019.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- R
- Estrellas
- 72
- Forks
- 17
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Bioconductor/Biostrings
-
low level utilities packageAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Bioconductor/Biostrings#142 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Bioconductor/Biostrings#141 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
Bioconductor/Biostrings#140 · 2 comentarios ·
-
Single-pass file readingAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Bioconductor/Biostrings#138 ·
-
Improve error message for `subseq` when called on a vectorQuizá libre de nuevo @ahl27 la tomó hace 308 días y no hay ningún pull request abierto. Abierto
Bioconductor/Biostrings#135 · 1 asignado ·
Todos los issues de Bioconductor/Biostrings
Issues similares
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
nmfs-ost/stockplotr#518 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
nf-core/ampliseq#1146 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
HelenaLC/spatialdataR#295 ·
-
R cheat sheetAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
KUBDatalab/R-PUFF-SEMS#170 ·
-
size-time-budget
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
kapelner/EDI#66 · 1 comentario ·
Los mantenedores suelen responder en 1 día