#!/bin/bash
#
#SBATCH --output=/home/jvierstra/proj/footprinting.2019/processed/CD19+-DS17186/motif.per-nt/logs/%J.out
#SBATCH --mem=8G
#SBATCH --cpus-per-task=1

set -o pipefail

ARGS=(`cat /home/jvierstra/proj/footprinting.2019/processed/CD19+-DS17186/motif.per-nt/slurm.motif.params`)
INPUT_FILES=(${ARGS[@]/#//home/jvierstra/proj/footprinting.2019/processed/CD19+-DS17186/motif.per-nt/motif.})

sort -k1,1g -m ${INPUT_FILES[@]} > /home/jvierstra/proj/footprinting.2019/processed/CD19+-DS17186/motif.per-nt/motif.all.txt

rm -f ${INPUT_FILES[@]}
