|
|
Choosing A Webhost: |
Re: external processes: msg#00028java.bio.general
Hello, I just tried the ExecRunner class with a compliation of a Matlab skript. My parameters are Matlab matrices and vectors like [1 2 3; 4 5 6] and so on. In the ExecRunner class this 2x3 matrix will be destroyed by the StringTokenizer and my Matlab skript will be started with the arguments [1, 2, 3;, 4, 5, 6] which doesn't make any sense. I would like to suggest to add a method where one can pass the aruments as a String[]-vector. In my case I could pass every single Matlab matrix and every Matlab vector as a single String. I just tried this out with the following code: public static String execute(String command[]) throws IOException { String out = null, temp; Process exe = Runtime.getRuntime().exec(command); BufferedReader in = new BufferedReader( new InputStreamReader(exe.getInputStream())); for (out = ""; (temp = in.readLine()) != null; out += temp + "\n"); return out; } It works fine. I would add something similar to the class ExecRunner mentioned above, but adapted so that the other features of this class will also be maintained. Andreas Dräger mark.schreiber@xxxxxxxxxxxx wrote: >Hi all - > >I noticed that someone has posted a tutorial to the wiki page >(http://biojava.org/wiki/BioJava:Tutorial:MultiAlignClustalW) showing how >to launch ClustalW from biojava which is very much appreciated. The >tutorial makes use of the standard Java Runtime and Process classes. >Developers may also be interested in the ExecRunner class that is in the >utils package of biojava1.4. > >There is also an entire API for handelling external processes in the CVS >version of biojava (org.biojava.utils.process) which makes handling of >external processes much simpler. > >- Mark > >Mark Schreiber >Research Investigator (Bioinformatics) > >Novartis Institute for Tropical Diseases (NITD) >10 Biopolis Road >#05-01 Chromos >Singapore 138670 >www.nitd.novartis.com > >phone +65 6722 2973 >fax +65 6722 2910 > >_______________________________________________ >Biojava-l mailing list - Biojava-l@xxxxxxxxxxxxxxxxxx >http://lists.open-bio.org/mailman/listinfo/biojava-l > > > > > -- ================================== Andreas Dräger PhD student Eberhard Karls University Tübingen Center for Bioinformatics (ZBIT) Phone: +49-7071-29-70436 ================================== _______________________________________________ Biojava-l mailing list - Biojava-l@xxxxxxxxxxxxxxxxxx http://lists.open-bio.org/mailman/listinfo/biojava-l
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: external processes, mark . schreiber |
|---|---|
| Next by Date: | RES: external processes, Dickson S. Guedes |
| Previous by Thread: | external processes, mark . schreiber |
| Next by Thread: | Re: external processes, Russ Kepler |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|