X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBfile.java;h=c1018a325efa6ac49abfdcc061f16aff6814482a;hb=4d7f98a6dd54d9863ba449ec79dcd95d25ed863d;hp=58991f39f3980af17a814a904d1d27ecd918843b;hpb=619cc880371f3228e6a1fb33c6bfb6e7a7e2622c;p=jalview.git diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index 58991f3..c1018a3 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -63,8 +63,8 @@ public class PDBfile extends jalview.io.AlignFile */ private boolean externalSecondaryStructure = false; - public PDBfile(boolean addAlignmentAnnotations, boolean predictSecondaryStructure, - boolean externalSecStr) + public PDBfile(boolean addAlignmentAnnotations, + boolean predictSecondaryStructure, boolean externalSecStr) { super(); this.visibleChainAnnotation = addAlignmentAnnotations; @@ -72,9 +72,9 @@ public class PDBfile extends jalview.io.AlignFile this.externalSecondaryStructure = externalSecStr; } - public PDBfile(boolean addAlignmentAnnotations, boolean predictSecondaryStructure, - boolean externalSecStr, String file, String protocol) - throws IOException + public PDBfile(boolean addAlignmentAnnotations, + boolean predictSecondaryStructure, boolean externalSecStr, + String file, String protocol) throws IOException { super(false, file, protocol); this.visibleChainAnnotation = addAlignmentAnnotations; @@ -83,8 +83,9 @@ public class PDBfile extends jalview.io.AlignFile doParse(); } - public PDBfile(boolean addAlignmentAnnotations, boolean predictSecondaryStructure, - boolean externalSecStr, FileParse source) throws IOException + public PDBfile(boolean addAlignmentAnnotations, + boolean predictSecondaryStructure, boolean externalSecStr, + FileParse source) throws IOException { super(false, source); this.visibleChainAnnotation = addAlignmentAnnotations; @@ -252,8 +253,7 @@ public class PDBfile extends jalview.io.AlignFile processPdbFileWithAnnotate3d(rnaSequences); } catch (Exception x) { - System.err - .println("Exceptions when dealing with RNA in pdb file"); + System.err.println("Exceptions when dealing with RNA in pdb file"); x.printStackTrace(); } @@ -339,7 +339,8 @@ public class PDBfile extends jalview.io.AlignFile public static String relocateCalcId(String calcId, Hashtable alreadyLoadedPDB) throws Exception { - int s = CALC_ID_PREFIX.length(), end = calcId.indexOf(CALC_ID_PREFIX, s); + int s = CALC_ID_PREFIX.length(), end = calcId + .indexOf(CALC_ID_PREFIX, s); String between = calcId.substring(s, end - 1); return CALC_ID_PREFIX + alreadyLoadedPDB.get(between) + ":" + calcId.substring(end); @@ -374,16 +375,15 @@ public class PDBfile extends jalview.io.AlignFile Class cl = Class.forName("jalview.ext.jmol.PDBFileWithJmol"); if (cl != null) { - final Constructor constructor = cl.getConstructor(new Class[] - { FileParse.class }); - final Object[] args = new Object[] - { new FileParse(getDataName(), type) }; + final Constructor constructor = cl + .getConstructor(new Class[] { FileParse.class }); + final Object[] args = new Object[] { new FileParse(getDataName(), + type) }; Object jmf = constructor.newInstance(args); AlignmentI al = new Alignment((SequenceI[]) cl.getMethod( - "getSeqsAsArray", new Class[] - {}).invoke(jmf)); - cl.getMethod("addAnnotations", new Class[] - { AlignmentI.class }).invoke(jmf, al); + "getSeqsAsArray", new Class[] {}).invoke(jmf)); + cl.getMethod("addAnnotations", new Class[] { AlignmentI.class }) + .invoke(jmf, al); for (SequenceI sq : al.getSequences()) { if (sq.getDatasetSequence() != null) @@ -402,8 +402,8 @@ public class PDBfile extends jalview.io.AlignFile } } - private void replaceAndUpdateChains(List prot, - AlignmentI al, String pep, boolean b) + private void replaceAndUpdateChains(List prot, AlignmentI al, + String pep, boolean b) { List> replaced = AlignSeq .replaceMatchingSeqsWith(seqs, annotations, prot, al, pep, @@ -445,13 +445,11 @@ public class PDBfile extends jalview.io.AlignFile { // TODO: use the PDB ID of the structure if one is available, to save // bandwidth and avoid uploading the whole structure to the service - Object annotate3d = cl.getConstructor(new Class[] - {}).newInstance(new Object[] - {}); + Object annotate3d = cl.getConstructor(new Class[] {}).newInstance( + new Object[] {}); AlignmentI al = ((AlignmentI) cl.getMethod("getRNAMLFor", - new Class[] - { FileParse.class }).invoke(annotate3d, new Object[] - { new FileParse(getDataName(), type) })); + new Class[] { FileParse.class }).invoke(annotate3d, + new Object[] { new FileParse(getDataName(), type) })); for (SequenceI sq : al.getSequences()) { if (sq.getDatasetSequence() != null)