#!/bin/sh ############ SGE CONFIGURATION ################### # Write errors in the standard output file #$ -j y # Shell to use #$ -S /bin/bash #$ -b Y # Mail to follow the exection of the job #$ -M firstname.name@ird.fr ######### change with your own email address # Type of message to receive # - (b) begining of the job # - (e) end of the job # - (a) in case of abortion #$ -m bea # Queue to use #$ -q bioinfo.q # To use serveral cores until 2 #$ -pe ompi 2 # Name of the job #$ -N test_bwa_tando ############################################################ ### change the following values with yours path_to_dir="/data/projects/tp-cluster/training_2018/bwa"; path_to_tmp="/scratch/tando_$JOB_ID"; path_to_dest="/home/tando"; ################ load bwa 0.7.12 anvironment########"# module load bioinfo/bwa/0.7.12 ###### Creation of a temporary folder on the chosen node mkdir $path_to_tmp ####### Data copy to the /scratch of the node scp -r nas2:$path_to_dir $path_to_tmp # choose nas for /home, /data2 and /teams or nas2 for /data or nas3 pfor /data3 echo "tranfert donnees master -> noeud"; cd $path_to_tmp/bwa/; ###### Program execution cmd1="bwa index referenceIrigin.fasta"; echo "commande executee: $cmd1"; $cmd1; sleep 30 bwa mem referenceIrigin.fasta irigin1_1.fastq irigin1_2.fastq > mapping.sam ##### Data transfer from node to nas scp -rp $path_to_tmp/bwa/mapping.sam nas:$path_to_dest/; echo "Transfert donnees node -> master"; #### Deletion of the temporary folder in the /scratch of the node rm -rf $path_to_tmp; echo "Data deletion on node";