Skip to content

Commit

Permalink
Close a FeatureReader after use in HaplotypeCallerEngine (#9078)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbergelson authored Jan 15, 2025
1 parent ee25c7b commit 373df45
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@ public HaplotypeCallerEngine(final HaplotypeCallerArgumentCollection hcArgs, Ass

// Parse the user provided custom ploidy regions into ploidyRegions object containing SimpleCounts
if (this.hcArgs.ploidyRegions != null) {
FeatureDataSource<NamedFeature> ploidyDataSource = new FeatureDataSource<>(this.hcArgs.ploidyRegions, FeatureDataSource.DEFAULT_QUERY_LOOKAHEAD_BASES, NamedFeature.class);
ploidyDataSource.forEach(r -> this.ploidyRegions.add(new SimpleCount(r)));
try (FeatureDataSource<NamedFeature> ploidyDataSource = new FeatureDataSource<>(this.hcArgs.ploidyRegions, FeatureDataSource.DEFAULT_QUERY_LOOKAHEAD_BASES, NamedFeature.class)) {
ploidyDataSource.forEach(r -> this.ploidyRegions.add(new SimpleCount(r)));
}
}

for (SimpleCount region : this.ploidyRegions) {
Expand Down

0 comments on commit 373df45

Please sign in to comment.