use of org.broadinstitute.hellbender.tools.copynumber.allelic.alleliccount.AllelicCountCollection in project gatk by broadinstitute.
the class CollectAllelicCountsIntegrationTest method testData.
@DataProvider(name = "testData")
public Object[][] testData() throws IOException {
//counts from IGV with minMQ = 30 and minBQ = 20
final AllelicCountCollection normalCountsExpected = new AllelicCountCollection();
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 10736, 10736), 0, 0));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 11522, 11522), 7, 4));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 12098, 12098), 8, 6));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 12444, 12444), 0, 18));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 13059, 13059), 0, 8));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 14630, 14630), 9, 8));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 15204, 15204), 4, 4));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("2", 14689, 14689), 6, 9));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("2", 14982, 14982), 6, 5));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("2", 15110, 15110), 6, 0));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("2", 15629, 15629), 5, 3));
final AllelicCountCollection tumorCountsExpected = new AllelicCountCollection();
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 10736, 10736), 0, 0));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 11522, 11522), 7, 4));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 12098, 12098), 8, 6));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 12444, 12444), 0, 17));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 13059, 13059), 0, 8));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 14630, 14630), 9, 8));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 15204, 15204), 4, 3));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("2", 14689, 14689), 6, 9));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("2", 14982, 14982), 6, 5));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("2", 15110, 15110), 6, 0));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("2", 15629, 15629), 5, 3));
return new Object[][] { { NORMAL_BAM_FILE, normalCountsExpected }, { TUMOR_BAM_FILE, tumorCountsExpected } };
}
use of org.broadinstitute.hellbender.tools.copynumber.allelic.alleliccount.AllelicCountCollection in project gatk by broadinstitute.
the class CollectAllelicCountsIntegrationTest method test.
@Test(dataProvider = "testData")
public void test(final File inputBAMFile, final AllelicCountCollection countsExpected) {
final File outputFile = createTempFile("collect-allelic-counts-test-output", ".tsv");
final String[] arguments = { "-" + StandardArgumentDefinitions.INPUT_SHORT_NAME, inputBAMFile.getAbsolutePath(), "-" + ExomeStandardArgumentDefinitions.SITES_FILE_SHORT_NAME, SITES_FILE.getAbsolutePath(), "-" + StandardArgumentDefinitions.REFERENCE_SHORT_NAME, REF_FILE.getAbsolutePath(), "-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME, outputFile.getAbsolutePath() };
runCommandLine(arguments);
final AllelicCountCollection countsResult = new AllelicCountCollection(outputFile);
Assert.assertEquals(countsExpected, countsResult);
}
use of org.broadinstitute.hellbender.tools.copynumber.allelic.alleliccount.AllelicCountCollection in project gatk-protected by broadinstitute.
the class CollectAllelicCounts method doWork.
@Override
protected Object doWork() {
validateArguments();
final File referenceFile = referenceArguments.getReferenceFile();
final IntervalList siteIntervals = IntervalList.fromFile(inputSiteIntervalsFile);
final AllelicCountCollector allelicCountCollector = new AllelicCountCollector(referenceFile, readValidationStringency);
logger.info("Collecting allelic counts...");
final AllelicCountCollection allelicCounts = allelicCountCollector.collect(inputBAMFile, siteIntervals, minimumMappingQuality, minimumBaseQuality);
allelicCounts.write(outputAllelicCountsFile);
logger.info("Allelic counts written to " + outputAllelicCountsFile.toString());
return "SUCCESS";
}
use of org.broadinstitute.hellbender.tools.copynumber.allelic.alleliccount.AllelicCountCollection in project gatk-protected by broadinstitute.
the class CollectAllelicCountsIntegrationTest method testData.
@DataProvider(name = "testData")
public Object[][] testData() throws IOException {
//counts from IGV with minMQ = 30 and minBQ = 20
final AllelicCountCollection normalCountsExpected = new AllelicCountCollection();
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 10736, 10736), 0, 0));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 11522, 11522), 7, 4));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 12098, 12098), 8, 6));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 12444, 12444), 0, 18));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 13059, 13059), 0, 8));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 14630, 14630), 9, 8));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("1", 15204, 15204), 4, 4));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("2", 14689, 14689), 6, 9));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("2", 14982, 14982), 6, 5));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("2", 15110, 15110), 6, 0));
normalCountsExpected.add(new AllelicCount(new SimpleInterval("2", 15629, 15629), 5, 3));
final AllelicCountCollection tumorCountsExpected = new AllelicCountCollection();
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 10736, 10736), 0, 0));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 11522, 11522), 7, 4));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 12098, 12098), 8, 6));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 12444, 12444), 0, 17));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 13059, 13059), 0, 8));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 14630, 14630), 9, 8));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("1", 15204, 15204), 4, 3));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("2", 14689, 14689), 6, 9));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("2", 14982, 14982), 6, 5));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("2", 15110, 15110), 6, 0));
tumorCountsExpected.add(new AllelicCount(new SimpleInterval("2", 15629, 15629), 5, 3));
return new Object[][] { { NORMAL_BAM_FILE, normalCountsExpected }, { TUMOR_BAM_FILE, tumorCountsExpected } };
}
use of org.broadinstitute.hellbender.tools.copynumber.allelic.alleliccount.AllelicCountCollection in project gatk-protected by broadinstitute.
the class CollectAllelicCountsIntegrationTest method test.
@Test(dataProvider = "testData")
public void test(final File inputBAMFile, final AllelicCountCollection countsExpected) {
final File outputFile = createTempFile("collect-allelic-counts-test-output", ".tsv");
final String[] arguments = { "-" + StandardArgumentDefinitions.INPUT_SHORT_NAME, inputBAMFile.getAbsolutePath(), "-" + ExomeStandardArgumentDefinitions.SITES_FILE_SHORT_NAME, SITES_FILE.getAbsolutePath(), "-" + StandardArgumentDefinitions.REFERENCE_SHORT_NAME, REF_FILE.getAbsolutePath(), "-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME, outputFile.getAbsolutePath() };
runCommandLine(arguments);
final AllelicCountCollection countsResult = new AllelicCountCollection(outputFile);
Assert.assertEquals(countsExpected, countsResult);
}
Aggregations