htsjdk.samtools.util.TestUtil Java Examples

The following examples show how to use htsjdk.samtools.util.TestUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DGEMatrixTest.java    From Drop-seq with MIT License 5 votes vote down vote up
private File writeMatrixMarket(final DGEMatrix mat) throws IOException {
    final File tempDir = TestUtil.getTempDirectory("DGEMatrixTest.", ".tmp");
    tempDir.deleteOnExit();
    final File mmFile = File.createTempFile("DGEMatrixTest.", ".mm.gz", tempDir);
    mmFile.deleteOnExit();
    mat.writeFile(mmFile, true, DGEMatrix.FileFormat.MM_SPARSE);
    return mmFile;
}
 
Example #2
Source File: ReadCountCollectionUnitTest.java    From gatk-protected with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test(dataProvider = "correctInstantiationData")
public void testSerializeDeserialize(final ReadCountCollectionInfo info) {
    final ReadCountCollection newInstance = info.newInstance();
    try {
        TestUtil.serializeAndDeserialize(newInstance);
    } catch (final IOException | ClassNotFoundException e) {
        Assert.fail("Exception thrown", e);
    }
}