Skip to content

Instantly share code, notes, and snippets.

@willtownes
Created March 6, 2015 20:43
Show Gist options
  • Save willtownes/6be6f1c0de75d1bbdf81 to your computer and use it in GitHub Desktop.
Save willtownes/6be6f1c0de75d1bbdf81 to your computer and use it in GitHub Desktop.
master shell script to run multiple RNA-seq samples simultaneously, each on a separate node
#!/bin/bash
LOGFILE="master_job_ids.log"
echo "======Starting new analysis run========" >> $LOGFILE
names=( SRR1592185 SRR1592187 SRR1592189 SRR1592186 SRR1592188 SRR1592190 )
for ((i=0; i<${#names[@]} ; i++)) do
echo "Running Batch Job for ${names[i]}. SLURM Job ID shown below:" >> $LOGFILE
#make results directory
mkdir -p ${names[i]}_results
cd ${names[i]}_results
sbatch -J ${names[i]} ../rnaseq_cmd.sh ${names[i]} >> ../${LOGFILE}
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment