X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFormatAdapter.java;h=79a9190a4b997365c522ee8e81e535fbeff2086a;hb=8a6fa9ea9900d0f106529c3f6283e7f9d76dd2cb;hp=dc0526d8ae2169f74135528450fff135e99c78e7;hpb=d423f22792e47dbc800ae220a58677f988971d06;p=jalview.git diff --git a/src/jalview/io/FormatAdapter.java b/src/jalview/io/FormatAdapter.java index dc0526d..79a9190 100755 --- a/src/jalview/io/FormatAdapter.java +++ b/src/jalview/io/FormatAdapter.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * * This file is part of Jalview. @@ -194,23 +194,26 @@ public class FormatAdapter extends AppletFormatAdapter { if (omitHidden != null) { - // - Alignment alv = new Alignment(replaceStrings(alignment - .getSequencesArray(), omitHidden)); + // + Alignment alv = new Alignment(replaceStrings( + alignment.getSequencesArray(), omitHidden)); AlignmentAnnotation[] ala = alignment.getAlignmentAnnotation(); - for (int i = 0; i < ala.length; i++) + if (ala != null) { - AlignmentAnnotation na = new AlignmentAnnotation(ala[i]); - if (selgp != null) + for (int i = 0; i < ala.length; i++) { - colSel.makeVisibleAnnotation(selgp.getStartRes(), selgp - .getEndRes(), na); + AlignmentAnnotation na = new AlignmentAnnotation(ala[i]); + if (selgp != null) + { + colSel.makeVisibleAnnotation(selgp.getStartRes(), + selgp.getEndRes(), na); + } + else + { + colSel.makeVisibleAnnotation(na); + } + alv.addAnnotation(na); } - else - { - colSel.makeVisibleAnnotation(na); - } - alv.addAnnotation(na); } return this.formatSequences(format, alv, suffix); }