X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FSequenceFetcher.java;h=2beb3d95dfa5d58b14bbbdf62c299c413bf68b24;hb=237972562c84b83dbd287071cdd839d97aaf7d4b;hp=99c1d5e545b5c2ecc0e2c5bde1ea4fd3e8822bc6;hpb=6f595029738e21743279f9f1e350ec8870700c6d;p=jalview.git diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 99c1d5e..2beb3d9 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -301,6 +301,17 @@ public class SequenceFetcher onlyPdbEntries.addElement(pdb); } + Enumeration en2 = entry.getAccession().elements(); + while (en2.hasMoreElements()) + { + sequence[i].getDatasetSequence().addDBRef(new DBRefEntry(DBRefSource.UNIPROT, + "0", + en2.nextElement().toString())); + } + + + + sequence[i].getDatasetSequence().setPDBId(onlyPdbEntries); if (entry.getFeature() != null) { @@ -364,7 +375,7 @@ public class SequenceFetcher String format = new IdentifyFile().Identify(result, "Paste"); SequenceI[] sequences = null; - if (FormatAdapter.formats.contains(format)) + if (FormatAdapter.isValidFormat(format)) { sequences = null; try{ sequences = new FormatAdapter().readFile(result.toString(), "Paste", @@ -375,14 +386,17 @@ public class SequenceFetcher { if (alignFrame == null) { - AlignFrame af = new AlignFrame(new Alignment(sequences)); + AlignFrame af = new AlignFrame(new Alignment(sequences), + AlignFrame.DEFAULT_WIDTH, + AlignFrame.DEFAULT_HEIGHT +); af.currentFileFormat = format; if(title==null) title = "Retrieved from " + database.getSelectedItem(); Desktop.addInternalFrame(af, title, - AlignFrame.NEW_WINDOW_WIDTH, - AlignFrame.NEW_WINDOW_HEIGHT); + AlignFrame.DEFAULT_WIDTH, + AlignFrame.DEFAULT_HEIGHT); af.statusBar.setText("Successfully pasted alignment file"); try