Jobscript
Sample Installation Test Script:
#!/bin/bash
#SBATCH --job-name=metabcc_lr_test
#SBATCH --mail-type=NONE
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --time=24:00:00
#SBATCH --output=metabcc_lr_test.log
echo "Setting up test environment..."
TEST_PWD=/data/apps/tests/metabcc_lr/2.0.0
TEST_DATADIR=${TEST_PWD}/example_data
TEST_WORKDIR=${TEST_PWD}/test_output
cd ${TEST_PWD}
module load metabcc_lr/2.0.0
# Remove any previous test results and re-create a working directory
if [ -d ${TEST_WORKDIR} ]; then rm -rf ${TEST_WORKDIR}/; fi
mkdir ${TEST_WORKDIR}
echo "Starting test run at $(date) on $(hostname)..."
# Based on https://github.com/anuradhawick/MetaBCC-LR#test-run-data
###################################
mbcclr \
-r ${TEST_DATADIR}/reads.fasta \
-g ${TEST_DATADIR}/ids.txt \
-o ${TEST_WORKDIR} \
-e umap \
-c 25000 \
-bs 10 \
-bc 10 \
-k 4 \
-t ${SLURM_JOB_CPUS_PER_NODE:-4}
reads2bins.py \
--reads ${TEST_DATADIR}/reads.fasta \
--bins ${TEST_WORKDIR}/final.txt \
--output ${TEST_WORKDIR}/final_bins
###################################
# There should be some binned fasta files in the work directory
echo "There should be some results listed below:"
find ${TEST_WORKDIR}/final_bins -name '*.fasta' -type f ! -empty -ls
echo "Test complete at $(date)."