#!/bin/bash
#PBS -q queue_name
#PBS -l walltime=168:00:00,nodes=1,flags=allprocs
#PBS -N wtdbg2.5
#PBS -j oe

raw=/path/to/raw/pacbio/reads
out=/path/to/assembly/output/directory
name=assembly_wtdbg2

# Assemble with wtdbg2
wtdbg2 \
    -x sq \
    -g 1.1g \
    -i ${raw}/downsampled_pacbio_reads.fq.gz \
    -t 24 -f \
    -o ${out}/${name}

# Derive consensus
wtpoa-cns \
    -t 24 \
    -f \
    -i ${out}/${name}.ctg.lay.gz \
    -o ${out}/${name}.ctg.fa
