Fix BEDCodec.canDecode() to handle block-compressed extensions #704
Merged
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
Jump to file or symbol
Failed to load files and symbols.
| @@ -226,4 +226,15 @@ private void createIndex(File testFile, File idxFile) throws IOException { | ||
| public void testGetTabixFormat() { | ||
| Assert.assertEquals(new BEDCodec().getTabixFormat(), TabixFormat.BED); | ||
| } | ||
| + | ||
magicDGS
Contributor
|
||
| + @Test | ||
| + public void testCanDecode() { | ||
| + final BEDCodec codec = new BEDCodec(); | ||
| + final String pattern = "filename.%s%s"; | ||
| + for(final String bcExt: AbstractFeatureReader.BLOCK_COMPRESSED_EXTENSIONS) { | ||
| + Assert.assertTrue(codec.canDecode(String.format(pattern, "bed", bcExt))); | ||
| + Assert.assertFalse(codec.canDecode(String.format(pattern, "vcf", bcExt))); | ||
| + Assert.assertFalse(codec.canDecode(String.format(pattern, "bed.gzip", bcExt))); | ||
| + } | ||
| + } | ||
| } | ||
Could you add a small block compressed bedfile and a test that shows that it actually can read from it as well?