AlignmentExportData exportData = jalview.gui.AlignFrame
.getAlignmentForExport(JSONFile.FILE_DESC,
ap.getAlignViewport(), exportSettings);
- if (exportData.getSettings().isCancelled())
- {
- return;
- }
- String jalviewAlignmentJson = new FormatAdapter(ap,
+ String bioJSON = new FormatAdapter(ap,
exportData.getSettings()).formatSequences(JSONFile.FILE_DESC,
exportData.getAlignment(), exportData.getOmitHidden(),
exportData.getStartEndPostions(), ap.getAlignViewport()
String bioJSTemplateString = getBioJsTemplateAsString();
String generatedBioJsWithJalviewAlignmentAsJson = bioJSTemplateString
- .replaceAll("#sequenceData#", jalviewAlignmentJson)
+ .replaceAll("#sequenceData#", bioJSON)
.toString();
PrintWriter out = new java.io.PrintWriter(new java.io.FileWriter(
.valueOf(annot.get("value").toString());
String desc = annot.get("description") == null ? null : annot
.get("description").toString();
-
- char ss = annot.get("secondaryStructure") == null ? ' ' : annot
+ char ss = annot.get("secondaryStructure") == null
+ || annot.get("secondaryStructure").toString()
+ .equalsIgnoreCase("u0000") ? ' ' : annot
.get("secondaryStructure").toString().charAt(0);
String displayChar = annot.get("displayCharacter") == null ? ""
: annot.get("displayCharacter").toString();
for (JalviewBioJsColorSchemeMapper cs : JalviewBioJsColorSchemeMapper
.values())
{
- if (cs.getBioJsName().equalsIgnoreCase(bioJsColourSchemeName))
+ if (cs.getBioJsName().equalsIgnoreCase(bioJsColourSchemeName)
+ || cs.getJalviewName()
+ .equalsIgnoreCase(bioJsColourSchemeName))
{
jalviewColor = cs.getJvColourScheme();
break;