\r
import java.io.*;\r
import java.util.*;\r
+import javax.swing.*;\r
import jalview.io.*;\r
import jalview.gui.*;\r
import jalview.datamodel.*;\r
AlignmentI align;\r
AlignmentPanel ap;\r
ArrayList unknownSequences;\r
+ JInternalFrame outputFrame = new JInternalFrame();\r
+ CutAndPasteTransfer output = new CutAndPasteTransfer(false);\r
+ StringBuffer sbuffer = new StringBuffer();\r
\r
public SequenceFeatureFetcher(AlignmentI align, AlignmentPanel ap)\r
{\r
remainingIds.append(ids.get(i) + ";");\r
\r
EBIFetchClient ebi = new EBIFetchClient();\r
- System.out.println(remainingIds.toString());\r
String[] result = ebi.fetchData(remainingIds.toString(), "xml", null);\r
\r
if(result!=null)\r
\r
ap.RefreshPanels();\r
findMissingIds(align);\r
+ if(sbuffer.length()>0)\r
+ {\r
+ output.formatForOutput();\r
+ outputFrame.setContentPane(output);\r
+ output.setText("Your sequences have been matched to Uniprot. Some of the ids have been\n"\r
+ +"altered, most likely the start/end residue will have been updated.\n"\r
+ +"Save your alignment to maintain the updated id.\n\n"+sbuffer.toString());\r
+ Desktop.addInternalFrame(outputFrame, "Sequence names updated ", 600,300);\r
+\r
+ }\r
\r
if(unknownSequences.size()>0)\r
{\r
sequence = align.findName( seqName.substring(0, seqName.indexOf('_')));\r
if(sequence!=null)\r
{\r
- System.out.println("changing "+sequence.getName()+" to "+seqName);\r
+ sbuffer.append("changing "+sequence.getName()+" to "+seqName+"\n");\r
sequence.setName(seqName);\r
}\r
}\r
if(sequence==null)\r
{\r
- System.out.println("UNIPROT updated suggestion is "+result[r]);\r
+ sbuffer.append("UNIPROT updated suggestion is "+result[r]+"\n");\r
sequence = align.findName( result[r] ) ;\r
\r
// this entry has been suggested by ebi.\r
{\r
unknownSequences.add(sequence.getName());\r
features = null;\r
- System.out.println(sequence.getName()+ "does not match ");\r
+ sbuffer.append(sequence.getName()+ " SEQUENCE NOT %100 MATCH \n");\r
continue;\r
}\r
\r
absStart+=1;\r
\r
if(absStart!=sequence.getStart() || absEnd!=sequence.getEnd())\r
- System.out.println("Updated: "+sequence.getName()+" "+\r
- sequence.getStart()+"/"+sequence.getEnd()+" to "+ absStart+"/"+absEnd);\r
+ sbuffer.append("Updated: "+sequence.getName()+" "+\r
+ sequence.getStart()+"/"+sequence.getEnd()+" to "+ absStart+"/"+absEnd+"\n");\r
\r
\r
sequence.setStart(absStart);\r