Skip to content

Commit

Permalink
Fix nitpick in IntervalKeepPairFilterTest (#1254)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbergelson authored Jan 8, 2019
1 parent 2c97cce commit 5a0ab68
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import htsjdk.HtsjdkTest;
import htsjdk.samtools.SAMRecordSetBuilder;
import htsjdk.samtools.util.CollectionUtil;
import htsjdk.samtools.util.Interval;
import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import htsjdk.samtools.util.Interval;
import java.util.List;

import java.util.ArrayList;
import java.util.stream.StreamSupport;
import java.util.List;

public class IntervalKeepPairFilterTest extends HtsjdkTest {
private static final int READ_LENGTH = 151;
Expand Down Expand Up @@ -56,7 +56,7 @@ public void setUp() {
public void testIntervalPairFilter(final List<Interval> intervals, final long expectedPassingRecords) {
final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervals);

long actualPassingRecords = StreamSupport.stream(builder.spliterator(), false)
long actualPassingRecords = builder.getRecords().stream()
.filter(rec -> !filter.filterOut(rec))
.count();

Expand All @@ -76,7 +76,7 @@ public void testUnmappedPair() {

final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervalList);

boolean unmappedPassed = StreamSupport.stream(builder.spliterator(), false)
boolean unmappedPassed = builder.getRecords().stream()
.filter(rec -> !filter.filterOut(rec))
.anyMatch(rec -> rec.getReadName().equals("both_unmapped"));

Expand All @@ -91,7 +91,7 @@ public void testNotPrimaryReads() {

final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervalList);

boolean notPrimary = StreamSupport.stream(builder.spliterator(), false)
boolean notPrimary = builder.getRecords().stream()
.filter(rec -> !filter.filterOut(rec))
.anyMatch(rec -> rec.isSecondaryAlignment() || rec.getSupplementaryAlignmentFlag());

Expand All @@ -106,7 +106,7 @@ public void testSingleEndedReads() {

final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervalList);

boolean singleEnded = StreamSupport.stream(builder.spliterator(), false)
boolean singleEnded = builder.getRecords().stream()
.filter(rec -> !filter.filterOut(rec))
.anyMatch(rec -> rec.getReadName().equals("single_ended"));

Expand Down

0 comments on commit 5a0ab68

Please sign in to comment.