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

EVA-3544 - Fix SPLIT candidate accession #446

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,11 @@ private void updateSplitCandidates(ClusteredVariantMergingPolicy.Priority priori
.collect(Collectors.toSet());
// Condition for generating split operation: ensure that there is more than one locus sharing the target RS
if (targetRSDistinctLoci.size() > 1) {
// Use a convention of lowest SS for testability
Long lowestSS = ssClusteredUnderTargetRS.stream().map(InactiveSubDocument::getAccession)
.min(Comparator.naturalOrder()).get();
// The new SPLIT candidate is for rs prioritised.accessionToKeep
SubmittedVariantOperationEntity newSplitCandidateRecord = new SubmittedVariantOperationEntity();
// TODO: Refactor to use common fill method for split candidates generation
// to avoid duplicating reason text and call semantics
newSplitCandidateRecord.fill(EventType.RS_SPLIT_CANDIDATES, lowestSS,
newSplitCandidateRecord.fill(EventType.RS_SPLIT_CANDIDATES, prioritised.accessionToKeep,
"Hash mismatch with " + prioritised.accessionToKeep,
ssClusteredUnderTargetRS);
newSplitCandidateRecord.setId(ClusteringWriter.getSplitCandidateId(newSplitCandidateRecord));
Expand Down
Loading