Skip to content
Snippets Groups Projects
Commit 9aaa6979 authored by tcarver's avatar tcarver
Browse files

include the header when sending fasta to NCBI

parent 3befe8c0
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ import uk.ac.sanger.artemis.io.EntryInformationException; ...@@ -31,6 +31,7 @@ import uk.ac.sanger.artemis.io.EntryInformationException;
import uk.ac.sanger.artemis.io.InvalidKeyException; import uk.ac.sanger.artemis.io.InvalidKeyException;
import java.io.IOException; import java.io.IOException;
import java.io.StringWriter;
import java.util.Hashtable; import java.util.Hashtable;
import java.awt.event.*; import java.awt.event.*;
...@@ -159,19 +160,24 @@ public class RunMenu extends SelectionMenu ...@@ -159,19 +160,24 @@ public class RunMenu extends SelectionMenu
"NCBI Search", JOptionPane.INFORMATION_MESSAGE); "NCBI Search", JOptionPane.INFORMATION_MESSAGE);
return; return;
} }
final String residues;
final StringWriter writer = new StringWriter();
try
{
if(program.getType() == ExternalProgram.AA_PROGRAM) if(program.getType() == ExternalProgram.AA_PROGRAM)
residues = features.elementAt(0).getTranslation().toString().toUpperCase(); features.elementAt(0).writeAminoAcidsOfFeature(writer);
else else
residues = features.elementAt(0).getBases(); features.elementAt(0).writeBasesOfFeature(writer);
String data = RunBlastAtNCBI.setData(programName, residues); writer.close();
final String data = RunBlastAtNCBI.setData(programName, writer.toString());
if(data != null) if(data != null)
{ {
RunBlastAtNCBI blastSearch = new RunBlastAtNCBI(data); RunBlastAtNCBI blastSearch = new RunBlastAtNCBI(data);
blastSearch.start(); blastSearch.start();
} }
}
catch(IOException ioe){}
//BrowserControl.displayURL(program.getProgramOptions()+residues); //BrowserControl.displayURL(program.getProgramOptions()+residues);
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment