X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FPdb.java;h=68a73287cf1114c699bfbd59bab5f636f5234bac;hb=c932f0e85a8852824cdd8ce790af68682732c85c;hp=982c399a62b7aeab93cd37ed9cac6bcc679682bb;hpb=48f7c55f44b0526c5f7be8ebf986052ca7dae245;p=jalview.git diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index 982c399..68a7328 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -138,7 +138,7 @@ public class Pdb extends EbiFileRetrievedProxy if (!isValidReference(id)) { - System.err.println("Ignoring invalid pdb query: '" + id + "'"); + jalview.bin.Console.errPrintln("Ignoring invalid pdb query: '" + id + "'"); stopQuery(); return null; } @@ -165,7 +165,7 @@ public class Pdb extends EbiFileRetrievedProxy // todo get rid of Type and use FileFormatI instead? FileFormatI fileFormat = (pdbFileFormat == Type.PDB) ? FileFormat.PDB : FileFormat.MMCif; - pdbAlignment = new FormatAdapter().readFile(file, + pdbAlignment = new FormatAdapter().readFile(tmpFile, DataSourceType.FILE, fileFormat); if (pdbAlignment != null) { @@ -182,15 +182,14 @@ public class Pdb extends EbiFileRetrievedProxy } } - if (chain == null - || (chid != null && (chid.equals(chain) - || chid.trim().equals(chain.trim()) || (chain - .trim().length() == 0 && chid.equals("_"))))) + if (chain == null || (chid != null && (chid.equals(chain) + || chid.trim().equals(chain.trim()) + || (chain.trim().length() == 0 && chid.equals("_"))))) { // FIXME seems to result in 'PDB|1QIP|1qip|A' - 1QIP is redundant. // TODO: suggest simplify naming to 1qip|A as default name defined - pdbcs.setName(jalview.datamodel.DBRefSource.PDB + SEPARATOR - + id + SEPARATOR + pdbcs.getName()); + pdbcs.setName(jalview.datamodel.DBRefSource.PDB + SEPARATOR + id + + SEPARATOR + pdbcs.getName()); // Might need to add more metadata to the PDBEntry object // like below /* @@ -236,8 +235,8 @@ public class Pdb extends EbiFileRetrievedProxy if (pdbAlignment == null || pdbAlignment.getHeight() < 1) { throw new Exception(MessageManager.formatMessage( - "exception.no_pdb_records_for_chain", new String[] { id, - ((chain == null) ? "' '" : chain) })); + "exception.no_pdb_records_for_chain", new String[] + { id, ((chain == null) ? "' '" : chain) })); } } catch (Exception ex) // Problem parsing PDB file