EVA-3933 Add script to read variant ids from a file and do the annotation remediatioin#206
Merged
nitin-ebi merged 3 commits intoEBIvariation:masterfrom Mar 31, 2026
Merged
Conversation
896a461 to
311f131
Compare
tcezard
reviewed
Mar 26, 2026
Comment on lines
+176
to
+179
| for (Map.Entry<String, String> entry : orgIdNewIdMap.entrySet()) { | ||
| regexCriteria.add(Criteria.where("_id").regex("^" + Pattern.quote(entry.getKey()) + "_\\d")) | ||
| regexCriteria.add(Criteria.where("_id").regex("^" + Pattern.quote(entry.getValue()) + "_\\d")) | ||
| } |
Member
There was a problem hiding this comment.
Why not make two query per batch so that you know which one is old and which one is new?
|
|
||
| // Group fetched annotation documents by variant id prefix (both old and new ids) | ||
| Map<String, Set<Document>> variantIdToDocuments = new HashMap<>() | ||
| for (Document doc : annotationsList) { |
Member
There was a problem hiding this comment.
I might missunderstand this but it seems that for each annotation you go through all the document which would be 1000 * 1000 operations
Wouldn't it be simpler to derive the oldVariantId and newVariantId from the id by removing the end and match with that?
| } | ||
|
|
||
| void storeNotRemediatedVariant(String oldVariantId, String newVariantId, String reason) { | ||
| try (BufferedWriter writer = new BufferedWriter(new FileWriter(notRemediatedVariantsFilePath, true))) { |
Member
There was a problem hiding this comment.
Do we need to open the file every time? If we have a lot of failure it could take a while.
apriltuesday
approved these changes
Mar 30, 2026
c927150 to
1aada1f
Compare
tcezard
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.