Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finding all alignments within the string #202

Open
mehdiborji opened this issue Mar 19, 2022 · 5 comments
Open

finding all alignments within the string #202

mehdiborji opened this issue Mar 19, 2022 · 5 comments

Comments

@mehdiborji
Copy link

mehdiborji commented Mar 19, 2022

Is there a way to report all alignments up to the distance requested? For example if I have an alignment with distance of 1 in the beginning of a query I might prefer that to an alignment with distance of 0 somewhere else.

The solution I can think of is to have a moving window across the query; however, I believe these suboptimal alignments are already found but just not reported. Something like this would be very useful for trimming trailing or leading strings from a longer one.

@ewachtel
Copy link

ewachtel commented Mar 20, 2022 via email

@mehdiborji
Copy link
Author

Thank you @ewachtel for your response. Is this feature also part of the python wrapper?
Here's an example where I introduce one mismatch in my query and edlib fails to report it because a perfect alignment exists elsewhere:

C='GTGTGCTCTTCCGATCT'
V='TCTTCAGCGTTCCCGAGA'
my_string=2*C+V+C+'A'+V[1:]+C
edlib.align(V, my_string,'HW','locations',1)
{'editDistance': 0,
 'alphabetLength': 4,
 'locations': [(34, 51)],
 'cigar': None}

@ewachtel
Copy link

ewachtel commented Oct 11, 2022 via email

@cherryamme
Copy link

Did you find anyway to solve this problem? @mehdiborji
I want result to report all possible site too

@Martinsos
Copy link
Owner

Hey @cherryamme @mehdiborji !
So edlib (C version) does return multiple locations: either just their ends, or their ends + starts, depends on what you tell it to do.
When returning alignment, it does it only for one of those however.
It has been some time since I have worked on edlib so I can't remember 100%, but I believe alignments for other end locations could probably also be obtained. However Edlib doesn't do that at the moment, and it would require some changes to the codebase. I currently don't have time to work on this, but if somebody wants to take it on I can try to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants