phasegenomics / matlock

Simple tools for working with Hi-C data
GNU Affero General Public License v3.0
15 stars 1 forks source link

bam2 juicer produces format not recognized by juicer #5

Open eoziolor opened 5 years ago

eoziolor commented 5 years ago

Hello,

I created a contact file with bam2 juicer on unfiltered .bam reads aligned by recommendations from this link: https://phasegenomics.github.io/2019/09/19/hic-alignment-and-qc.html

However, when I try to run juicer on this file to create a .hic file I get the following output:

java -jar ~/program/juicer_tools.1.8.9_jcuda.0.8.jar pre ph_super_format ph_super.hic ~/phgenome/data/juicer_hic/references/chrom_sizes.txt Not including fragment map Start preprocess Writing header Writing body java.io.IOException: Unexpected column count. Check file format at juicebox.tools.utils.original.AsciiPairIterator.advance(AsciiPairIterator.java:150) at juicebox.tools.utils.original.AsciiPairIterator.(AsciiPairIterator.java:74) at juicebox.tools.utils.original.Preprocessor.computeWholeGenomeMatrix(Preprocessor.java:499) at juicebox.tools.utils.original.Preprocessor.writeBody(Preprocessor.java:383) at juicebox.tools.utils.original.Preprocessor.preprocess(Preprocessor.java:293) at juicebox.tools.clt.old.PreProcessing.run(PreProcessing.java:105) at juicebox.tools.HiCTools.main(HiCTools.java:96) java.lang.RuntimeException: No reads in Hi-C contact matrices. This could be because the MAPQ filter is set too high (-q) or because all reads map to the same fragment. at juicebox.tools.utils.original.Preprocessor$MatrixZoomDataPP.mergeAndWriteBlocks(Preprocessor.java:1479) at juicebox.tools.utils.original.Preprocessor$MatrixZoomDataPP.access$000(Preprocessor.java:1250) at juicebox.tools.utils.original.Preprocessor.writeMatrix(Preprocessor.java:663) at juicebox.tools.utils.original.Preprocessor.writeBody(Preprocessor.java:385) at juicebox.tools.utils.original.Preprocessor.preprocess(Preprocessor.java:293) at juicebox.tools.clt.old.PreProcessing.run(PreProcessing.java:105) at juicebox.tools.HiCTools.main(HiCTools.java:96)

Would you mind helping me figure out what is going wrong?

Thank you!

-Elias

shawnpg commented 5 years ago

Hi Elias,

Could you grab a snippet of the BAM (e.g., samtools view foo.bam | head -n 1000) and send it our way?

Separately, we make .hic files from BAMs out of Matlock with a different process. While I still want to fix the issue you're having here, this may unblock you for now: https://github.com/phasegenomics/juicebox_scripts. See particularly the "Getting a .hic file from a BAM file and a .assembly file" section.

Thanks,

Shawn

eoziolor commented 5 years ago

Shawn,

That's perfect. I am ultimately trying to get to a .hic file, so I will try the new option out, thank you!

Please see attached for the first 1000 lines of the bam

Thanks again.

-Elias

aligned_1000.txt