Putting bedtools in the path
0
0
Entering edit mode
5.0 years ago
zizigolu ★ 4.4k

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
bedtools bedops samtools • 3.8k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

@Friederike I have insulated bedR locally

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Yes R also comes by a module

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 3869 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6