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 'Jalview-BH/JAL-3026-JAL-3063-JAXB' of https://source.jalview.org/git...
[jalview.git]
/
src
/
jalview
/
io
/
StockholmFile.java
diff --git
a/src/jalview/io/StockholmFile.java
b/src/jalview/io/StockholmFile.java
index
606540f
..
0e73af1
100644
(file)
--- a/
src/jalview/io/StockholmFile.java
+++ b/
src/jalview/io/StockholmFile.java
@@
-205,7
+205,7
@@
public class StockholmFile extends AlignFile
String version;
// String id;
Hashtable seqAnn = new Hashtable(); // Sequence related annotations
String version;
// String id;
Hashtable seqAnn = new Hashtable(); // Sequence related annotations
- LinkedHashMap<String, String> seqs = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> seqs = new LinkedHashMap<>();
Regex p, r, rend, s, x;
// Temporary line for processing RNA annotation
// String RNAannot = "";
Regex p, r, rend, s, x;
// Temporary line for processing RNA annotation
// String RNAannot = "";
@@
-666,7
+666,7
@@
public class StockholmFile extends AlignFile
strucAnn = new Hashtable();
}
strucAnn = new Hashtable();
}
- Vector<AlignmentAnnotation> newStruc = new Vector<AlignmentAnnotation>();
+ Vector<AlignmentAnnotation> newStruc = new Vector<>();
parseAnnotationRow(newStruc, type, ns);
for (AlignmentAnnotation alan : newStruc)
{
parseAnnotationRow(newStruc, type, ns);
for (AlignmentAnnotation alan : newStruc)
{
@@
-718,7
+718,7
@@
public class StockholmFile extends AlignFile
private void guessDatabaseFor(Sequence seqO, String dbr, String dbsource)
{
DBRefEntry dbrf = null;
private void guessDatabaseFor(Sequence seqO, String dbr, String dbsource)
{
DBRefEntry dbrf = null;
- List<DBRefEntry> dbrs = new ArrayList<DBRefEntry>();
+ List<DBRefEntry> dbrs = new ArrayList<>();
String seqdb = "Unknown", sdbac = "" + dbr;
int st = -1, en = -1, p;
if ((st = sdbac.indexOf("/")) > -1)
String seqdb = "Unknown", sdbac = "" + dbr;
int st = -1, en = -1, p;
if ((st = sdbac.indexOf("/")) > -1)
@@
-1127,7
+1127,13
@@
public class StockholmFile extends AlignFile
String ch = (annot == null)
? ((sequenceI == null) ? "-"
: Character.toString(sequenceI.getCharAt(k)))
String ch = (annot == null)
? ((sequenceI == null) ? "-"
: Character.toString(sequenceI.getCharAt(k)))
- : annot.displayCharacter;
+ : (annot.displayCharacter == null
+ ? String.valueOf(annot.secondaryStructure)
+ : annot.displayCharacter);
+ if (ch == null)
+ {
+ ch = " ";
+ }
if (key != null && key.equals("SS"))
{
char ssannotchar = ' ';
if (key != null && key.equals("SS"))
{
char ssannotchar = ' ';
@@
-1149,11
+1155,7
@@
public class StockholmFile extends AlignFile
}
if (charset)
{
}
if (charset)
{
- if (ssannotchar == ' ' && isrna)
- {
- ssannotchar = '.';
- }
- return ssannotchar;
+ return (ssannotchar == ' ' && isrna) ? '.' : ssannotchar;
}
}
}
}