#!/bin/sh
#$ -S /bin/sh

#$ -pe smp 24
#$ -cwd
#$ -V

#### Jobname
#$ -N REMD

#### Error Outputfile
#$ -e REMMU.log
#$ -o REMMU.err

#### Resubmit
#$ -r y


for files in /data/projects/2018/IBD/ATAC_BCG/03_BOWTIE/*_sorted_rmChrM_rmdupl.bam ;
do
samtools view -@ 24 -h -q 30 $files -o ${files%_sorted_rmChrM_rmdupl.bam}_sorted_rmChrM_rmdupl_rmmulti.bam
done
