Jobscript
#!/bin/bash
#SBATCH --job-name=virsieve_test
#SBATCH --mail-type=NONE
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --time=24:00:00
#SBATCH --output=virsieve_test.log
TEST_PWD=/data/apps/tests/virsieve
TEST_SAMPLEDIR=${TEST_PWD}/sample_data
TEST_WORKDIR=${TEST_PWD}/virsieve_test
cd ${TEST_PWD}
module load virsieve
# Remove any previous test results, create a working directory, and copy
# initial test reads into the expected position in working directory
if [ -d ${TEST_WORKDIR} ]; then rm -rf ${TEST_WORKDIR}/; fi
mkdir -p ${TEST_WORKDIR}/rawFASTQ
cp ${TEST_SAMPLEDIR}/*.gz ${TEST_WORKDIR}/rawFASTQ
echo "Starting test run at $(date) on $(hostname)..."
# Run VirSieveAlign (rawFASTQ/ --> processedFASTQ/, mergedBAM/, rawBAM/)
VirSieveAlign ${TEST_WORKDIR}
# Run VirSieveIVar (mergedBAM/ --> primerTrimBAM/)
# export SINGULARITYENV_PRIMERBED=/path/to/mycustom.bed
VirSieveIVar ${TEST_WORKDIR}
# Run VirSieveGATK (primerTrimBAM/ --> filteredVCF/, alignmentArtifactFilteredVCF/, etc.)
VirSieveGATK ${TEST_WORKDIR}
# Run VirSieveVEP (filteredVCF/, alignmentArtifactFilteredVCF/ --> vepOutputs/, results/)
VirSieveVEP ${TEST_WORKDIR}
# There should be some files in the results/ directory
echo "There should be some results listed below:"
find ${TEST_WORKDIR}/results/ -type f ! -empty -ls
echo "Test complete at $(date)."