X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fext%2Fhtsjdk%2FTestHtsContigDb.java;h=28c5cf0ddaf1fe0ca052b08b819129ea1580e336;hb=05c12ef9626200844bf5067056f03e84090565b3;hp=29303d0ee9bc931b3d4504d4039a968d70875d69;hpb=d53f86449820b92534376bd383e92a083037ec90;p=jalview.git
diff --git a/test/jalview/ext/htsjdk/TestHtsContigDb.java b/test/jalview/ext/htsjdk/TestHtsContigDb.java
index 29303d0..28c5cf0 100644
--- a/test/jalview/ext/htsjdk/TestHtsContigDb.java
+++ b/test/jalview/ext/htsjdk/TestHtsContigDb.java
@@ -78,6 +78,17 @@ public class TestHtsContigDb
fail("Expected exception opening .fai file");
}
+ /**
+ * Tests that exercise
+ *
+ * - opening an unindexed fasta file
+ * - creating a .fai index
+ * - opening the fasta file, now using the index
+ * - error on creating index if overwrite not allowed
+ *
+ *
+ * @throws IOException
+ */
@Test(groups = "Functional")
public void testCreateFastaSequenceIndex() throws IOException
{
@@ -120,4 +131,18 @@ public class TestHtsContigDb
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);
+ }
}