-
Notifications
You must be signed in to change notification settings - Fork 12
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
EVA-3748 - Release from DB #468
Conversation
/** | ||
* The query performed in mongo can retrieve more variants than the actual ones because in some cases the same | ||
* clustered variant is mapped against multiple locations. So we need to check that that clustered variant we are | ||
* processing only appears in the VCF release file with the alleles from submitted variants matching the location. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering how much of this is still true. We should keep it for now but add a ticket to review this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will create a ticket.
private List<SubmittedVariantEntity> getSubmittedVariantEntities(Set<Long> cveAccs) { | ||
Query query = query(where(SVE_RS_FIELD).in(cveAccs).and(SVE_ASSEMBLY_FIELD).is(assembly).and(SVE_TAX_FIELD).is(taxonomy)); | ||
List<SubmittedVariantEntity> evaResults = mongoTemplate.find(query, SubmittedVariantEntity.class); | ||
List<DbsnpSubmittedVariantEntity> dbsnpResults = mongoTemplate.find(query, DbsnpSubmittedVariantEntity.class); | ||
return Stream.concat(evaResults.stream(), dbsnpResults.stream()).collect(Collectors.toList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might never be a problem but this function can in theory return a very large number of variant creating a memory issue. It will be especially true in the merged and deprecated use case, less so in the case of active variants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can refactor as part of the next ticket when we write the queries for the operations
No description provided.