X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FStockholmFile.java;fp=src%2Fjalview%2Fio%2FStockholmFile.java;h=f5b517728c85ce77ad785c9030e7b7e475ed2046;hb=be762d8d9c71a7aa3121e845c45911c7192b7827;hp=798a77eb524fa05b7cc3215b11625bbbbd34a3b8;hpb=d1bb7a31fc091606aedbc255a5766ac79e36fa91;p=jalview.git diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index 798a77e..f5b5177 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -165,8 +165,8 @@ public class StockholmFile extends AlignFile for (int k = 0; k < rna.length(); k++) { - ann[k] = new Annotation(annot[k], "", Rna.getRNASecStrucState( - annot[k]).charAt(0), 0f); + ann[k] = new Annotation(annot[k], "", + Rna.getRNASecStrucState(annot[k]).charAt(0), 0f); } AlignmentAnnotation align = new AlignmentAnnotation("Sec. str.", @@ -209,9 +209,8 @@ public class StockholmFile extends AlignFile r = new Regex("# STOCKHOLM ([\\d\\.]+)"); if (!r.search(nextLine())) { - throw new IOException( - MessageManager - .getString("exception.stockholm_invalid_format")); + throw new IOException(MessageManager + .getString("exception.stockholm_invalid_format")); } else { @@ -441,8 +440,8 @@ public class StockholmFile extends AlignFile { // logger.error("Could not parse sequence line: " + line); throw new IOException(MessageManager.formatMessage( - "exception.couldnt_parse_sequence_line", - new String[] { line })); + "exception.couldnt_parse_sequence_line", new String[] + { line })); } String ns = seqs.get(x.stringMatched(1)); if (ns == null) @@ -673,8 +672,8 @@ public class StockholmFile extends AlignFile // } else { - System.err - .println("Warning - couldn't parse sequence annotation row line:\n" + System.err.println( + "Warning - couldn't parse sequence annotation row line:\n" + line); // throw new IOException("Error parsing " + line); } @@ -682,8 +681,8 @@ public class StockholmFile extends AlignFile else { throw new IOException(MessageManager.formatMessage( - "exception.unknown_annotation_detected", new String[] { - annType, annContent })); + "exception.unknown_annotation_detected", new String[] + { annType, annContent })); } } } @@ -796,8 +795,10 @@ public class StockholmFile extends AlignFile { for (DBRefEntry d : dbrs) { - jalview.util.MapList mp = new jalview.util.MapList(new int[] { - seqO.getStart(), seqO.getEnd() }, new int[] { st, en }, 1, 1); + jalview.util.MapList mp = new jalview.util.MapList( + new int[] + { seqO.getStart(), seqO.getEnd() }, new int[] { st, en }, 1, + 1); jalview.datamodel.Mapping mping = new Mapping(mp); d.setMap(mping); } @@ -817,8 +818,9 @@ public class StockholmFile extends AlignFile String type = label; if (label.contains("_cons")) { - type = (label.indexOf("_cons") == label.length() - 5) ? label - .substring(0, label.length() - 5) : label; + type = (label.indexOf("_cons") == label.length() - 5) + ? label.substring(0, label.length() - 5) + : label; } boolean ss = false, posterior = false; type = id2type(type); @@ -852,14 +854,14 @@ public class StockholmFile extends AlignFile ann.secondaryStructure = ResidueProperties.getDssp3state(pos) .charAt(0); - if (ann.secondaryStructure == pos.charAt(0)) - { - ann.displayCharacter = ""; // null; // " "; - } - else - { - ann.displayCharacter = " " + ann.displayCharacter; - } + if (ann.secondaryStructure == pos.charAt(0)) + { + ann.displayCharacter = ""; // null; // " "; + } + else + { + ann.displayCharacter = " " + ann.displayCharacter; + } } } @@ -979,8 +981,8 @@ public class StockholmFile extends AlignFile { Object idd = en.nextElement(); String type = (String) dataRef.remove(idd); - out.append(new Format("%-" + (maxid - 2) + "s").form("#=GS " - + idd.toString() + " ")); + out.append(new Format("%-" + (maxid - 2) + "s") + .form("#=GS " + idd.toString() + " ")); if (type.contains("PFAM") || type.contains("RFAM")) { @@ -1020,8 +1022,8 @@ public class StockholmFile extends AlignFile } // out.append("#=GR "); - out.append(new Format("%-" + maxid + "s").form("#=GR " - + printId(s[i], jvSuffix) + " " + key + " ")); + out.append(new Format("%-" + maxid + "s").form( + "#=GR " + printId(s[i], jvSuffix) + " " + key + " ")); ann = alAnot[j].annotations; String seq = ""; for (int k = 0; k < ann.length; k++) @@ -1076,8 +1078,8 @@ public class StockholmFile extends AlignFile } label = label.replace(" ", "_"); - out.append(new Format("%-" + maxid + "s").form("#=GC " + label - + " ")); + out.append( + new Format("%-" + maxid + "s").form("#=GC " + label + " ")); boolean isrna = aa.isValidStruc(); for (int j = 0; j < aa.annotations.length; j++) { @@ -1109,8 +1111,10 @@ public class StockholmFile extends AlignFile { char seq = ' '; Annotation annot = ann[k]; - String ch = (annot == null) ? ((sequenceI == null) ? "-" : Character - .toString(sequenceI.getCharAt(k))) : annot.displayCharacter; + String ch = (annot == null) + ? ((sequenceI == null) ? "-" + : Character.toString(sequenceI.getCharAt(k))) + : annot.displayCharacter; if (key != null && key.equals("SS")) { if (annot == null) @@ -1187,8 +1191,8 @@ public class StockholmFile extends AlignFile { return (String) typeIds.get(id); } - System.err.println("Warning : Unknown Stockholm annotation type code " - + id); + System.err.println( + "Warning : Unknown Stockholm annotation type code " + id); return id; } @@ -1209,8 +1213,8 @@ public class StockholmFile extends AlignFile { return key; } - System.err.println("Warning : Unknown Stockholm annotation type: " - + type); + System.err.println( + "Warning : Unknown Stockholm annotation type: " + type); return key; }