Dear all,
Just wanted to share the solution for the above problem, in case any one run into same trouble:
1) I sorted the individual merged_30.txt file (-k2,2d -k6,6d -k3,3n -k7,7n) as described in the previous post
2) Then merged the sorted files
sort --parallel=40 -T ${tmpdir} -m -k2,2d -k6,6d -k3,3n -k7,7n ${merged_names30} > ${outputdir}/merged30.txt
3) Run pre on individual merged file
java -Xmx10000m -jar ./juicer_tools.2.20.00.jar pre -g ./inter_30_hists.m -q 30 -r 2500000,1000000,500000,250000,100000,50000,25000,10000,5000,2000,1000 -f ./juicer-main/restriction_sites/hg38_Arima.txt -k VC,VC_SQRT,KR --threads 10 ./merged30.txt test.hic hg38.chrom.sizes
Now, I am able to generate the merged .hic files without error.
Still not able to solve the issue with mega.sh
Best,
Saumya