CBCB Software Modules: Difference between revisions

From Cbcb
Jump to navigation Jump to search
(Add Trey's R module upgrade notes)
Line 107: Line 107:
See what changes a module makes to your environment:
See what changes a module makes to your environment:
  module show Python2/common/2.7.9
  module show Python2/common/2.7.9
== Maintainers ==
=== Creating a new release ===
=== Upgrading R ===
There are a couple scripts to hopefully make upgrading R easier.
Let us say that you are installing a new version of R and R libraries.
If that is (for example) version 3.2.1, then a set of commands might include:
> cd $MOD/R/common
> cp 3.2.0 3.2.1
Now edit 3.2.1 to include the new version and change anything of interest.
> mkdir $STOW/Rext/3.2.1
> module add R/common/3.2.1
Assuming that you edited the $MOD 3.2.1 file to tell it to load R version 3.2.1, then
$(which R) will show the new version and the module command will set the R_LIBS
variable to a new, empty directory.
> cd $STOW/R/common
> ./update_R.sh 3.2.0_list
This little shell script should call Bioconductor's biocLite() once for each
R library which was installed in 3.2.0.
(Adapted from /cbcb/sw/RedHat-7-x86_64/common/local/Rext/README.md)


== Contact ==
== Contact ==

Revision as of 19:12, 24 July 2015

Starting in the Spring of 2015, communal CBCB Bioinformatics Software has been installed using GNU Modules. Please note that the instructions below are for use with Red Hat 7 machines only.

Common Modules

CBCB Software modules are already configured for interactive shells on Red Hat 7 machines - no additional setup is required. The module files are installed in the following location:

/cbcb/sw/RedHat-7-x86_64/common/modules/release/latest

To see see what modules are available:

$ module avail

To add a module to your environment, use module add:

$ module add samtools/0.1.19

Note that you can also specify the software name without the version:

$ module add samtools

Now samtools has been added to your environment:

$ which samtools
/cbcb/sw/RedHat-7-x86_64/common/local/samtools/0.1.19/bin/samtools

User Modules

We have created some scripts to assist you with installing software and modules to your user directory in /cbcb/sw. We recommend that you use these scripts because this will help us share installed software among other CBCB users.

Run this initialization script to set up your directory structure:

$ /cbcb/sw/RedHat-7-x86_64/common/scripts/init_cbcb_sw_user.sh

This will create a directory for you:

$ tree /cbcb/sw/RedHat-7-x86_64/users/<username>
/cbcb/sw/RedHat-7-x86_64/users/<username>
├── local
├── modules
│   └── <username>
│       └── env
├── module_template
├── README
├── scripts
│   ├── copy_module_template.sh
│   ├── init_install_vars.sh
│   └── install_package.sh
└── src
  • Use the src directory for storing and compiling source code.
  • Use the local directory as the installation prefix.
  • Use the modules directory to store your modulefiles.

See #Installing Software below.

To make use of your personal module file directory, add the following to your ~/.bashrc:

module use /cbcb/sw/RedHat-7-x86_64/users/<username>/modules


Installing Software

Use the install_package.sh script to automatically compile software that uses ./configure; make; make install. The advantage to using this install script is that it will:

  • use the standardized directory structure for personal software installation, and
  • automatically create a module file for the software in your modules directory!


For full details, read the README placed in your personal directory (/cbcb/sw/RedHat-7-x86_64/users/<username>). It's also available in the cbcb-sw Gitlab repository.

Listing All Modules

The command module avail only lists modulefiles that appear in directories that have been added to your $MODULEPATH environment variable (either by hand or via module use command). To see all modulefiles that are available for your use in both the Common Modules and the User Modules:

cat /cbcb/sw/RedHat-7-x86_64/common/all_modules.txt

or see here.

Setup for non-interactive shells

Modules are already configured for interactive shells, but to use modules with non-interactive shells such as Torque, add the following to your ~/.bashrc:

. /usr/share/Modules/init/bash
. /etc/profile.d/ummodules.sh

For more information, see the UMIACS wiki.

GNU Modules Cheatsheet

Ask for help:

module --help

List available modules:

module avail

Add a module to your environment:

module add blast

List loaded modules:

module list

Remove a module from your environment:

module rm blast

Remove all modules from your environment:

module purge

Add a path to search for available modules:

module use /cbcb/sw/RedHat-7-x86_64/users/lmendelo/modules

See what changes a module makes to your environment:

module show Python2/common/2.7.9

Maintainers

Creating a new release

Upgrading R

There are a couple scripts to hopefully make upgrading R easier. Let us say that you are installing a new version of R and R libraries. If that is (for example) version 3.2.1, then a set of commands might include:

> cd $MOD/R/common
> cp 3.2.0 3.2.1

Now edit 3.2.1 to include the new version and change anything of interest.

> mkdir $STOW/Rext/3.2.1
> module add R/common/3.2.1

Assuming that you edited the $MOD 3.2.1 file to tell it to load R version 3.2.1, then $(which R) will show the new version and the module command will set the R_LIBS variable to a new, empty directory.

> cd $STOW/R/common
> ./update_R.sh 3.2.0_list

This little shell script should call Bioconductor's biocLite() once for each R library which was installed in 3.2.0.

(Adapted from /cbcb/sw/RedHat-7-x86_64/common/local/Rext/README.md)

Contact

Brought to you by:

See Also