HiCExplorer icon indicating copy to clipboard operation
HiCExplorer copied to clipboard

Question about sorting bam files

Open Naveen-Ahuja opened this issue 1 year ago • 4 comments

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

Naveen-Ahuja avatar Nov 21 '23 03:11 Naveen-Ahuja

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

joachimwolff avatar Nov 21 '23 09:11 joachimwolff

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

Naveen-Ahuja avatar Nov 22 '23 04:11 Naveen-Ahuja

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

joachimwolff avatar Nov 22 '23 09:11 joachimwolff

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

Naveen-Ahuja avatar Dec 01 '23 23:12 Naveen-Ahuja