X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FPIRFile.java;h=4c10abe664671fa759a5547b0b71e44b0b447637;hb=7897c6cb08b496285bcb5fa9ed2d9f7d887d0068;hp=3e5abd610f6e17cfc2f0fb7091ec8c0ee13b9937;hpb=49685e6426d5ac136dce4907196751680c667670;p=jalview.git diff --git a/src/jalview/io/PIRFile.java b/src/jalview/io/PIRFile.java index 3e5abd6..4c10abe 100755 --- a/src/jalview/io/PIRFile.java +++ b/src/jalview/io/PIRFile.java @@ -23,38 +23,37 @@ import java.util.*; import jalview.datamodel.*; -public class PIRFile - extends AlignFile +public class PIRFile extends AlignFile { public static boolean useModellerOutput = false; - Vector words = new Vector(); //Stores the words in a line after splitting + Vector words = new Vector(); // Stores the words in a line after splitting public PIRFile() { } - public PIRFile(String inFile, String type) - throws IOException + public PIRFile(String inFile, String type) throws IOException { super(inFile, type); } + public PIRFile(FileParse source) throws IOException { super(source); } - public void parse() - throws IOException + + public void parse() throws IOException { StringBuffer sequence; String line = null; ModellerDescription md; - while ( (line = nextLine()) != null) + while ((line = nextLine()) != null) { if (line.length() == 0) { - //System.out.println("blank line"); + // System.out.println("blank line"); continue; } if (line.indexOf("C;") == 0 || line.indexOf("#") == 0) @@ -92,8 +91,7 @@ public class PIRFile seqs.addElement(newSeq); - md = new ModellerDescription(newSeq. - getDescription()); + md = new ModellerDescription(newSeq.getDescription()); md.updateSequenceI(newSeq); } } @@ -112,7 +110,7 @@ public class PIRFile int i = 0; ModellerDescription md; - while ( (i < s.length) && (s[i] != null)) + while ((i < s.length) && (s[i] != null)) { String seq = s[i].getSequenceAsString(); seq = seq + "*"; @@ -133,8 +131,8 @@ public class PIRFile out.append(">N1;" + s[i].getName() + "\n"); if (s[i].getDescription() == null) { - out.append(s[i].getName() + " " + - (s[i].getEnd() - s[i].getStart() + 1)); + out.append(s[i].getName() + " " + + (s[i].getEnd() - s[i].getStart() + 1)); out.append(is_NA ? " bases\n" : " residues\n"); } else @@ -160,9 +158,10 @@ public class PIRFile } else { - out.append(s[i].getName() + " " - + (s[i].getEnd() - s[i].getStart() + 1) - + " residues\n"); + out + .append(s[i].getName() + " " + + (s[i].getEnd() - s[i].getStart() + 1) + + " residues\n"); } } }