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
Merge branch 'features/JAL-2376_add-horizontal-bar' into develop
[jalview.git]
/
src
/
jalview
/
io
/
IdentifyFile.java
diff --git
a/src/jalview/io/IdentifyFile.java
b/src/jalview/io/IdentifyFile.java
index
4b6f8e4
..
035c1fa
100755
(executable)
--- a/
src/jalview/io/IdentifyFile.java
+++ b/
src/jalview/io/IdentifyFile.java
@@
-98,12
+98,15
@@
public class IdentifyFile
boolean lineswereskipped = false;
boolean isBinary = false; // true if length is non-zero and non-printable
// characters are encountered
boolean lineswereskipped = false;
boolean isBinary = false; // true if length is non-zero and non-printable
// characters are encountered
+
try
{
if (!closeSource)
{
source.mark();
}
try
{
if (!closeSource)
{
source.mark();
}
+ boolean aaIndexHeaderRead = false;
+
while ((data = source.nextLine()) != null)
{
bytesRead += data.length();
while ((data = source.nextLine()) != null)
{
bytesRead += data.length();
@@
-146,6
+149,15
@@
public class IdentifyFile
reply = FileFormat.ScoreMatrix;
break;
}
reply = FileFormat.ScoreMatrix;
break;
}
+ if (data.startsWith("H ") && !aaIndexHeaderRead)
+ {
+ aaIndexHeaderRead = true;
+ }
+ if (data.startsWith("D ") && aaIndexHeaderRead)
+ {
+ reply = FileFormat.ScoreMatrix;
+ break;
+ }
if (data.startsWith("##GFF-VERSION"))
{
// GFF - possibly embedded in a Jalview features file!
if (data.startsWith("##GFF-VERSION"))
{
// GFF - possibly embedded in a Jalview features file!