deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
223 stars 68 forks source link

Question about sorting bam files #879

Closed Naveen-Ahuja closed 3 months ago

Naveen-Ahuja commented 8 months ago

Hello,

I was wondering if the aligned bam file from bwa needs to be sorted or can we directly input it into hicBuildMatrix.

Thank you

joachimwolff commented 8 months ago

As written in our documentation, do not sort the BAM files: https://hicexplorer.readthedocs.io/en/latest/content/example_usage.html#reads-mapping

Naveen-Ahuja commented 8 months ago

Thank you very much for the reply. If you don't mind me asking what's the reasoning behind using unsorted bam files to build the matrix

joachimwolff commented 8 months ago

The order of the reads gives the association which forward and reverse read belong together. A sorting by genomic position would destroy this.

Naveen-Ahuja commented 7 months ago

Hi,

I hope you don't mind me asking an unrelated question from this thread but looking at the hicinfo of my files it includes alternate contigs (mapped with hg38). What is the standard way of approaching these? If I remove these the using hicadjustmatrix the total non zero elements in the matrix drops.

I have attached images of Screenshot 2023-12-01 at 6 12 46 PM Screenshot 2023-12-01 at 6 13 01 PM before and after removing the alternate contigs of hg38, would like to know your input, should I remove them when performing ICE correction?

Lastly, I was wondering if there are big differences in using bwa mem -A1 -B4 -E50 -L0 vs bwa mem -SP5M would these give the same results or is one better than the other.

Thank you