I have a string of DNA bases and I need to count the number of times I have two identical bases at a certain distance from each other.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nitzan Kahn
el 18 de Jun. de 2018
Comentada: Nitzan Kahn
el 18 de Jun. de 2018
I have a string of DNA bases and I need to count the number of times I have two identical bases at a certain distance from each other. For example- number of times for 'AA', 'AXA', 'AXXA' and so on.. Would love some help with finding the right function.
0 comentarios
Respuesta aceptada
Guillaume
el 18 de Jun. de 2018
sum(regexp(yourchararray, 'A[^A]{0,2}A'))
2 being the maximum distance between two A (and 0 the minimum). The regexp says match A followed by 0 to 2 not A, followed by a A.
Más respuestas (0)
Ver también
Categorías
Más información sobre Genomics and Next Generation Sequencing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!