@Override public List<Interval> takeSome(final Interval interval, final long idealSplitWeight, final long currentSize, final double projectedSizeOfRemaining) { final long projectedSize = currentSize + intervalWeight(interval); if (shouldIncludeInterval(idealSplitWeight, projectedSizeOfRemaining, projectedSize)) { return CollectionUtil.makeList(interval, null); } else { return CollectionUtil.makeList(null, interval); } }
@Override public List<VCFFilterHeaderLine> headerLines() { return CollectionUtil.makeList(new VCFFilterHeaderLine(FILTER_NAME, "Site exhibits QD value below a hard limit.")); } }
@Override public List<VCFFilterHeaderLine> headerLines() { return CollectionUtil.makeList( new VCFFilterHeaderLine(this.filterName, "Variant Filtered by Javascript file " + this.scriptFile)); } }
@Override public List<VCFFilterHeaderLine> headerLines() { return CollectionUtil.makeList(new VCFFilterHeaderLine("StrandBias", "Site exhibits excessive allele/strand correlation.")); }
@Override public List<Interval> takeSome(final Interval interval, final long idealSplitWeight, final long currentSize, final double projectedSizeOfRemaining) { final long projectedSize = currentSize + intervalWeight(interval); if (shouldIncludeInterval(idealSplitWeight, projectedSizeOfRemaining, projectedSize)) { return CollectionUtil.makeList(interval, null); } else { return CollectionUtil.makeList(null, interval); } }
@Override public List<VCFFilterHeaderLine> headerLines() { return CollectionUtil.makeList(new VCFFilterHeaderLine(FILTER_NAME, "Site exhibits QD value below a hard limit.")); } }
@Override public List<VCFFilterHeaderLine> headerLines() { return CollectionUtil.makeList( new VCFFilterHeaderLine(this.filterName, "Variant Filtered by Javascript file " + this.scriptFile)); } }
@Override public List<VCFFilterHeaderLine> headerLines() { return CollectionUtil.makeList(new VCFFilterHeaderLine(AB_FILTER, "Heterozygote allele balance below required threshold.")); }
@DataProvider(name = "multiTileData") public Object [][] multiTileData() { return new Object[][]{ {makeList(1,2,3), null, makeList(S_1_1_POS, S_1_2_POS, S_1_3_POS)}, {makeList(1,2,3), 1, makeList(S_1_1_POS, S_1_2_POS, S_1_3_POS)}, {makeList(1,3), 0, makeList(S_1_1_POS, S_1_3_POS)}, {makeList(3201,3202), null, makeList(S_9_3201_POS, S_9_3202_POS)}, {makeList(3201,3202), 1, makeList(S_9_3201_POS, S_9_3202_POS)}, }; }
@Override public List<VCFFilterHeaderLine> headerLines() { return CollectionUtil.makeList(new VCFFilterHeaderLine(AB_FILTER, "Heterozygote allele balance below required threshold.")); }
/** Tests rapidParseInt for positive and negative numbers, as well as non-digit suffixes */ @Test public void testRapidParseIntFails() { List<String> values = CollectionUtil.makeList("foo", "bar", "abc123", "-foo", "f00", "-f00"); for (String s : values) { try { ReadNameParser.rapidParseInt(s); Assert.fail("Should have failed to rapid-parse " + s + " as an int."); } catch (NumberFormatException nfe) { /* expected */ } } }
@Test(dataProvider = "positiveTestData") public void positiveTests(final IlluminaFileUtil.SupportedIlluminaFormat[] formats, final IlluminaDataType[] dataTypes, final int lane, final List<Integer> tiles, final int[] cycles, final String readStructure, final List<Integer> filterTiles) { makeFiles(formats, lane, tiles, cycles); writeTileMetricsOutFile(makeMap(makeList(lane - 1, lane + 1, lane), makeList(makeList(1, 2, 3), tiles, tiles))); final String[] args = makeCheckerArgs(basecallDir, lane, readStructure, dataTypes, filterTiles, false, false); Assert.assertEquals(runPicardCommandLine(args), 0); }
@Test public void passVerifyTest() { final PerTileParser<DummyDt> ddts = new MockPerTileParser(FILE_MAP); ddts.verifyData(makeList(1,2,3,4,5), null); } }
@Test(expectedExceptions = PicardException.class) public void failVerifyTestTooManyTiles() { final PerTileParser<DummyDt> ddts = new MockPerTileParser(FILE_MAP); ddts.verifyData(makeList(1,2,3,4,5,6), null); } @Test(expectedExceptions = PicardException.class)
@Test(expectedExceptions = PicardException.class) public void failVerifyTestMissingTile() { final PerTileParser<DummyDt> ddts = new MockPerTileParser(FILE_MAP); ddts.verifyData(makeList(1,2,4,5), null); }
@DataProvider(name = "overlapsData") public Object[][] overlapData() { final IntervalList three_overlaps_one_and_two = new IntervalList(fileHeader); three_overlaps_one_and_two.add(new Interval("1", 25, 400)); three_overlaps_one_and_two.add(new Interval("2", 200, 600)); //three_overlaps_one_and_two.add(new Interval("3", 50, 470)); return new Object[][]{ new Object[]{CollectionUtil.makeList(list3), CollectionUtil.makeList(list1, list2), three_overlaps_one_and_two}, }; }
@Test(expectedExceptions = IllegalArgumentException.class) public void TestFailAddAll() { IntervalList test = new IntervalList(this.fileHeader); test.addall(CollectionUtil.makeList(new Interval("blarg", 1, 1), new Interval("bloorg", 1, 1))); }
@Test(dataProvider = "testFromSequenceData") public void testFromSequenceName(final Path intervalList, final String referenceName, final Integer length) { final IntervalList intervals = IntervalList.fromPath(intervalList); final IntervalList test = IntervalList.fromName(intervals.getHeader(), referenceName); Assert.assertEquals(test.getIntervals(), CollectionUtil.makeList(new Interval(referenceName, 1, length))); }
@DataProvider(name = "subtractData") public Object[][] subtractData() { final IntervalList subtract12_from_3 = new IntervalList(fileHeader); subtract12_from_3.add(new Interval("1", 201, 201)); subtract12_from_3.add(new Interval("2", 401, 600)); subtract12_from_3.add(new Interval("3", 50, 470)); return new Object[][]{ new Object[]{CollectionUtil.makeList(list3), CollectionUtil.makeList(list1, list2), subtract12_from_3}, }; }