-
- if (annotations[i].displayCharacter.length() == 1
- && !annotations[i].displayCharacter.equals("H")
- && !annotations[i].displayCharacter.equals("E")
- && !annotations[i].displayCharacter.equals("-")
- && !annotations[i].displayCharacter.equals("."))
+ if (annotations[i].displayCharacter.length() == 1)
+ {
+ firstChar = annotations[i].displayCharacter.charAt(0);
+ // check to see if it looks like a sequence or is secondary structure labelling.
+ if (
+ // 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!='E'
+ && firstChar!='-'
+ && firstChar!='-' && firstChar<jalview.schemes.ResidueProperties.aaIndex.length)