/** * Main method for the program. Checks that input file is present and * readable, then iterates through the index printing meta data to stdout. */ protected int doWork() { if (INPUT.getName().endsWith(BAMIndex.BAMIndexSuffix)) log.warn("INPUT should be the BAM file name, not its index file"); IOUtil.assertFileIsReadable(INPUT); BAMIndexMetaData.printIndexStats(INPUT); return 0; } }
/** * Main method for the program. Checks that input file is present and * readable, then iterates through the index printing meta data to stdout. */ protected int doWork() { if (INPUT.getName().endsWith(BAMIndex.BAMIndexSuffix)) log.warn("INPUT should be the BAM file name, not its index file"); IOUtil.assertFileIsReadable(INPUT); BAMIndexMetaData.printIndexStats(INPUT); return 0; } }
@Test public static void testGetIndexTypeOK() { BAMIndexMetaData.printIndexStats(bamFile); Assert.assertTrue(bamFileReaderBAI.getIndexType().equals(SamIndexes.BAI)); Assert.assertTrue(bamFileReaderCSI.getIndexType().equals(SamIndexes.CSI)); }