Biostar Beta. Not for public use.
Install CRISPRCasFinder under Ubuntu without having administrator rights
2
Entering edit mode
16 months ago

Hi, I need to install the following software in our server. https://crisprcas.i2bc.paris-saclay.fr/Home/Download Our server uses linux operating system but I don't have administrator rights. I usually use conda to install any software but this particular one doesn't have conda version. How can I install it without having administrator rights? Cheers

ADD COMMENTlink
5
Entering edit mode
18 months ago
Bergen, Norway

In Linux you don't need to 'install' binaries to run them. Placing them in a directory and making the binary executable is enough. The problematic part is the dependencies. Looking at the documentation and the script install_Ubuntu.sh, this software is no different as is the installer is 99% managing dependencies. It is so tightly (with some bad practices) integrated with apt-get using sudo and cpanm, that it will be a bit cumbersome to change. The only code dealing with installing two binary dependencies is given below. Fortunately, the program uses other tools mostly out of the PATH, so it should not matter how they are installed. If you are a linux hacker, you could try to read all the dependency lines from the installer. wherever you find a dependency :

launchInstall "$packageManagmentInstall" "parallel" "$LOGFILE"

find the dependency package in conda and install it, manually using something like:

conda install parallel

foreach cpanm line:

sudo cpanm Try::Tiny >> $LOGFILE # do 
cpanm Try::Tiny  

 # should use conda's cpanm

Then run the code snipped below to install the binary Macsyfinder only, in the local directory. Then test and see if the perl script works with conda versions of things, using the instructions from the manual.

   CRISPRCasFinder.pl -cf CasFinder-2.0.2 -def General -cas -i install_test/sequence.fasta -out Results_test_install –keep

If you want to modify and use the full installer, you could try the following.

I have made a little safer version as an example, by using conda, see here.

Edit: I have checked availability of conda packages and changed some of the package names, so that at least conda install should work now. I also changed the log file handling to use tee, such that you get the full output in your console. Separating STDOUT and STDERR in the console, as it was before, makes the script just harder to debug

Caveat: I don't think that dependency management by shell script is a sustainable way of doing this.

replace:

echo "apt-get update/upgrade" >> $LOGFILE
sudo apt-get -y update >> $LOGFILE
sudo apt-get -y upgrade >> $LOGFILE
packageManagmentInstall='sudo apt-get -y install '

with:

echo "apt-get update/upgrade" >> $LOGFILE
# NONO: sudo apt-get -y update >> $LOGFILE
# NONO: sudo apt-get -y upgrade >> $LOGFILE
packageManagmentInstall='conda install '

in addition remove all leading sudo from all commands, they will not work ofc. And more changes required, delete those lines

  sudo cp /usr/bin/clustalw $CURDIR/bin/clustalw2 # it should be only in PATH, if the program really needs it exactly there do:
  cp `which clustalw` $CURDIR/bin/clustalw2

remove also:

  sudo chmod 755 .
  sudo chmod 755 *

There is no need to make your home world readable and executable.

and see how that works out. Run the install script and check the log for errors, then deal with each of them. NONO means that is bad practice to sneak a full system update into an install script. Most likely this will break for some packages, then you have to find out how to get them using conda search and replace the package name with the conda package name.

ADD COMMENTlink
0
Entering edit mode

I have edited the answer, as there was a bit more to change for a local install, and stay below the 5000 character limit

ADD REPLYlink
1
Entering edit mode
18 months ago
Bergen, Norway

I have split this up into two answers to make it more readable. This answer is in case you find the other answer too hard to do, or you just want to do it the 'official' way.

Ask IT support to run the installation script using sudo for you. Installing software is the job of IT support and they know best how to do it.

ADD COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1