IntervalListInputType(final String... s) { applicableExtensions = CollectionUtil.makeSet(s); }
IntervalListInputType(final String... s) { applicableExtensions = CollectionUtil.makeSet(s); }
TYPE(final String... s) { applicableExtensions = CollectionUtil.makeSet(s); }
TYPE(final String... s) { applicableExtensions = CollectionUtil.makeSet(s); }
@DataProvider(name = "variedAccumulationLevels") public Object [][] variedAccumulationLevels() { return new Object[][] { {makeSet(MetricAccumulationLevel.ALL_READS)}, {makeSet(MetricAccumulationLevel.ALL_READS, MetricAccumulationLevel.SAMPLE)}, {makeSet(MetricAccumulationLevel.SAMPLE, MetricAccumulationLevel.LIBRARY)}, {makeSet(MetricAccumulationLevel.READ_GROUP, MetricAccumulationLevel.LIBRARY)}, {makeSet(MetricAccumulationLevel.SAMPLE, MetricAccumulationLevel.LIBRARY, MetricAccumulationLevel.READ_GROUP)}, {makeSet(MetricAccumulationLevel.SAMPLE, MetricAccumulationLevel.LIBRARY, MetricAccumulationLevel.READ_GROUP, MetricAccumulationLevel.ALL_READS)}, }; }
private static MapqMetricsCollector createMapqMetricsCollector(SAMFileHeader header) { return new MapqMetricsCollector(CollectionUtil.makeSet(MetricAccumulationLevel.ALL_READS), null); } }
fileTypeToDataTypes.get(format).add(dt); } else { fileTypeToDataTypes.put(dataTypeToFormat.get(dt), makeSet(dt));
fileTypeToDataTypes.get(format).add(dt); } else { fileTypeToDataTypes.put(dataTypeToFormat.get(dt), makeSet(dt));
@Test public void testCombinedFiltering() throws Exception { final TreeSet<String> fails = new TreeSet<String>(CollectionUtil.makeSet("rs13302979", "rs13303033", "rs2710876", "rs2799066", "rs28548431", "rs28566954", "rs71509448", "rs71628926", "tf2")); final File out = testFiltering(INPUT, ".vcf.gz", 0.4, 18, 22, 5.0d); final ListMap<String, String> filters = slurpFilters(out); Assert.assertEquals(new TreeSet<String>(filters.keySet()), fails, "Failed sites did not match expected set of failed sites."); }
final TabbedTextFileWithHeaderParser libraryParamsParser = new TabbedTextFileWithHeaderParser(MULTIPLEX_PARAMS); final Set<String> expectedColumnLabels = CollectionUtil.makeSet("OUTPUT_PREFIX"); final List<String> sampleBarcodeColumnLabels = new ArrayList<>(); for (int i = 1; i <= readStructure.sampleBarcodes.length(); i++) {
final Set<String> trio = CollectionUtil.makeSet(m.MOTHER, m.FATHER, m.OFFSPRING); trio.removeAll(allSamples);
final TabbedTextFileWithHeaderParser libraryParamsParser = new TabbedTextFileWithHeaderParser(MULTIPLEX_PARAMS); final Set<String> expectedColumnLabels = CollectionUtil.makeSet("OUTPUT_PREFIX"); final List<String> sampleBarcodeColumnLabels = new ArrayList<>(); for (int i = 1; i <= readStructure.sampleBarcodes.length(); i++) {
final Set<String> trio = CollectionUtil.makeSet(m.MOTHER, m.FATHER, m.OFFSPRING); trio.removeAll(allSamples);
final TabbedTextFileWithHeaderParser libraryParamsParser = new TabbedTextFileWithHeaderParser(LIBRARY_PARAMS); final Set<String> expectedColumnLabels = CollectionUtil.makeSet("OUTPUT", "SAMPLE_ALIAS", "LIBRARY_NAME"); final List<String> barcodeColumnLabels = new ArrayList<>(); if (readStructure.sampleBarcodes.length() == 1) {
/** * Tests that genotypes with DP < 18 are marked as failed, but not >= 18. */ @Test public void testDpFiltering() throws Exception { final Set<String> fails = CollectionUtil.makeSet("rs71509448", "rs71628926", "rs13302979", "rs2710876"); final File out = testFiltering(INPUT, ".vcf.gz", 0, 18, 0, Double.MAX_VALUE); final ListMap<String, String> filters = slurpFilters(out); Assert.assertEquals(sorted(filters.keySet()), sorted(fails), "Failed sites did not match expected set of failed sites."); }
/** * Tests that genotypes with DP < 18 are marked as failed, but not >= 18. */ @Test public void testDpFilteringToVcf() throws Exception { final Set<String> fails = CollectionUtil.makeSet("rs71509448", "rs71628926", "rs13302979", "rs2710876"); final File out = testFiltering(INPUT, ".vcf", 0, 18, 0, Double.MAX_VALUE); final ListMap<String, String> filters = slurpFilters(out); Assert.assertEquals(sorted(filters.keySet()), sorted(fails), "Failed sites did not match expected set of failed sites."); }
/** * Tests that genotypes with DP < 18 are marked as failed, but not >= 18. */ @Test(dataProvider = "goodInputVcfs") public void testFsFiltering(final File input) throws Exception { final Set<String> fails = CollectionUtil.makeSet("rs13303033", "rs28548431", "rs2799066"); final File out = testFiltering(input, ".vcf.gz", 0, 0, 0, 5.0d); final ListMap<String, String> filters = slurpFilters(out); Assert.assertEquals(sorted(filters.keySet()), sorted(fails), "Failed sites did not match expected set of failed sites."); }
/** * Tests that sites with a het allele balance < 0.4 are marked as filtered out. */ @Test public void testAbFiltering() throws Exception { final Set<String> fails = CollectionUtil.makeSet("tf2", "rs28566954", "rs28548431"); final File out = testFiltering(INPUT, ".vcf.gz", 0.4, 0, 0, Double.MAX_VALUE); final ListMap<String, String> filters = slurpFilters(out); Assert.assertEquals(sorted(filters.keySet()), sorted(fails), "Failed sites did not match expected set of failed sites."); }
private static InsertSizeMetricsCollector createInsertSizeMetricsCollector(SAMFileHeader header) { //List<SAMReadGroupRecord> rg = ImmutableList.<SAMReadGroupRecord>of(); //if (header != null) { // rg = header.getReadGroups(); //} return new InsertSizeMetricsCollector( CollectionUtil.makeSet(MetricAccumulationLevel.ALL_READS), null, //, MetricAccumulationLevel.SAMPLE), rg, // match CollectInsertSizeMetrics defaults new CollectInsertSizeMetrics().MINIMUM_PCT, new CollectInsertSizeMetrics().HISTOGRAM_WIDTH, new CollectInsertSizeMetrics().DEVIATIONS, true); } private static MapqMetricsCollector createMapqMetricsCollector(SAMFileHeader header) {
/** * Tests that genotypes with low GQ are filtered appropriately. */ @Test public void testGqFiltering() throws Exception { final Set<String> fails = CollectionUtil.makeSet("rs71509448"); // SNP with GQ=21; lowest GQ in file { final File out = testFiltering(INPUT, ".vcf.gz", 0, 0, 20, Double.MAX_VALUE); final ListMap<String, String> filters = slurpFilters(out); Assert.assertEquals(filters.size(), 0, "Should not have filtered sites: " + filters); } { final File out = testFiltering(INPUT, ".vcf.gz", 0, 0, 21, Double.MAX_VALUE); final ListMap<String, String> filters = slurpFilters(out); Assert.assertEquals(filters.size(), 0, "Should not have filtered sites: " + filters); } { final File out = testFiltering(INPUT, ".vcf.gz", 0, 0, 22, Double.MAX_VALUE); final ListMap<String, String> filters = slurpFilters(out); Assert.assertEquals(sorted(filters.keySet()), sorted(fails), "Failed sites did not match expected set of failed sites."); } }