Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pgdurand/BeeDeeM
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxy committed Mar 1, 2021
2 parents cccd7ae + e9806cf commit 3c3e4eb
Show file tree
Hide file tree
Showing 62 changed files with 1,245 additions and 410 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ os:
- linux

jdk:
- oraclejdk8
- oraclejdk9

# BeeDeeM uses graphical layers from Java/Swing. So, to enable
# GUI app to run on Travis CI, we have to add these lines:
# (according to https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI)
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
#before_script:
# - "export DISPLAY=:99.0"
# - "sh -e /etc/init.d/xvfb start"
# - sleep 3 # give xvfb some time to start

script:
ant ut
ant makejar

after_script:
if [ -f /home/travis/build/pgdurand/BeeDeeM/distrib/tests-result/TEST-test.unit.AllTests.txt ]; then cat /home/travis/build/pgdurand/BeeDeeM/distrib/tests-result/TEST-test.unit.AllTests.txt; fi
Expand Down
44 changes: 41 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# *BeeDeeM*: the Bioinformatics Databank Manager System

[![License AGPL](https://img.shields.io/badge/license-Affero%20GPL%203.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0.txt) [![Build Status](https://travis-ci.org/pgdurand/BeeDeeM.svg?branch=master)](https://travis-ci.org/pgdurand/BeeDeeM) [![](https://tokei.rs/b1/github/pgdurand/BeeDeeM?category=code)](https://github.com/pgdurand/BeeDeeM) [![](https://img.shields.io/badge/platform-Java--1.7+-yellow.svg)](http://www.oracle.com/technetwork/java/javase/downloads/index.html) [![](https://img.shields.io/badge/run_on-Linux--Mac_OSX--Windows-yellowgreen.svg)]()
[![License AGPL](https://img.shields.io/badge/license-Affero%20GPL%203.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0.txt) [![Build Status](https://travis-ci.org/pgdurand/BeeDeeM.svg?branch=master)](https://travis-ci.org/pgdurand/BeeDeeM) [![](https://tokei.rs/b1/github/pgdurand/BeeDeeM?category=code)](https://github.com/pgdurand/BeeDeeM) [![](https://img.shields.io/badge/platform-Java--1.8+-yellow.svg)](http://www.oracle.com/technetwork/java/javase/downloads/index.html) [![](https://img.shields.io/badge/run_on-Linux--macOS--Windows-yellowgreen.svg)]()

*BeeDeeM* is a general purpose **B**ioinformatics **D**atabank **M**anager.

Expand Down Expand Up @@ -33,6 +33,44 @@ It provides a suite of command-line and UI softwares to install and use major se

[More](https://pgdurand.gitbooks.io/beedeem/).

### Use BeeDeeM from the command line

Here is an example of a script to start Genbank_CoreNucleotide installation on Ifremer's [DATARMOR supercomputer](https://www.top500.org/system/178981):

```
#!/usr/bin/env bash
#PBS -q web
#PBS -l mem=64gb
#PBS -l ncpus=8
#PBS -l walltime=72:00:00
# Release of BeeDeeM to use
BDM_HOME=$SOFT/bioinfo/beedeem
BDM_VER=latest
# Load BeeDeeM environment
module load java/1.8.0_121
# Configure BeeDeeM install tool
TASK_ARGS="-task download"
GLOBAL_ARGS="--ftp-delay 5000 --ftp-retry 3 --task-delay 1000"
MAILING_ARGS="--mail-smtp-host xxx --sender-mail yyy --recipient-mail zzz"
# prefix of '.dsc' file that must exist in $BDM_HOME/conf/descriptor
DESCRIPTOR="Genbank_CoreNucleotide"
export KL_LOG_FILE=${DESCRIPTOR}.log
$BDM_HOME/$BDM_VER/install.sh \
${TASK_ARGS} ${GLOBAL_ARGS} ${MAILING_ARGS} \
-desc ${DESCRIPTOR} \
>& "$HOME/beedeem/logs/${DESCRIPTOR}-pbs.out"
```

You can easily automate bank installation using such BeeDeeM based scripts with Unix cron scheduler.

### Use BeeDeeM UI

Here is a screenshot of BeeDeeM user friendly interface:

![UiManager](doc/dbms_ui.png)

## Practical use cases
Expand All @@ -57,7 +95,7 @@ Among others, these databanks can be used to:

## Requirements

Use a [Java Virtual Machine](http://www.oracle.com/technetwork/java/javase/downloads/index.html) 1.7 (or above) from Oracle.
Use a [Java Virtual Machine](http://www.oracle.com/technetwork/java/javase/downloads/index.html) 1.8 (or above) from Oracle.

*Not tested with any other JVM providers but Oracle... so there is no guarantee that the software will work as expected if not using Oracle's JVM.* [More](https://pgdurand.gitbooks.io/beedeem/) about *BeeDeeM* requirements.

Expand All @@ -73,4 +111,4 @@ Use a [Java Virtual Machine](http://www.oracle.com/technetwork/java/javase/downl
It depends on several thrid-party libraries as stated in the NOTICE.txt file provided with this project.

--
(c) 2007-2019 - Patrick G. Durand and Ludovic Antin
(c) 2007-2020 - Patrick G. Durand and Ludovic Antin
65 changes: 51 additions & 14 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@
<pathelement location="${distrib}/lib" />
</path>

<path id="class.path.test">
<fileset dir="${jar}" includes="junit*.jar" />
</path>

<taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath refid="class.path.test"/>
</taskdef>

<!-- ============================================================= -->
<target name="help">
<echo>This is the Ant's project file to manage BeeDeeM.</echo>
Expand All @@ -68,6 +77,9 @@
<echo> makejar: only compile and package beedem jar</echo>
<echo> makedistrib: prepare the full release file</echo>
<echo> ut: compile beedeem and run unit tests</echo>
<echo/>
<echo> Ant version: ${ant.version}</echo>
<echo> Java version: ${ant.java.version}</echo>
<echo />
</target>

Expand Down Expand Up @@ -101,6 +113,10 @@
<!-- ============================================================= -->
<!-- Prepare directory structure used to compile and package sof -->
<target name="prepare" depends="checkversion">
<echo/>
<echo> Ant version: ${ant.version}</echo>
<echo> Java version: ${ant.java.version}</echo>
<echo/>
<!-- Prepare the distrib directory tree -->
<delete dir="${distrib}" />
<mkdir dir="${Dsrc}" />
Expand All @@ -112,6 +128,37 @@
<mkdir dir="${Dexternal}" />
</target>

<!-- ============================================================= -->
<target name="is-java-eight">
<condition property="java.eight">
<equals arg1="${ant.java.version}" arg2="1.8"/>
</condition>
</target>

<target name="javac8" depends="is-java-eight" if="java.eight">
<javac srcdir="${Dsrc}"
destdir="${Dlib}"
classpathref="class.path"
debug="${distribClass.path}"
optimize="${compile.optimize}"
deprecation="${compile.deprecation}"
>
</javac>
</target>

<!-- added for TravisCI -->
<target name="javac9" depends="is-java-eight" unless="java.eight">
<javac srcdir="${Dsrc}"
destdir="${Dlib}"
classpathref="distribClass.path"
debug="${compile.debug}"
optimize="${compile.optimize}"
deprecation="${compile.deprecation}"
>
<compilerarg line="--add-modules java.se.ee"/>
</javac>
</target>

<!-- ============================================================= -->
<!-- Compile code and make software Jar -->
<target name="makejar" depends="prepare">
Expand Down Expand Up @@ -146,13 +193,8 @@
</fileset>
</copy>
<!-- Compile source code ready for distribution-->
<javac srcdir="${Dsrc}"
destdir="${Dlib}"
classpathref="distribClass.path"
debug="${compile.debug}"
optimize="${compile.optimize}"
deprecation="${compile.deprecation}">
</javac>
<antcall target="javac8"/>
<antcall target="javac9"/>
<copy todir="${Dlib}">
<fileset dir="${src}">
<include name="**/*.png" />
Expand Down Expand Up @@ -308,13 +350,8 @@
<fileset dir="${src}" />
</copy>
<!-- Compile source code ready for distribution-->
<javac srcdir="${Dsrc}"
destdir="${Dlib}"
classpathref="distribClass.path"
debug="on"
optimize="off"
deprecation="off">
</javac>
<antcall target="javac8"/>
<antcall target="javac9"/>
<!-- Copy resource files -->
<copy todir="${Dlib}">
<fileset dir="${src}">
Expand Down
4 changes: 2 additions & 2 deletions conf/dbms.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# KDMS main configuration file

# Path where to install/manage local copies of databanks
mirror.path = /biobanks
mirror.path = /tmp/biobanks

# Path where to prepare local installation of databanks
# before copying them in mirror.path during install in production task
#mirrorprepa.path = /biobanks/tmp
#mirrorprepa.path = /tmp/biobanks/tmp

# File storing the list of available databanks
mirror.file = dbmirror.config
Expand Down
25 changes: 25 additions & 0 deletions conf/descriptors/NCBI_nr-tax_v4.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
db.name=NCBI_nr
db.desc=NCBI nr protein databank with taxonomy. Protein sequences from GenBank CDS translations, PDB, Swiss-Prot, PIR, and PRF.
db.type=p
db.ldir=${mirrordir}|p|NCBI_nr

db.files.include=^nr_v4.*\\d+\\.tar.gz$
db.files.exclude=

tasks.unit.post=gunzip,untar
tasks.global.post=delgz,deltar,makealias

ftp.server=ftp.ncbi.nih.gov
ftp.port=21
ftp.uname=anonymous
[email protected]
ftp.rdir=/blast/db/v4
ftp.rdir.exclude=

history=0

aspera.use=true
[email protected]
aspera.args=-k 1 -T -l 640M


7 changes: 3 additions & 4 deletions conf/descriptors/NCBI_nt-tax.dsc
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
db.name=NCBI_nt-tax
db.desc=NCBI nt databank. Nucleotide sequences from several sources, including GenBank, RefSeq, TPA and PDB. Not non-redundant.
db.desc=NCBI nt databank with taxonomy. Blast v4 bank format. Nucleotide sequences from several sources, including GenBank, RefSeq, TPA and PDB. Not non-redundant.
db.type=n
db.ldir=${mirrordir}|n|NCBI_nt-tax

#db.files.include=^nt.*\\d+\\.tar.gz$
db.files.include=nt.00.tar.gz,nt.01.tar.gz
db.files.include=^nt_v4.*\\d+\\.tar.gz$
db.files.exclude=

tasks.unit.post=gunzip,untar
tasks.global.post=makealias
tasks.global.post=delgz,deltar,makealias

ftp.server=ftp.ncbi.nih.gov
ftp.port=21
Expand Down
2 changes: 1 addition & 1 deletion conf/descriptors/PDB_proteins.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ db.ldir=${mirrordir}|p|PDB_proteins
ftp.rdir.exclude=
ftp.rdir=/blast/db/FASTA/
history=0
db.desc=PDB Protein databank\: sequences from 3D protein structures (no annotations).
db.desc=PDB Protein databank (no taxonomy).
db.files.exclude=
db.type=p
29 changes: 29 additions & 0 deletions conf/descriptors/PDB_proteins_task.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#PDB_proteins
#Fri Sep 15 13:47:28 CEST 2017

db.name=PDB_proteins
db.desc=PDB Protein databank; illustrate use of external script call
db.type=p
db.ldir=${mirrordir}|p|PDB_proteins

db.files.include=pdbaa_v4.tar.gz
db.files.exclude=

tasks.global.post=makealias,delgz,deltar,script(name=HelloWorld;path=hello_world.sh)
tasks.unit.post=gunzip,untar,script(name=HelloWorld;path=hello_world.sh)

ftp.uname=anonymous
[email protected]
ftp.server=ftp.ncbi.nih.gov
ftp.port=21
ftp.rdir=/blast/db/v4
ftp.rdir.exclude=

depends=

history=0

aspera.use=true
[email protected]
aspera.args=-k 1 -T -l 640M

29 changes: 29 additions & 0 deletions conf/descriptors/PDB_proteins_v4.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#PDB_proteins
#Fri Sep 15 13:47:28 CEST 2017

db.name=PDB_proteins
db.desc=PDB Protein databank (Blast v4 db format)
db.type=p
db.ldir=${mirrordir}|p|PDB_proteins

db.files.include=pdbaa_v4.tar.gz
db.files.exclude=

tasks.global.post=makealias,delgz,deltar
tasks.unit.post=gunzip,untar

ftp.uname=anonymous
[email protected]
ftp.server=ftp.ncbi.nih.gov
ftp.port=21
ftp.rdir=/blast/db/v4
ftp.rdir.exclude=

depends=

history=0

aspera.use=true
[email protected]
aspera.args=-k 1 -T -l 640M

20 changes: 20 additions & 0 deletions conf/descriptors/Pfam-hmm.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
db.name=Pfam-hmm
db.desc=Large collection of protein families, each represented by multiple sequence alignments and hidden Markov models (HMMs)
db.type=d
db.ldir=${mirrordir}|d|Pfam-hmm

db.files.include=Pfam-A.hmm.gz
db.files.exclude=

tasks.unit.post=gunzip
# by default, post-process script is located in ../scripts path
tasks.global.post=delgz,script(name=hmmpress;path=pfam-hmm.sh)

ftp.server=ftp.ebi.ac.uk
ftp.port=21
ftp.uname=anonymous
[email protected]
ftp.rdir=/pub/databases/Pfam/current_release
ftp.rdir.exclude=

history=0
20 changes: 20 additions & 0 deletions conf/scripts/hello_world.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# This is a BeeDeeM external task script template.
#
# This script illustrates the use of external tasks.
# Such a task is called from a bank descriptor; e.g. see
# for instance ../descriptors/PDB_proteins_task.dsc
#
# Such a BeeDeeM script is called by the task engine and
# with up to two arguments: -d <path> -f <path>
#
# -d <path>: <path> is the bank installation path.
# provided for both unit and global tasks.
# -f <path>: <path> is the path to file under unit task processing
# only provided with unit task.

echo "Executing an external script"
echo "Arguments coming from BeeDeeM are:"
echo $@

Loading

0 comments on commit 3c3e4eb

Please sign in to comment.