#!/bin/bash -l #$ -P my_project # Specify hard time limit for the job. # The job will be aborted if it runs longer than this time. # The default time is 12 hours #$ -l h_rt=24:00:00 #$ -pe omp 8 ##$ -l mem_per_core=8G # Send an email when the job finishes or if it is aborted (by default no email is sent). #$ -m ea # Give job a name #$ -N samtool_mergedbam # Combine output and error files into a single file #$ -j y # Specify the output file name #$ -o sam_merge.qlog # Keep track of information related to the current job #source ../G173_RNA/Scripts/00_Setup_Pipeline/01_Pipeline_Setup.sh #OUTPUT_DIR='/restricted/projectnb/waxmanlab/tingyac/G170_173/' #OUTPUT_DIR='/net/waxman-server/mnt/data/waxmanlabvm_home/kkarri/tingyac/G170_G173/' cd $OUTPUT_DIR echo "Hello" source ~/.bashrc module load samtools/1.10 module load bedtools/2.27.1 echo "==========================================================" echo "Start date : $(date)" echo "Job name : $JOB_NAME" echo "Job ID : $JOB_ID" "$SGE_TASK_ID" echo "==========================================================" samtools sort -T /tmp/ -o merged_sorted.bam merged_dual.bam cp merged_sorted.bam . ##samtools sort merged_dual.bam 'merged_sorted' #samtools index -bc merged_sorted.bam >merged_sorted.bam.bai