X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FMSFfile.java;h=c3ee382a004d9e8577b8d06e872644d27e26821d;hb=28787d9646cca5dd77190930f59b7ff32cf995b4;hp=616c90b4cf0654134f5e62c28c02b010e5d51f0e;hpb=c5677e9860106a821a3e6e0429b20ede7b9a732a;p=jalview.git diff --git a/src/jalview/io/MSFfile.java b/src/jalview/io/MSFfile.java index 616c90b..c3ee382 100755 --- a/src/jalview/io/MSFfile.java +++ b/src/jalview/io/MSFfile.java @@ -1,13 +1,13 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR @@ -27,6 +27,7 @@ import org.xml.sax.SAXException; import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax; import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed; import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied; +import fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses; import jalview.datamodel.*; import jalview.util.*; @@ -63,13 +64,14 @@ public class MSFfile extends AlignFile * @throws ExceptionLoadingFailed * @throws ExceptionPermissionDenied * @throws InterruptedException + * @throws ExceptionUnmatchedClosingParentheses */ - public MSFfile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException + public MSFfile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException, ExceptionUnmatchedClosingParentheses { super(inFile, type); } - public MSFfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException + public MSFfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException, ExceptionUnmatchedClosingParentheses { super(source); } @@ -231,7 +233,7 @@ public class MSFfile extends AlignFile StringBuffer out = new StringBuffer("!!" + (is_NA ? "NA" : "AA") + "_MULTIPLE_ALIGNMENT 1.0"); - // TODO: JBPNote : Jalview doesn't remember NA or AA yet. + // TODO: JBPNote : Jalview doesn't remember NA or AA yet. out.append(newline); out.append(newline); int max = 0; @@ -242,7 +244,7 @@ public class MSFfile extends AlignFile { // Replace all internal gaps with . and external spaces with ~ s[i] = new Sequence(seqs[i].getName(), seqs[i].getSequenceAsString() - .replace('-', '.'), seqs[i].getStart(),seqs[i].getEnd()); + .replace('-', '.'), seqs[i].getStart(), seqs[i].getEnd()); StringBuffer sb = new StringBuffer(); sb.append(s[i].getSequence()); @@ -315,7 +317,7 @@ public class MSFfile extends AlignFile idBlock[i] = new String("Len: " + maxLenpad.form(s[i].getSequence().length) + " Check: " - + maxChkpad.form(checksums[i]) + " Weight: 1.00"+newline); + + maxChkpad.form(checksums[i]) + " Weight: 1.00" + newline); if (s[i].getName().length() > maxid) { @@ -349,7 +351,8 @@ public class MSFfile extends AlignFile maxid++; out.append(newline); - out.append(newline);out.append("//"); + out.append(newline); + out.append("//"); out.append(newline); out.append(newline); int len = 50;