IMPUTE5 Job Scripts

From UFRC
Jump to navigation Jump to search

Return to the IMPUTE5 main page

Example of script used to test application installation

#!/bin/bash
#SBATCH --job-name=impute5_test
#SBATCH --mail-type=NONE
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --time=24:00:00
#SBATCH --output=impute5_test.log

echo "Setting up test environment..."
TEST_PWD=/data/apps/tests/impute5
TEST_SAMPLEDIR=${TEST_PWD}/example_data
TEST_WORKDIR=${TEST_PWD}/test_output

cd ${TEST_PWD}
module load impute5

# 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)..."

###################################
# Chunking:
# imp5Chunker \
#     --h ${TEST_SAMPLEDIR}/reference.vcf.gz \
#     --g ${TEST_SAMPLEDIR}/target.vcf.gz \
#     --r 20 \
#     --o ${TEST_WORKDIR}/coordinates.txt

# Convertor
imp5Converter \
    --h ${TEST_SAMPLEDIR}/reference.imp5 \
    --r 20 \
    --o ${TEST_WORKDIR}/reference.vcf.gz \
    --threads ${SLURM_CPUS_PER_TASK:-1}

#IMPUTE5
impute5 \
    --h ${TEST_SAMPLEDIR}/reference.bcf \
    --g ${TEST_SAMPLEDIR}/target.bcf \
    --m ${TEST_SAMPLEDIR}/chr20.b37.gmap.gz \
    --r 20:2000000-7000000 \
    --o ${TEST_WORKDIR}/imputed.vcf.gz \
    --threads ${SLURM_CPUS_PER_TASK:-1}

###################################

# There should be some files in the work directory
echo "There should be some results listed below:"
find ${TEST_WORKDIR} -type f ! -empty -ls

echo "Test complete at $(date)."