#!/bin/bash
#PBS -l ncpus=16
#PBS -l walltime=00:30:00
#PBS -j oe
#PBS -q batch
#PBS -N trinity_stage1
#
# Define the directory where the input data is
DATADIR=/usr/local/packages/trinity/r2012-10-05/sample_data/test_Trinity_Assembly
#
# Define the directory where the job will run
OUTDIR=$SCRATCH/trinity_stage_example
#
# Start the accounting report
ja
#
# Turn echo on so all commands are echoed in the output log
set -x
#
# Setup the module command
source /usr/share/modules/init/bash
#
# Load the needed modules
# Here trinity version r2012-10-05 is used
# Java is also used
module load trinity/r2012-10-05
module load java
#
# Create the directory to run the job in if it doesn't already exist
mkdir -p $OUTDIR
#
# Move to the job directory
cd $OUTDIR
#
# Copy input data to job directory
cp $DATADIR/reads.*.fq.gz .
#######################################################
## Run Trinity to Generate Transcriptome Assemblies ##
## Stop before chrysalis ##
#######################################################
Trinity.pl --JM 8G --CPU 16 --bflyCPU 16 --bflyGCThreads 16 \
--seqType fq --SS_lib_type RF \
--left reads.left.fq.gz --right reads.right.fq.gz \
--output trinity_out_dir \
--no_run_chrysalis >& trinity_stage1_example.log
##################
#### Done. ####
##################
#
# Get accounting report
ja -o | gawk '$3 > 10.0 {print}'
ja -set