SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Developer eandrade Academic/Non-Profit Jobs 1 08-22-2019 03:59 AM
Picard: problem with Java? aleidenroth Bioinformatics 9 06-29-2013 07:37 PM
Purpose of Java in Bioinformatics rskr Bioinformatics 41 10-03-2011 02:56 PM
another tophat "could not execute prep_reads" error James Bioinformatics 7 11-17-2010 04:49 AM
Java for bioinformatics.. vani s kulkarni Bioinformatics 1 07-30-2009 10:19 AM

Reply
 
Thread Tools
Old 07-14-2011, 06:49 AM   #1
Stiff0810
Junior Member
 
Location: Stuttgart

Join Date: Sep 2009
Posts: 6
Default Execute Tophat Via Java

Hi all,

I'm trying to run tophat via an Java interface. With other mapping tools like bowtie etc. it works perfect. If i execute the tophat start command via java runtime exec() it doesn't work!
But if i copy the command into the shell it works fine...so what is wrong?!
Is it becaue of the nested program structure, that java doesn't allow tophat to execute bowtie??

Can anyone help me or has experiences about that??

Cheers!
Steve
Stiff0810 is offline   Reply With Quote
Old 07-14-2011, 07:14 AM   #2
vadim
Member
 
Location: Cambridge, UK

Join Date: Sep 2009
Posts: 37
Default

Do you read output and error streams of the process? Probably the buffers are just full.
vadim is offline   Reply With Quote
Old 07-14-2011, 09:01 AM   #3
Stiff0810
Junior Member
 
Location: Stuttgart

Join Date: Sep 2009
Posts: 6
Default

Jap...i do......and the errorstream always says that bowtie ca not be found....but it's in the PATH
Stiff0810 is offline   Reply With Quote
Old 07-14-2011, 11:25 PM   #4
simonandrews
Simon Andrews
 
Location: Babraham Inst, Cambridge, UK

Join Date: May 2009
Posts: 871
Default

Which form of exec are you using? Some of them allow you to specify the environment the command is run in and maybe you're accidentally resetting the path?
simonandrews is offline   Reply With Quote
Old 07-15-2011, 12:19 AM   #5
vadim
Member
 
Location: Cambridge, UK

Join Date: Sep 2009
Posts: 37
Default

Does it work with absolute path then?
vadim is offline   Reply With Quote
Old 07-15-2011, 01:15 PM   #6
fpepin
Member
 
Location: Berkeley

Join Date: Feb 2011
Posts: 30
Default

Java Runtime.exec(String command) should inherit the environment of the parent processes unless you overwrite it.

Two options for figure out what's wrong:
1- look at the output of: getRuntime.exec("echo $PATH"). This assumes a unix-y environment (linux/mac). This will tell you if your path is set up properly.
2- give it the the PATH specifically in exec("command", new String[]{"PATH=path/goes/here"};

vadim: what do you mean with absolute path? You need a working $PATH with tophat because it needs to find the bowtie executable.
fpepin is offline   Reply With Quote
Old 07-18-2011, 12:53 AM   #7
vadim
Member
 
Location: Cambridge, UK

Join Date: Sep 2009
Posts: 37
Default

Quote:
Originally Posted by fpepin View Post
vadim: what do you mean with absolute path? You need a working $PATH with tophat because it needs to find the bowtie executable.
Given that tophat works fine from command line I assumed that bowtie is already in $PATH. Therefore something could be wrong with tophat itself, for example it is not in $PATH. But you are right, first of all we need to see the output and errors from the process.
vadim is offline   Reply With Quote
Reply

Tags
exec, java, shell, tophat

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 11:15 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO