#!/bin/bash

for name in A1 A2 C1 C2; do
echo merging 
for file in /storage3/estsoi/condensin_degron/*${name}/aligned/merged_nodups.txt; do
	cat ${file} >> /storage3/estsoi/condensin_degron_hic/merged/${name}_merged_nodups.txt
done
sort --parallel=40 -T /storage3/estsoi/condensin_degron_hic/merged/tmp -m -k2,2d -k6,6d /storage3/estsoi/condensin_degron_hic/merged/${name}_merged_nodups.txt
done
