Skip to content

Commit

Permalink
updating a test to enforce the new readname filtering behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesemery committed Jul 7, 2023
1 parent 4a8c604 commit 29f04d5
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;

public final class ReadsContextUnitTest extends GATKBaseTest {
Expand Down Expand Up @@ -44,6 +41,8 @@ public Object[][] getValidReadsContextData() {
// should behave as empty context objects.
ReadNameReadFilter readNameFilter = new ReadNameReadFilter();
readNameFilter.readNames = Collections.singleton("d");
ReadNameReadFilter twoReadNamesReadFilter = new ReadNameReadFilter();
twoReadNamesReadFilter.readNames = Set.of("d", "b");
return new Object[][]{
{new ReadsContext(
new ReadsPathDataSource(IOUtils.getPath(publicTestDir + "org/broadinstitute/hellbender/engine/reads_data_source_test1.bam")),
Expand All @@ -54,6 +53,11 @@ public Object[][] getValidReadsContextData() {
new ReadsPathDataSource(IOUtils.getPath(publicTestDir + "org/broadinstitute/hellbender/engine/reads_data_source_test1.bam")),
new SimpleInterval("1", 200, 1000), // query over larger interval with readNameFilter on "d"
readNameFilter), new String[] { "d" }
},
{new ReadsContext(
new ReadsPathDataSource(IOUtils.getPath(publicTestDir + "org/broadinstitute/hellbender/engine/reads_data_source_test1.bam")),
new SimpleInterval("1", 200, 1000), // query over larger interval with readNameFilter on "d", "b"
twoReadNamesReadFilter), new String[] { "b", "d" }
}
};
}
Expand Down

0 comments on commit 29f04d5

Please sign in to comment.