Question: Install bam-readcount with no sudo
0
gravatar for t2
3.7 years ago by
t250
Netherlands
t250 wrote:

Hello all, I want to use the fpfilter.pl script by the makers of VarScan2 and SomaticSniper to filter my variants, but first I need to run another analysis on the bam file using bam-reacount. 

I'm having trouble installing bam-readcount because I don't have sudo access. I have installed things locally before but never have I tried something so complicated with so many steps.

I've googled and gotten pretty confused about the issue.

I'm still stuck at installing the dependencies. I tried:

 dkpg -i --force-not--root --root=$HOME/tools build-essential git-core cmake zlib1g-dev libncurses-dev

But I get an invalid syntax warning about a python script.

Can anyone help me install bam-readcount without sudo access so I can use the fpfilter.pl script?

Thanks very much,

Tesa

 

 

ADD COMMENTlink modified 3.7 years ago • written 3.7 years ago by t250

In principle, questions about how to install or build bioinformatics software are valid questions on biostar, and don't need to be set to forum. However, here you are having problems with installing the dependencies of a bionformatics tool, which are general tools. I don't think we have had a strict policy about this case, but still, you are having problems with something general: installing software under Linux without sudo, and the error is possibly not related to a bioinformatics tool either.

I propose you do the following:

  • search stack overflow/ serverfault, they have many questions related to this
  • if really no success post a question on serverfault, about the specific error
  • before, debug and simplify the error: try to install each package seperately and see which one is the culprit
  • you gave the command, that's good but: you forgot to give the most essential information:
  • your OS and version: output of uname -a
  • the error/warning message (we can't guess what that is)
ADD REPLYlink written 3.7 years ago by Michael Dondrup45k

You might ask the systems administrator to install the dependencies. Anyone else using the system can then benefit from their presence and those are really really common dependencies.

ADD REPLYlink written 3.7 years ago by Devon Ryan86k

Hi gurus,

I understand your complaints and I have searched, that's how I got to the command to give it a go to install locally. I am not a systems administrator and I find the jargon used for installing things really confusing and difficult to implement. I think there is a significant group of people that do not have root access. This particular install is about 4 steps harder than other local installs I've done for bioinformatic tools so I thought I could see if others had any success.

The OS and version are:

Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:        14.04
Codename:       trusty

the command:

dkpg -i --force-not--root --root=$HOME/tools build-essential git-core cmake zlib1g-dev libncurses-dev

The error:

Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 23, in <module>
    import gettext
  File "/usr/lib/python2.7/gettext.py", line 89
    raise ValueError, \
                    ^
SyntaxError: invalid syntax

I will ask the administrators but usually they don't get back to us very quickly.

Thanks for the help and the pointers,

Cheers,

Tesa

ADD REPLYlink modified 3.7 years ago • written 3.7 years ago by t250

Sorry the above should be a comment and not an answer.

ADD REPLYlink written 3.7 years ago by t250

Well that's an error internal to the Python script.  Without seeing the surrounding code, it looks like it's just falling over on the syntax of raise, which was altered between Python 2 and 3 (http://docs.pythonsprints.com/python3_porting/py-porting.html#raising-exceptions).  It may well be that the Python interpreter you have there by default is Python 3 for some reason.

What's printed to terminal when you just type python?

ADD REPLYlink modified 3.7 years ago • written 3.7 years ago by george.ry1.1k

Hi george.ry,

This is the python information

Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

 

ADD REPLYlink written 3.7 years ago by t250
1

After Devon Ryan's comment that these dependencies are likely to be very common, I just attempted to install from the instructions after that.

git clone --recursive https://github.com/genome/bam-readcount.git
mkdir bam-readcount/build
cd bam-readcount/build
cmake ../
make deps
make install DESTDIR=/home/tools/bam-readcount/

That all seemed to work fine. I typed bam-readcount to see if it worked and I get the python error:

Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 23, in <module>
    import gettext
  File "/usr/lib/python2.7/gettext.py", line 89
    raise ValueError, \
                    ^
SyntaxError: invalid syntax

 

ADD REPLYlink modified 3.7 years ago • written 3.7 years ago by t250
3
gravatar for george.ry
3.7 years ago by
george.ry1.1k
United Kingdom
george.ry1.1k wrote:

OK I'm not familiar with Ubuntu, as I use Arch myself.  /usr/lib/command-not-found is actually a program run when you type something in terminal that doesn't resolve.  Basically, you're typing bam-readcount but the program isn't in your PATH, so it can't be run.

Either run the program with an exact path, like /home/you/bam-readcount/bam-readcount or in the long-term add this line to your ~/.bashrc file: export PATH="$PATH:/home/you/bam-readcount/" and then type source ~/.bashrc.

Separately, you still do have an issue with the Python interpreter on the system, as that error is because Python3 is reading a Python2 file.  Do you have a PYTHONPATH set in your ~/.bashrc?

ADD COMMENTlink modified 3.7 years ago • written 3.7 years ago by george.ry1.1k

Hi george.ry,

You were right, it was a problem with putting the whole path into the command. It works now like a charm.

I did have PYTHONPATH set and have deleted it and that error is also gone.

Thanks so much for your help,

Cheers,

Tesa

ADD REPLYlink written 3.7 years ago by t250
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: 1747 users visited in the last hour