fail("Expected exception opening .fai file");
}
+ /**
+ * Tests that exercise
+ * <ul>
+ * <li>opening an unindexed fasta file</li>
+ * <li>creating a .fai index</li>
+ * <li>opening the fasta file, now using the index</li>
+ * <li>error on creating index if overwrite not allowed</li>
+ * </ul>
+ *
+ * @throws IOException
+ */
@Test(groups = "Functional")
public void testCreateFastaSequenceIndex() throws IOException
{
assertTrue(db.isIndexed());
db.close();
}
+
+ /**
+ * A convenience 'test' that may be run to create a .fai file for any given
+ * fasta file
+ *
+ * @throws IOException
+ */
+ @Test(enabled = false)
+ public void testCreateIndex() throws IOException
+ {
+
+ File fasta = new File("test/jalview/io/vcf/contigs.fasta");
+ HtsContigDb.createFastaSequenceIndex(fasta.toPath(), true);
+ }
}