nservant / HiC-Pro

HiC-Pro: An optimized and flexible pipeline for Hi-C data processing
Other
372 stars 181 forks source link

how to generate UCSC hic? #548

Closed gaofan83 closed 1 year ago

gaofan83 commented 1 year ago

Thank you for developing HiC-Pro. My colleague has a lot of ChIP-seq and other epigenomic tracks hosted by UCSC genome browser and would love to add HiC-Pro results to the portal. Not sure why hicpro2juicebox.sh generated hic file not recognized by UCSC browser. Suggestions are appreciated.

gaofan83 commented 1 year ago

Based on google search, finally came up with the following method to generate UCSC hic track:

hicConvertFormat -m matrix_cool/WT1_DN2_5000.cool -o matrix_cool/WT1_DN2_ginteractions \
                --inputFormat cool --outputFormat ginteractions
awk -F "\t" '{print 0, $1, $2, 0, 0, $4, $5, 1, $7}' matrix_cool/WT1_DN2_ginteractions.tsv > matrix_cool/WT1_DN2_ginteractions.tsv.short
sort -k2,2d -k6,6d matrix_cool/WT1_DN2_ginteractions.tsv.short > matrix_cool/WT1_DN2_ginteractions.tsv.short.sorted
~/software/juicer-1.6/scripts/common/juicer_tools pre -r 10000,20000,50000,100000,250000,500000,1000000 \
 matrix_cool/WT1_DN2_ginteractions.tsv.short.sorted WT1_DN2.hic chrom_mm10.sizes