BioMAJ2Galaxy1 is a module that has been designed to integrate the databases managed by BioMAJ into a Galaxy server (github page). With this python module you can perform the following actions on a Galaxy server:

  • Add new items to data libraries
  • Remove items from data libraries
  • Add new items to tool data tables using data managers
  • Remove items from tool data tables

These scripts are primarily designed to be used as BioMAJ post processes, but they can probably used directly from the command line if you need to.


In most cases, you can install it easily with:

$ pip install biomaj2galaxy

# On first use you'll need to create a config file to connect to the Galaxy server, just run:
$ biomaj2galaxy init
Welcome to BioMAJ2Galaxy
url: http://localhost/
apikey: your-api-key

You need an API key to access your galaxy server. You need to use one from an admin account.

allow_library_path_paste should be set in config/galaxy.yml (or config/galaxy.ini for older versions)

Finally, if you want to add or remove items from tool data tables, you will need to install two data managers from the ToolShed:

  • data_manager_manual by the user iuc
  • data_manager_fetch_genome_dbkeys_all_fasta by the user devteam


To see how to use each script (not necessarily from BioMAJ), just launch it with –help option.

The use of biomaj2galaxy can be done directly via the argument postprocess.args (you do not need to use a script). Here is an example post-process and remove process configuration for BioMAJ, using data manager:
galaxy_dm.desc=Add files to Galaxy tool data tables
galaxy_dm.args=add -d "${localrelease}" -g fasta/all.fa bowtie2:bowtie2/all "blastdb:blast/Homo_sapiens-proteins:Homo sapiens proteins"

rm_galaxy_dm.desc=Remove from Galaxy tool data tables
rm_galaxy_dm.args=rm "${}-${removedrelease}"

And the same using data libraries:
galaxy_dl.desc=Add files to Galaxy data libraries
galaxy_dl.args=add_lib -l "Homo sapiens genome (${remoterelease})" --lib-desc "Genome of Homo sapiens (version ${remoterelease}) downloaded from NCBI" -f "${localrelease}" --replace fasta/all.fa

rm_galaxy_dl.desc=Remove from Galaxy data libraries
rm_galaxy_dl.args=rm_lib -f "${}-${removedrelease}" "Homo sapiens genome (${remote.release})"

By default, relative file paths will be interpreted as relative to ${data.dir}/${dir.version}/${localrelease} if these envionment variables are set. This can be disabled by using the –no-biomaj-env option.


BioMAJ2Galaxy: automatic update of reference data in Galaxy using BioMAJ. Bretaudeau A, Monjeaud C, Le Bras Y, Legeai F, Collin O. Gigascience. 2015 May 9;4:22. doi: 10.1186/s13742-015-0063-8. eCollection 2015.