I'm using a server at work and their version of samtools and bwa is way outdated. I asked the server guy to update them and he can't do it right now and told me to install these tools locally. I'm having trouble finding a way to install these items locally without using sudo. There's a few dependencies required for samtools- any tips would be greatly appreciated.
4 answers
Take a look at conda. @finswimmer wrote a nice tutorial recently for it: Creating workflows with snakemake and conda No sudo should be needed. conda automatically installs necessary dependencies.
This worked great! Thanks!
With Samtools just set /where/to/install somewhere where you can write
cd samtools-1.x # and similarly for bcftools and htslib
./configure --prefix=/where/to/install
make
make install
With BWA you need to do even less, just clone it to somewhere where you can write
git clone https://github.com/lh3/bwa.git
cd bwa; make
Epel-release might have this
This worked for me on a fresh 2019 Amazon Cloud CentOS instance
sudo amazon-linux-extras install epel
sudo yum install samtools
Probably on a non-amazon cloud CentOS
sudo yum install epel-release
sudo yum install samtools
Of course on ubuntu/debian I think samtools is in stable so you can just
sudo apt install samtools
Note that in 2019, the centos version is samtools 0.1.19, so no CRAM support etc. Recommend linuxbrew for package manager solution on CentOS if new version is needed
OPs question (13 months back) was how to install things without sudo, still every command you gave contains it. Two good answers (compile from scratch and use a package manager such as conda) have already been given. Could you remove this answer as it does not add to the actual problem?
I'll remove my answer only because it is true that the title contained information about not wanting to use sudo. That said, I find your tone rude, I am just trying to contribute to the community
Even if all the features you care about were in 0.1.19 modern Samtools is significantly faster now than the old 0.1.19 release. I'm staggered to hear that Centos is still shipping such an outdated version. If they're this tardy with Samtools I wonder what other packages they're behind on. Seems like a good reason to switch distro.
Download linuxbrew https://docs.brew.sh/Homebrew-on-Linux
brew install samtools
Log in to answer this question.