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-2909 JAL-3894 hack in support to import regions of an unindexed SAM file.
[jalview.git]
/
src
/
jalview
/
datamodel
/
CigarParser.java
diff --git
a/src/jalview/datamodel/CigarParser.java
b/src/jalview/datamodel/CigarParser.java
index
a42c2b1
..
113223d
100644
(file)
--- a/
src/jalview/datamodel/CigarParser.java
+++ b/
src/jalview/datamodel/CigarParser.java
@@
-9,7
+9,9
@@
import java.util.TreeMap;
import htsjdk.samtools.CigarElement;
import htsjdk.samtools.CigarOperator;
import htsjdk.samtools.CigarElement;
import htsjdk.samtools.CigarOperator;
+import htsjdk.samtools.SAMFormatException;
import htsjdk.samtools.SAMRecord;
import htsjdk.samtools.SAMRecord;
+import jalview.bin.Cache;
public class CigarParser
{
public class CigarParser
{
@@
-291,7
+293,14
@@
public class CigarParser
do
{
// check extent of read
do
{
// check extent of read
- SAMRecord rec = it.next();
+ SAMRecord rec = null;
+ try {
+ rec = it.next();
+ } catch (SAMFormatException ex)
+ {
+ Cache.log.info("Bailing on parsing SAM File - see error below",ex);
+ break;
+ }
if (extent != null)
{
if (extent != null)
{