X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fext%2Fhtsjdk%2FTestHtsContigDb.java;fp=test%2Fjalview%2Fext%2Fhtsjdk%2FTestHtsContigDb.java;h=28c5cf0ddaf1fe0ca052b08b819129ea1580e336;hb=296593216c47a835f462d1d74a40b41e4818f737;hp=29303d0ee9bc931b3d4504d4039a968d70875d69;hpb=b87ae5ac68939a1b964682046e8b07958fae219a;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);
+ }
}