HenrikBengtsson / CBI-software

A Scientific Software Stack for HPC (CentOS oriented)
https://wynton.ucsf.edu/hpc/software/software-repositories.html
5 stars 2 forks source link

Installing on Centos7 #45

Closed hgputnam closed 2 years ago

hgputnam commented 2 years ago

I set up a vanilla Centos 7 VM which I then used the ansible playbook for our packages to install all the same packages we have on C4. I did no other C4 configuration on the VM including no changes to /etc/profiles.d

So far, the only issue was I needed to set one additional variable I did not see in the readme:

export MODULE_HOME=${MODULE_ROOT_CBI}

After that CBI installed fine. I have not yet installed all the individual software yet but I did hit one snag with annovar

$ make install
Makefile:18: warning: overriding recipe for target `/software/cbi/software/annovar-2020-06-07/annotate_variation.pl'
../utils.mk:195: warning: ignoring old recipe for target `/software/cbi/software/annovar-2020-06-07/annotate_variation.pl'
mkdir -p /tmp/20220309;
if [[ ! -f "src/annovar-2020-06-07.tar.gz" ]]; then \
  echo "ERROR: Cannot find src/annovar-2020-06-07.tar.gz. You can download the latest (sic!) version of AnnoVar as:\n\n  curl -o annovar-2020-06-07.tar.gz https://www.openbioinformatics.org/annovar/download/0wgxR2rIVP/annovar.latest.tar.gz"; \
  exit 1; \
fi
ERROR: Cannot find src/annovar-2020-06-07.tar.gz. You can download the latest (sic!) version of AnnoVar as:\n\n  curl -o annovar-2020-06-07.tar.gz https://www.openbioinformatics.org/annovar/download/0wgxR2rIVP/annovar.latest.tar.gz
make: *** [/tmp/20220309/annovar-2020-06-07/annovar.2020-06-07.tar.gz] Error 1

So, I created the src folder and did the curl -o annovar-2020-06-07.tar.gz https://www.openbioinformatics.org/annovar/download/0wgxR2rIVP/annovar.latest.tar.gz. After that I was able to make install

Not really in issue, just informational...

hgputnam commented 2 years ago

I have verified up to bcftools (ascii sort order). I am going to stop here and continue once I get one of the new nodes up on Marlowe. The VM does not have much horsepower for this sort of stuff...

hgputnam commented 2 years ago

First real issue was cutadapt. It was trying to load a python2 module that I don't know how to get.

Original Makefile:

include config.mk
include ../utils.mk

## Based on the official instructions in Section 'Shared installation (on a cluster)'
## of the 'Installation' document
## https://github.com/marcelm/cutadapt/blob/main/doc/installation.rst
$(INSTALL_TARGET):
    module purge; \
    module load CBI; \
    module load python/2.7.15 2> /dev/null || true; \
    python --version; \
    module list; \
    mkdir -p "$(PREFIX)/bin"; \
    virtualenv "$(PREFIX)/venv"; \
    . "$(PREFIX)/venv/bin/activate"; \
    python -m pip install --upgrade pip; \
    python -m pip install $(NAME)==$(VERSION)
    ln -fs $(PREFIX)/venv/bin/cutadapt $(PREFIX)/bin/
    ls -la "$(PREFIX)"
    ls -la "$(PREFIX)/bin"
    @echo "SOFTWARE INSTALLED TO: $(PREFIX)"

So I changed the above to use the "built-in" python 3 and also added the --user option:

include config.mk
include ../utils.mk

## Based on the official instructions in Section 'Shared installation (on a cluster)'
## of the 'Installation' document
## https://github.com/marcelm/cutadapt/blob/main/doc/installation.rst
$(INSTALL_TARGET):
    module purge; \
    module load CBI; \
    module load python/2.7.15 2> /dev/null || true; \
    python --version; \
    module list; \
    mkdir -p "$(PREFIX)/bin"; \
    python3 -m venv "$(PREFIX)/venv"; \
    . "$(PREFIX)/venv/bin/activate"; \
    python3 -m pip install --upgrade --user pip; \
    python3 -m pip install --user $(NAME)==$(VERSION)
    ln -fs $(PREFIX)/venv/bin/cutadapt $(PREFIX)/bin/
    ls -la "$(PREFIX)"
    ls -la "$(PREFIX)/bin"
    @echo "SOFTWARE INSTALLED TO: $(PREFIX)"

After that, make finished with no errors. Of course I have no idea what cutadapt does or how to test it. Was this the right thing to do Or did I do something silly?

HenrikBengtsson commented 2 years ago

Thanks. Can you please re-post a separate issue for each individual software tools? We don't want to make this into a mega-thread that can never be closed.