Question: Diffbind ignores R_HOME and searches diffbind.R in wrong path
0
gravatar for thomas.draebing
3.2 years ago by
Germany
thomas.draebing20 wrote:

Dear all,

I ran into a problem, when trying to use diffbind. I am running a local server of Galaxy on a workstation in our lab. I was able to install diffbind without any obvious error. When I run it, the history entry turns green directly after leaving the queue, indicating a successful run, only much to fast. The results itself are empty and the stderr channel gives me no output. But the stdout channel outputs this:

WARNING: ignoring environment value of R_HOME
Fatal error: cannot open file '/usr/local/galaxy/shed_tools/testtoolshed.g2.bx.psu.edu/repos/bgruening/diffbind/7929c8b3f6f9/diffbind/diffbind.R': No such file or directory

Galaxy is installed in /home/galaxy_production/galaxy-dist/ not in /usr/local/galaxy/, thus of course diffbind.R can't be found there. I guess that the ignored R_HOME value contains the correct path. When checking the installation-log of diffbind this was further confirmed:
 

#############################################
R_HOME=/home/galaxy_production/galaxy-dist/dependency_dir/R_3_0_1/3.0.1/iuc/package_r_3_0_1/59b82e6e0801; export R_HOME
R_LIBS=/home/galaxy_production/galaxy-dist/dependency_dir/R_3_0_1/3.0.1/iuc/package_r_3_0_1/59b82e6e0801/lib/R/library; export R_LIBS
PATH=/home/galaxy_production/galaxy-dist/dependency_dir/R_3_0_1/3.0.1/iuc/package_r_3_0_1/59b82e6e0801/lib/R/bin:$PATH; export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/galaxy_production/galaxy-dist/dependency_dir/R_3_0_1/3.0.1/iuc/package_r_3_0_1/59b82e6e0801/lib/R/lib; export LD_LIBRARY_PATH
RHOME=/home/galaxy_production/galaxy-dist/dependency_dir/R_3_0_1/3.0.1/iuc/package_r_3_0_1/59b82e6e0801/lib/R; export RHOME
R_PATH=/home/galaxy_production/galaxy-dist/dependency_dir/R_3_0_1/3.0.1/iuc/package_r_3_0_1/59b82e6e0801/lib/R/bin; export R_PATH
PATH=$PATH:$R_HOME/bin; export PATH; R_LIBS=/home/galaxy_production/galaxy-dist/dependency_dir/diffbind/1.8.3/bgruening/diffbind/7faaf4a5e4e1; export R_LIBS;
                        Rscript -e "install.packages(c('BiocGenerics_0.8.0.tar.gz'),lib='/home/galaxy_production/galaxy-dist/dependency_dir/diffbind/1.8.3/bgruening/diffbind/7faaf4a5e4e1', repos=NULL, dependencies=FALSE)"
STDOUT
WARNING: ignoring environment value of R_HOME
#############################################

The given R_HOME path is correct, but again ignored. This happens in all similar paragraphs in the log file.

In the log of the job handler, I noticed that it failed to load some packages:

galaxy.tools.deps DEBUG 2015-09-07 18:09:41,304 Building dependency shell command for dependency 'Rscript'
galaxy.tools.deps WARNING 2015-09-07 18:09:41,304 Failed to resolve dependency on 'Rscript', ignoring
galaxy.tools.deps DEBUG 2015-09-07 18:09:41,304 Building dependency shell command for dependency 'DESeq2'
galaxy.tools.deps WARNING 2015-09-07 18:09:41,305 Failed to resolve dependency on 'DESeq2', ignoring
galaxy.tools.deps DEBUG 2015-09-07 18:09:41,305 Building dependency shell command for dependency 'R_3_0_1'
galaxy.tools.deps DEBUG 2015-09-07 18:09:41,308 Building dependency shell command for dependency 'deseq2'
galaxy.tools.deps DEBUG 2015-09-07 18:09:41,309 Building dependency shell command for dependency 'diffbind'

I tried to install R externally together with the corresponding packages, but this could not resolve the error.

Did I miss something?

I hope somebody can help me with this problem.

Thanks and best regards,

Thomas

diffbind software error galaxy • 1.3k views
ADD COMMENTlink modified 3.2 years ago • written 3.2 years ago by thomas.draebing20
3
gravatar for Bjoern Gruening
3.2 years ago by
Bjoern Gruening5.1k
Germany
Bjoern Gruening5.1k wrote:

Hi Thomas,

any reason your are not using the Tool Shed version, but the Test Tool Shed version? I have updated the TS version just now, hopefully this works for you. If not can you please tell me the Galaxy version you are using?

The wrappers are hosted here, so please feel free to enhance them if you like:

https://github.com/bgruening/galaxytools/tree/master/tools/diffbind

Cheers,

Bjoern

ADD COMMENTlink written 3.2 years ago by Bjoern Gruening5.1k

Hi Bjoern,

thanks for the fats reply. Actually I am not using the test toolshed version. I only just noticed that the path says so.

The actual path is: /home/galaxy_production/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/diffbind/9e9f85c20d99/diffbind/diffbind.R

Other tools in the shed_tools path are functioning correctly.

Sadly updating diffbind to the newest revision did not solve the problem.

Edit: As mentioned in the answer below the update actually solved the problem. I apparently did not switch to the newer version, when testing diffbind after installing the update.

I updated Galaxy just yesterday by pulling the updates from mercurial. The hg tip output is as follows:

changeset:   17143:d1f51ff3c495
tag:         tip
parent:      17135:c24bd181cfd7
parent:      17142:f6683935f81a
user:        Nate Coraor <nate@bx.psu.edu>
date:        Wed Aug 12 18:06:24 2015 -0400
summary:     Merge stable to default

https://bitbucket.org/galaxy/galaxy-dist says that this should be the newest stable build.

I will take a look at the wrapper-files. maybe I will find a solution.

Thanks,

Thomas

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by thomas.draebing20

Can you confirm that /home/galaxy_production/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/diffbind/9e9f85c20d99/diffbind.R exists?

ADD REPLYlink written 3.2 years ago by Bjoern Gruening5.1k

Yes, it is there.

The galaxy-dist/config/shed_tool_conf.xml also gives that path:

<toolbox tool_path="../shed_tools">

...

<tool file="toolshed.g2.bx.psu.edu/repos/bgruening/diffbind/9e9f85c20d99/diffbind/diffbind.xml" guid="toolshed.g2.bx.psu.edu/repos/bgruening/diffbind/diffbind/2.0.2">
  <tool_shed>toolshed.g2.bx.psu.edu</tool_shed>
    <repository_name>diffbind</repository_name>
    <repository_owner>bgruening</repository_owner>
    <installed_changeset_revision>9e9f85c20d99</installed_changeset_revision>
    <id>toolshed.g2.bx.psu.edu/repos/bgruening/diffbind/diffbind/2.0.2</id>
    <version>2.0.2</version>
</tool>

What I noticed is that the wrong path is given to RScript in the job commandline:

ln -s /mnt/sdb1/galaxy-data/files/000/dataset_173.dat 1_bamreads.bam && ln -s /mnt/sdb1/galaxy-data/files/_metadata_files/000/metadata_39.dat 1_bamreads.bai && ln -s /mnt/sdb1/galaxy-data/files/000/dataset_174.dat 1_bamcontrol.bam && ln -s /mnt/sdb1/galaxy-data/files/_metadata_files/000/metadata_40.dat 1_bamcontrol.bai && ln -s /mnt/sdb1/galaxy-data/files/000/dataset_123.dat 2_bamreads.bam && ln -s /mnt/sdb1/galaxy-data/files/_metadata_files/000/metadata_24.dat 2_bamreads.bai && ln -s /mnt/sdb1/galaxy-data/files/000/dataset_121.dat 2_bamcontrol.bam && ln -s /mnt/sdb1/galaxy-data/files/_metadata_files/000/metadata_23.dat 2_bamcontrol.bai && ln -s /mnt/sdb1/galaxy-data/files/000/dataset_117.dat 3_bamreads.bam && ln -s /mnt/sdb1/galaxy-data/files/_metadata_files/000/metadata_20.dat 3_bamreads.bai && ln -s /mnt/sdb1/galaxy-data/files/000/dataset_116.dat 3_bamcontrol.bam && ln -s /mnt/sdb1/galaxy-data/files/_metadata_files/000/metadata_19.dat 3_bamcontrol.bai && Rscript /usr/local/galaxy/shed_tools/testtoolshed.g2.bx.psu.edu/repos/bgruening/diffbind/7929c8b3f6f9/diffbind/diffbind.R -i /home/galaxy_production/galaxy-dist/database/job_working_directory/000/200/tmpSbqUaS -o /mnt/sdb1/galaxy-data/files/000/dataset_295.dat -p /mnt/sdb1/galaxy-data/files/000/dataset_296.dat -f bed

 

ADD REPLYlink written 3.2 years ago by thomas.draebing20

This is really interesting, becaus my installation looks exactly as it need to:

../shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/diffbind/7929c8b3f6f9/diffbind/diffbind.R

As a workaround just create the missing diffbind folder. I need to think about how this can happen :(

ADD REPLYlink written 3.2 years ago by Bjoern Gruening5.1k

Actually the diffbind folder is there: /home/galaxy_production/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/diffbind/9e9f85c20d99/diffbind/diffbind.R (copied from above) I noticed that the diffbind folder was missing in your post, just thought of it as a typo. Sorry.

ADD REPLYlink written 3.2 years ago by thomas.draebing20

Ok, no I'm confused. The diffbind.R script is in the right spot?

ADD REPLYlink written 3.2 years ago by Bjoern Gruening5.1k

Sorry for the confusion. The diffbind.R file is here: /home/galaxy_production/shed_tools/toolshed.g2.bx.psu.edu/repos/bgruening/diffbind/9e9f85c20d99/diffbind/diffbind.R

Galaxy is in /home/galaxy_production/galaxy-dist/. It is strange, that the shed_tools folder is outside the galaxy folder, but since there are also a lot of tools in shed_tools that are functioning well, that shouldn't be the cause of the problem.

Thus I think diffbind is installed in the correct place, but somehow, when creating the job (or job commandline), somehow a wrong path is given. I checked whether there is a testtoolshed.g2.bx.psu.edu folder somewhere on the hard drive, but there is none.

As mentioned above RScript is given the faulty path. I guess this is due to the ignored R_HOME path. The warning, that R_HOME was ignored, can be found quite often if googleing it. Most of the time that was solved by changing R_HOME. But since (at least during the installation of diffbind) the R_HOME path points to the correct folder and is ignored anyway, I don't know how to change it.

Before testing an external installation of R to circumvent the problem, I also did not have a possible conflicting installation.

Additionally MACS2 works. And it also uses the r_3_0_1 package. Although I would like to check the installation logs for MACS2 as well. Sadly the network of our university is undergoing maintenance right now and I cannot access the server right now. But I will check that asap.

 

 

ADD REPLYlink written 3.2 years ago by thomas.draebing20
0
gravatar for thomas.draebing
3.2 years ago by
Germany
thomas.draebing20 wrote:

Hi Bjoern,

I tried to run diffbind again today and it gave the correct path to RScript now, without me making any further changes. The only thing I did after the last test was running MACS2 again to test, whether it can communicate with R.

I think it was the update that helped. Although I restarted the server yesterday and started a new diffbind job from the scratch it somehow used the old version although I deactivated it. Today it automatically switched to the update as it was supposed to happen.

Sorry for the confusion and thanks for your help!

Best regards,

Thomas

ADD COMMENTlink written 3.2 years ago by thomas.draebing20

Awesome! Happy research now!

ADD REPLYlink written 3.2 years ago by Bjoern Gruening5.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 171 users visited in the last hour