Skip to content

Commit

Permalink
Adding some code for testing/deugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Jan 4, 2024
1 parent f0004bb commit 57499ea
Showing 1 changed file with 17 additions and 1 deletion.
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,6 +80,22 @@ 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 57499ea

Please sign in to comment.