Skip to content

Commit

Permalink
Merge pull request #446 from tcezard/fix/splitCandidateAccessionDurin…
Browse files Browse the repository at this point in the history
…gMerge

EVA-3544 - Fix SPLIT candidate accession
  • Loading branch information
tcezard authored May 10, 2024
2 parents 7fe0cfc + 29d427a commit 7dbd1fd
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit 7dbd1fd

Please sign in to comment.