git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2850 JAL-1766 option to load contig sequence referenced by VCF
[jalview.git]
/
src
/
jalview
/
ext
/
htsjdk
/
HtsContigDb.java
diff --git
a/src/jalview/ext/htsjdk/HtsContigDb.java
b/src/jalview/ext/htsjdk/HtsContigDb.java
index
729f658
..
73d1674
100644
(file)
--- a/
src/jalview/ext/htsjdk/HtsContigDb.java
+++ b/
src/jalview/ext/htsjdk/HtsContigDb.java
@@
-250,10
+250,19
@@
public class HtsContigDb
// ///// end of hts bits.
// ///// end of hts bits.
+ /**
+ * Reads the contig with the given id and returns as a Jalview SequenceI object.
+ * Note the database must be indexed for this operation to succeed.
+ *
+ * @param id
+ * @return
+ */
public SequenceI getSequenceProxy(String id)
{
public SequenceI getSequenceProxy(String id)
{
- if (!isValid())
+ if (!isValid() || !refFile.isIndexed())
{
{
+ System.err.println(
+ "Cannot read contig as file is invalid or not indexed");
return null;
}
return null;
}