HELP - how to execute mothur on sun grid engine?

I’ve been working with mothur for a few weeks now (awesome program, btw) on a cluster - but I’m only able to access 8 processors currently since I’m not actually using qsub to submit the job. I’ve tried a few simple scripts to execute a batch but they all seem to fail. Has anyone successfully run mothur on a Sun grid engine in parallel mode? And if you have, would you be willing to share some scripting examples? :slight_smile:

Here’s the PBS script that I use (it is a bit of a handme down…)

#!/bin/sh
#PBS -l nodes=1:ppn=8
#PBS -l mem=10gb
#PBS -l walltime=500:00:00
#PBS -j oe
#PBS -m abe
#PBS -V
#PBS -M youremail@address.com
#PBS -q first

echo "ncpus-2.pbs"
cat $PBS_NODEFILE
qstat -f $PBS_JOBID

cd $PBS_O_WORKDIR

NCPUS=`wc -l $PBS_NODEFILE | awk '{print $1}'`

mothur "#classify.seqs(fasta=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.fasta, count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.count_table, reference=trainset9_032012.pds.fasta, taxonomy=trainset9_032012.pds.tax, cutoff=80, processors=8)"

echo "qsub working directory absolute is"
echo $PBS_O_WORKDIR
exit

This works on our cluster, but I’m not sure how it will work on yours. You would change the mothur line to run you commands.