I am out of memory to perform all steps individually, therefore I was thinking or doing something like this:
cat r_T_H_17.bed r_T_H_stim.bed r_T_mem.bed r_T_naive.bed r_T_reg.bed | sort -k1,1 -k2,2n -k3,3n | bgzip > all_r.bed.gz
all files are min 12 and max 23 GB, I am intended to run it on a cluster. Does it mean I will have to sum sizes of all files to estimate the memory consumption?