#!/bin/bash
#
#SBATCH --output=/home/jvierstra/proj/footprinting.2019/processed/h.f.heart.left.atrium-DS37460/logs/%A.%a.out
#SBATCH --mem=8G
#SBATCH --cpus-per-task=4
#SBATCH --partition=queue1

set -e -o pipefail

INPUT_FILES=(`cat /home/jvierstra/proj/footprinting.2019/processed/h.f.heart.left.atrium-DS37460/slurm.compute_deviation_chunk.params | head -n ${SLURM_ARRAY_TASK_ID} | tail -n 1`)

ftd-compute-deviation 	--bm /home/jvierstra/proj/dnase-perspective/cleavage_model/vierstra_et_al.txt --half-win-width 5 	--smooth-half-win-width 50 --smooth-clip 0.01 	--dm /home/jvierstra/proj/footprinting.2019/processed/h.f.heart.left.atrium-DS37460/dm.json --fdr-shuffle-n 50 	--processors ${SLURM_CPUS_PER_TASK} 	/net/seq/data/aggregations/LN31530/aggregation-6213/LN31530.GRCh38_no_alts.sorted.bam /net/seq/data/genomes/human/GRCh38/noalts/GRCh38_no_alts.fa ${INPUT_FILES[0]} | sort --buffer-size=6G -k1,1 -k2,2n > ${INPUT_FILES[0]}.out
