Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The file is an example of the command lines used to run Trinity and PASA, at the time of the original work (“LincRNAs landscape in human lymphocytes highlights modulation of T cell differentiation by linc-MAF-4” by Ranzani V. et al.) Recently Trinity and PASA were updated, the current command lines and options can differ.
#!/bin/bash
# Copyright (C) 2015 INGM
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
BAM_NAME=$1
JOB_NAME=$2
FASTAREFERENCE=$3
FASTAREFERENCENAME=`basename ${FASTAREFERENCE}`
HOSTDB=$4
TRINITYTMPDIR=$5
CPUS=$6
NODE=1
qsub -N $JOB_NAME -j eo -v NODE=$NODE,BAM_NAME=$BAM_NAME,JOB_NAME=$JOB_NAME,FASTAREFERENCE=$FASTAREFERENCE,FASTAREFERENCENAME=$FASTAREFERENCENAME,HOSTDB=$HOSTDB,TRINITYTMPDIR=$TRINITYTMPDIR,CPUS=$CPUS <<EOS
#!/bin/bash
#PBS -l nodes=$NODE:ppn=${CPUS}
#PBS -S /bin/bash
if [[ -z \$TMPDIR || ! -d \$TMPDIR ]]; then
TMPDIR=\`mktemp -d --tmpdir=${TRINITYTMPDIR} --suffix=\$JOB_NAME\`
fi
ORGDIR=\`pwd\`
cd \$TMPDIR
SAM_NAME=\`basename \${BAM_NAME}\`.sam
samtools view -h -o \$SAM_NAME \$BAM_NAME
/opt/trinityrnaseq/util/prep_rnaseq_alignments_for_genome_assisted_assembly.pl --coord_sorted_SAM \$SAM_NAME -I 589824 —jaccard_clip
find Dir_* -name "*reads" > read_files.list
/opt/trinityrnaseq/util/GG_write_trinity_cmds.pl --reads_list_file read_files.list --paired > trinity_GG.cmds
/opt/trinityrnaseq/Inchworm/bin/ParaFly -c trinity_GG.cmds -CPU ${CPUS} -failed_cmds trinity_GG.cmds.failed -v
find Dir_* -name "*inity.fasta" -exec cat {} + | /opt/trinityrnaseq/util/inchworm_accession_incrementer.pl > Trinity_GG.fasta
cp ${FASTAREFERENCE} .
generate_alignAssembly_config.sh \$TMPDIR \$JOB_NAME
/opt/PASA/scripts/Launch_PASA_pipeline.pl -c alignAssembly.config -C -R -g ${FASTAREFERENCENAME} -t Trinity_GG.fasta --MAX_INTRON_LENGTH 589824
mysqldump --host=${HOSTDB} -upasamaster -ppasamaster \$JOB_NAME > \${JOB_NAME}.sql
cd ..
EOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment