Skip to content

Commit

Permalink
Reverting removing bucketing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Jan 9, 2024
1 parent bf5e6f5 commit a63e6dd
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public BigInteger getPatientIdsForIntersectionOfVariantSets(Set<Integer> patient

int patientsInScopeSize = patientsInScope.size();
BigInteger patientsInScopeMask = createMaskForPatientSet(patientsInScope);
/* for(int x = 0;
for(int x = 0;
x < variantBucketPartitions.size() && matchingPatients[0].bitCount() < patientsInScopeSize + 4;
x++) {
List<List<String>> variantBuckets = variantBucketPartitions.get(x);
Expand All @@ -80,22 +80,6 @@ public BigInteger getPatientIdsForIntersectionOfVariantSets(Set<Integer> patient
});
});
});
}*/

for (String variantSpec : variantsInScope) {
Optional<VariantMasks> masksForVariant = variantService.getMasks(variantSpec, new VariantBucketHolder<>());
if (masksForVariant.isEmpty()) {
log.info(variantSpec + " not found");
}
masksForVariant.ifPresent(masks -> {
BigInteger heteroMask = masks.heterozygousMask == null ? variantService.emptyBitmask() : masks.heterozygousMask;
BigInteger homoMask = masks.homozygousMask == null ? variantService.emptyBitmask() : masks.homozygousMask;
BigInteger orMasks = heteroMask.or(homoMask);
BigInteger andMasks = orMasks.and(patientsInScopeMask);
synchronized(matchingPatients) {
matchingPatients[0] = matchingPatients[0].or(andMasks);
}
});
}
return matchingPatients[0];
}else {
Expand Down

0 comments on commit a63e6dd

Please sign in to comment.