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

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

#### Jobname
#$ -N MARKD

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

#### Resubmit
#$ -r y


for files in /data/projects/2018/IBD/ATAC_BCG/03_BOWTIE/*_sorted_rmChrM.bam ;
do
java -jar /usr/local/bioinf/picard/picard-tools-2.22.4/picard.jar MarkDuplicates I=$files O=${files%_sorted_rmChrM.bam}_sorted_rmChrM_marked_duplicates.bam  M=${files%_sorted_rmChrM.bam}_sorted_rmChrM_marked_dup_metrics.txt
done
