if (annotations[i].secondaryStructure == 'H'
|| annotations[i].secondaryStructure == 'E')
{
- hasIcons = true;
+ hasIcons |= true;
}
if (annotations[i].displayCharacter == null)
firstChar = annotations[i].displayCharacter.charAt(0);
// check to see if it looks like a sequence or is secondary structure
// labelling.
- if (
+ if (annotations[i].secondaryStructure!=' ' && !hasIcons &&
// Uncomment to only catch case where displayCharacter==secondary
// Structure
// to correctly redisplay SS annotation imported from Stockholm,
// exported to JalviewXML and read back in again.
// &&
// annotations[i].displayCharacter.charAt(0)==annotations[i].secondaryStructure
- firstChar != 'H'
+ firstChar != ' '
+ && firstChar != 'H'
&& firstChar != 'E'
&& firstChar != '-'
&& firstChar < jalview.schemes.ResidueProperties.aaIndex.length)
refSeq = row.sequenceRef;\r
text.append("\nSEQUENCE_REF\t" + refSeq.getName() + "\n");\r
}\r
- boolean hasGlyphs = false, hasLabels = false, hasValues = false, hasText = false;\r
+ boolean hasGlyphs = row.hasIcons, hasLabels = row.hasText, hasValues = row.hasScore, hasText = false;\r
// lookahead to check what the annotation row object actually contains.\r
for (int j = 0; row.annotations != null\r
&& j < row.annotations.length\r
if (row.annotations[j] != null)\r
{\r
comma = "";\r
- if (hasGlyphs && row.annotations[j].secondaryStructure != ' ')\r
+ if (row.annotations[j].secondaryStructure != ' ') // could be also hasGlyphs || ... \r
{\r
\r
text.append(comma + row.annotations[j].secondaryStructure);\r
}\r
}\r
\r
- if (hasSymbols && (token.equals("H") || token.equals("E")))\r
+ if (hasSymbols && (token.equals("H") || token.equals("E") || token.equals(" ")))\r
{\r
// Either this character represents a helix or sheet\r
// or an integer which can be displayed\r