-
Notifications
You must be signed in to change notification settings - Fork 268
Update findseq for multiple objects #161
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
Conversation
|
Hi, thank you! Can you resolve this branch conflict before we test it? |
|
@JarrettSJohnson and @speleo3, what do you see? |
|
I suggest to make a pull request with the On a different note: What's the status of the other findseq pull request from @jrom99? Those two would have massive merge conflicts, so would be good to clarify which one has priority. Maybe the multi-object logic can be added to #152 as well. |
|
#152 says the following in a comment:
Would be awesome if you can fix #152, I tested it and couldn't make it work and both issues seems valid to me. |
Sorry, I didn't test yet what was the problem with my pull request. Since it's working as expected with all the files that I work with, it is possible that my data is some kind of edge case. That said, I have some suggestions for the code:
The Another thing is that some files may have multiple Edit: @pslacerda can you list the tests that you did and files that you used for them? I'll try testing over the weekend |
|
I'll try to tackle these issues today... |
|
I'm very sorry, I was wrong about the conflict. But now we have a different HEAD in master. Can you redo you work on top of master again? |
|
As far as I can tell, #152 fixed the multi-object problem and this pull request can be closed. Can you confirm? Here is an example: fab ACDEFG, m1
fab HIKLMN, m2
findseq DEF, *, foundSeq
assert cmd.count_atoms("foundSeq and m1") == 47
assert cmd.count_atoms("foundSeq and m2") == 0Result:
|
|
I see that the problem was fixed and it works correctly when the same selection is found in multiple objects multiple times. |



Findseq worked incorrectly when haystack spans multiple objects. In this case, the same residue IDs selected in all haystack objects.
Proposed change iterates over all objects in haystack and searches needle in each of them independently and finally combines them into the single search object.