Skip to content

Commit

Permalink
Added version 2.7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
icaoberg committed May 30, 2024
1 parent abadf1e commit 5e2ed4f
Show file tree
Hide file tree
Showing 14 changed files with 354 additions and 0 deletions.
26 changes: 26 additions & 0 deletions 2.7.6/Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Bootstrap: docker
From: ubuntu:20.04

%labels
AUTHOR icaoberg
EMAIL [email protected]
SUPPORT [email protected]
REPOSITORY http://gitub.com/pscedu/singularity-beast2
COPYRIGHT Copyright © 2024 Pittsburgh Supercomputing Center. All Rights Reserved.
VERSION 2.7.6

%files
BEAST.v2.7.6.Linux.x86.tgz /opt/

%environment
export PATH=$PATH:/opt/beast/bin

%post
apt update
apt install -y default-jdk
apt install -y libxext6 libxrender1 libxtst6 libxi6
cd /opt
tar -xvf BEAST.v2.7.6.Linux.x86.tgz && rm -fv BEAST.v2.7.6.Linux.x86.tgz

%runscript
/opt/beast/bin/applauncher
26 changes: 26 additions & 0 deletions 2.7.6/applauncher
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=2.7.6
PACKAGE=BEAST2
TOOL=applauncher
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /local)

OPTIONS=""
for STORAGE in ""
do
if [ -d "" ]; then
OPTIONS=" -B "
fi
done

if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=" -B /hive"
fi

if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=" -B /bil"
fi

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
26 changes: 26 additions & 0 deletions 2.7.6/beast
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=2.7.6
PACKAGE=BEAST2
TOOL=beast
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /local)

OPTIONS=""
for STORAGE in ""
do
if [ -d "" ]; then
OPTIONS=" -B "
fi
done

if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=" -B /hive"
fi

if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=" -B /bil"
fi

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
26 changes: 26 additions & 0 deletions 2.7.6/beauti
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=2.7.6
PACKAGE=BEAST2
TOOL=beauti
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /local)

OPTIONS=""
for STORAGE in ""
do
if [ -d "" ]; then
OPTIONS=" -B "
fi
done

if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=" -B /hive"
fi

if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=" -B /bil"
fi

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
16 changes: 16 additions & 0 deletions 2.7.6/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

IMAGE=singularity-BEAST2-2.7.6.sif
DEFINITION=Singularity

if [ -f $IMAGE ]; then
rm -fv $IMAGE
fi

sudo singularity build $IMAGE $DEFINITION

if [ -f $IMAGE ]; then
exit 0
else
exit 1
fi
26 changes: 26 additions & 0 deletions 2.7.6/densitree
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=2.7.6
PACKAGE=BEAST2
TOOL=densitree
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /local)

OPTIONS=""
for STORAGE in ""
do
if [ -d "" ]; then
OPTIONS=" -B "
fi
done

if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=" -B /hive"
fi

if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=" -B /bil"
fi

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
42 changes: 42 additions & 0 deletions 2.7.6/generate_binaries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

TOOLS=(applauncher beast beauti densitree loganalyser logcombiner packagemanager treeannotator)

cat << EOF > template
#!/bin/bash
VERSION=2.7.6
PACKAGE=BEAST2
TOOL=TOOL_NAME
DIRECTORY=\$(dirname \$0)
STORAGES=(/ocean /local)
OPTIONS=""
for STORAGE in "${STORAGES[@]}"
do
if [ -d "$STORAGE" ]; then
OPTIONS=$OPTIONS" -B $STORAGE"
fi
done
if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=$OPTIONS" -B /hive"
fi
if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=$OPTIONS" -B /bil"
fi
singularity exec \$OPTIONS \$DIRECTORY/singularity-\$PACKAGE-\$VERSION.sif \$TOOL "\$@"
EOF

for TOOL in "${TOOLS[@]}"
do
echo "* "$TOOL
cp template $TOOL
sed -i "s/TOOL_NAME/$TOOL/g" $TOOL
chmod +x $TOOL
done

rm -f template
26 changes: 26 additions & 0 deletions 2.7.6/loganalyser
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=2.7.6
PACKAGE=BEAST2
TOOL=loganalyser
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /local)

OPTIONS=""
for STORAGE in ""
do
if [ -d "" ]; then
OPTIONS=" -B "
fi
done

if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=" -B /hive"
fi

if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=" -B /bil"
fi

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
26 changes: 26 additions & 0 deletions 2.7.6/logcombiner
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=2.7.6
PACKAGE=BEAST2
TOOL=logcombiner
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /local)

OPTIONS=""
for STORAGE in ""
do
if [ -d "" ]; then
OPTIONS=" -B "
fi
done

if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=" -B /hive"
fi

if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=" -B /bil"
fi

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
41 changes: 41 additions & 0 deletions 2.7.6/modulefile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--
-- BEAST2 2.7.6 modulefile
--
-- "URL: https://www.psc.edu/resources/software"
-- "Category: Utilities"
-- "Description: BEAST 2 is a cross-platform program for Bayesian phylogenetic analysis of molecular sequences."
-- "Keywords: singularity bioinformatics"

whatis("Name: BEAST2-cli")
whatis("Version: 2.7.6")
whatis("Category: Utilities")
whatis("URL: https://www.psc.edu/resources/software")
whatis("Description: BEAST 2 is a cross-platform program for Bayesian phylogenetic analysis of molecular sequences..")
whatis("Keywords: singularity utilities")

help([[
BEAST 2 is a cross-platform program for Bayesian phylogenetic analysis of molecular sequences.
To load the module, type
> module load BEAST2/2.7.6
To unload the module, type
> module unload BEAST2/2.7.6
Tools included in this module are
* beast
* beauti
* densitree
* loganalyser
* logcombiner
* packagemanager
* treeannotator
]])

local package = "BEAST2"
local version = "2.7.6"
local base = pathJoin("/opt/packages",package,version)
prepend_path("PATH", base)
26 changes: 26 additions & 0 deletions 2.7.6/packagemanager
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=2.7.6
PACKAGE=BEAST2
TOOL=packagemanager
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /local)

OPTIONS=""
for STORAGE in ""
do
if [ -d "" ]; then
OPTIONS=" -B "
fi
done

if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=" -B /hive"
fi

if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=" -B /bil"
fi

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
16 changes: 16 additions & 0 deletions 2.7.6/rbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

IMAGE=singularity-BEAST2-2.7.6.sif
DEFINITION=Singularity

if [ -f $IMAGE ]; then
rm -fv $IMAGE
fi

singularity build --remote $IMAGE $DEFINITION

if [ -f $IMAGE ]; then
exit 0
else
exit 1
fi
5 changes: 5 additions & 0 deletions 2.7.6/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -x

tree .
26 changes: 26 additions & 0 deletions 2.7.6/treeannotator
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=2.7.6
PACKAGE=BEAST2
TOOL=treeannotator
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /local)

OPTIONS=""
for STORAGE in ""
do
if [ -d "" ]; then
OPTIONS=" -B "
fi
done

if id | grep -q hubmap && [ -d "/hive" ]; then
OPTIONS=" -B /hive"
fi

if id | grep -q bil && [ -d "/bil" ]; then
OPTIONS=" -B /bil"
fi

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"

0 comments on commit 5e2ed4f

Please sign in to comment.