git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
de27aab
)
JAL-2914 process #gff-version as a valid GFF3 pragma and suppress unknown pragma...
patch/JAL-2914_relaxedGFFpragmas
author
Jim Procter
<jprocter@issues.jalview.org>
Wed, 21 Feb 2018 15:41:27 +0000
(15:41 +0000)
committer
Jim Procter
<jprocter@issues.jalview.org>
Wed, 21 Feb 2018 15:41:27 +0000
(15:41 +0000)
src/jalview/io/FeaturesFile.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/FeaturesFile.java
b/src/jalview/io/FeaturesFile.java
index
d2282b1
..
d307a51
100755
(executable)
--- a/
src/jalview/io/FeaturesFile.java
+++ b/
src/jalview/io/FeaturesFile.java
@@
-197,7
+197,8
@@
public class FeaturesFile extends AlignFile implements FeaturesSourceI
// skip comments/process pragmas
if (line.length() == 0 || line.startsWith("#"))
{
// skip comments/process pragmas
if (line.length() == 0 || line.startsWith("#"))
{
- if (line.toLowerCase().startsWith("##"))
+ if (line.toLowerCase().startsWith("##")
+ || line.indexOf("gff-version") > -1)
{
processGffPragma(line, gffProps, align, newseqs);
}
{
processGffPragma(line, gffProps, align, newseqs);
}
@@
-1093,8
+1094,8
@@
public class FeaturesFile extends AlignFile implements FeaturesSourceI
// close off any open 'forward references'
return;
}
// close off any open 'forward references'
return;
}
-
- String[] tokens = line.substring(2).split(" ");
+ int startpragma = (line.charAt(1) == '#') ? 2 : 1; // lax
+ String[] tokens = line.substring(startpragma).split(" ");
String pragma = tokens[0];
String value = tokens.length == 1 ? null : tokens[1];
String pragma = tokens[0];
String value = tokens.length == 1 ? null : tokens[1];
@@
-1141,7
+1142,11
@@
public class FeaturesFile extends AlignFile implements FeaturesSourceI
}
else
{
}
else
{
- System.err.println("Ignoring unknown pragma: " + line);
+ if (startpragma == 2)
+ {
+ // only complain if it was a genuine pragma line starting with ##
+ System.err.println("Ignoring unknown pragma: " + line);
+ }
}
}
}
}
}
}