Question: Putting bedtools in the path
0
gravatar for A
9 weeks ago by
A3.8k
A3.8k wrote:

Hi

I am trying to used bedr package which need bedtools, tabix, bedops,

I have load these modules from our cluster but likely R can not locate them

How I need tell R where these tools are?

This is my error

> SV.vcf <- preprocessInput_sv(input_data =  sv_data,resdir = getwd())
[1] "Annotating mutation data:"
  |======================================================================| 100%
[1] "CHC018T"
sh: bedtools: command not found
Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  no lines available in input
In addition: Warning message:
In system(paste("bedtools cluster -i tmp.bed -d 1000000", "> res.bed")) :
  error in running command
>

I know bedtools has been installed on my MacBook

[fi1d18@cyan01 ~]$ which bedtools
/local/software/bedtools/2.21.0/bin/bedtools
samtools bedops bedtools • 147 views
ADD COMMENTlink written 9 weeks ago by A3.8k

Can you clarify if you use bedR on the cluster or on your macbook?

ADD REPLYlink written 9 weeks ago by Friederike6.0k

@Friederike I have insulated bedR locally

ADD REPLYlink written 9 weeks ago by A3.8k

bedtools installed on your local Mac has no connection to being able to use the program on your cluster. Should you not investigate why the programs don't work on cluster even when modules for those are added?

ADD REPLYlink modified 9 weeks ago • written 9 weeks ago by genomax87k

Sorry @genomax I meant bedtools loaded from cluster and not installed on my Mac

ADD REPLYlink written 9 weeks ago by A3.8k

I assume you are also loading R via a module? If all modules are loaded at the same time then bedtools should be in your $PATH (check by using echo $PATH). If you are running R in its own shell then you will need to add modules in that shell or edit your code to provide full path to the bedtools executables.

ADD REPLYlink modified 9 weeks ago • written 9 weeks ago by genomax87k

Yes R also comes by a module

ADD REPLYlink written 9 weeks ago by A3.8k

Then loading all required module simultaneously should make sure that bedtools is available in $PATH. Did you check the contents of $PATH after adding all modules?

Somtimes modules may be setup to remove a specific pre-loaded module if they conflict each other. So check after you load all modules that they are still loaded by doing a module list.

ADD REPLYlink written 9 weeks ago by genomax87k

Thank you @genomax

This is what I observed

[fi1d18@cyan01 ~]$ module list
Currently Loaded Modulefiles:
  1) torque/current          8) python/2.7.5(default)
  2) moab/current            9) openmpi/1.6.4/gcc_of2
  3) null                   10) boost/1.54.0(default)
  4) jdk/1.8.0              11) Rstudio/0.98.495.R321
  5) gcc/8.2.0              12) bedtools/2.21.0
  6) R/3.6.1                13) bedops/2.4.26
  7) qt/4.8.5               14) samtools/1.3.2
[fi1d18@cyan01 ~]$ $PATH 
-bash: /local/software/samtools/1.3.2/bin:/local/software/bedops/2.4.26/bin:/local/software/bedtools/2.21.0/bin:/local/software/Rstudio/0.98.495/r321/bin:/local/software/boost/1.54.0/bin:/local/software/openmpi/1.6.4/gcc-ofed-2.0/bin:/local/software/python/2.7.5/bin/:/local/software/qt/4.8.5/bin:/local/software/libcurl/7.47.1/bin/:/local/software/R/3.6.1/bin:/local/software/gcc/8.2.0/bin:/local/software/jdk/jdk1.8.0_51/bin:/usr/lib64/qt-3.3/bin:/local/software/moab/default/sbin:/local/software/moab/default/bin:/local/software/torque/default/sbin:/local/software/torque/default/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/lpp/mmfs/bin:/home/fi1d18/bin:/local/bin:.: No such file or directory
[fi1d18@cyan01 ~]$
ADD REPLYlink written 9 weeks ago by A3.8k

Thank you @genomax finally worked by removing one R versions from loaded modules

ADD REPLYlink written 9 weeks ago by A3.8k
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 2.3.0
Traffic: 1376 users visited in the last hour