Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #40

Open
vinitamehlawat opened this issue Nov 14, 2022 · 2 comments

Comments

@vinitamehlawat
Copy link

Dear Authors,

Thanks for the great tool. I am using this tool to assemble de novo vertebrate genome. I got the following file after running
juicer pre -a -o out_JBAT hic-to-contigs.bin scaffolds_final.agp contigs.fa.fai >out_JBAT.log 2>&1 ' and got 5 files: out_JBAT.txt
out_JBAT.liftover.agp
out_JBAT.assembly
out_JBAT.assembly.agp
out_JBAT.log `

After running ` java -jar -Xmx32G juicer_tools.1.9.9_jcuda.0.8.jar pre out_JBAT.txt out_JBAT.hic.part <(cat out_JBAT.log | grep PRE_C_SIZE | awk '{print $2" "$3}')) && (mv out_JBAT.hic.part out_JBAT.hic ' I got following error

Skipping PRE_C_SIZE: assembly 553400379 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:1650) at juicebox.tools.utils.original.Preprocessor$MatrixZoomDataPP.access$000(Preprocessor.java:1419) at juicebox.tools.utils.original.Preprocessor.writeMatrix(Preprocessor.java:832) at juicebox.tools.utils.original.Preprocessor.writeBody(Preprocessor.java:582) at juicebox.tools.utils.original.Preprocessor.preprocess(Preprocessor.java:346) at juicebox.tools.clt.old.PreProcessing.run(PreProcessing.java:116) at juicebox.tools.HiCTools.main(HiCTools.java:96)

Could you please suggest any solution for this

Thank you
Vinita

@c-zhou
Copy link
Owner

c-zhou commented Nov 14, 2022

Hi Vinita,

It looks to me like the command cat out_JBAT.log | grep PRE_C_SIZE | awk '{print $2" "$3}' in your system generated output PRE_C_SIZE: assembly 553400379 instead of assembly 553400379 for which I am not sure why. You can double-check if this is the case.

A clearer way to run the command is to generate a chromosome size file and feed it into juicerbox, i.e., cat out_JBAT.log | grep PRE_C_SIZE | awk '{print $2" "$3}' >chrom.sizes and then (java -jar -Xmx32G juicer_tools.1.9.9_jcuda.0.8.jar pre out_JBAT.txt out_JBAT.hic.part chrom.sizes) && (mv out_JBAT.hic.part out_JBAT.hic). Make sure the content of the chrom.sizes file is assembly 553400379. If awk does not work in your system, you can simply do echo "assembly 553400379" >chrom.sizes.

Best,
Chenxi

@vinitamehlawat
Copy link
Author

Hi @c-zhou

Thanks for your prompt respose. I tried what you have suggest in above thread and I guess it worked. Could you please confirm if this looks fine or something is not correct in this step.

I got following print message:
java -jar -Xmx32G /home/vlamba/juicer/PBS/scripts/juicer_tools.1.9.9_jcuda.0.8.jar pre out_JBAT.txt out_JBAT.hic.part chrom.sizes && mv out_JBAT.hic.part out_JBAT.hic

Not including fragment map
Start preprocess
Writing header
Writing body
..
Writing footer

Finished preprocess

Calculating norms for zoom BP_2500000
Calculating norms for zoom BP_1000000
Calculating norms for zoom BP_500000
Calculating norms for zoom BP_250000
Calculating norms for zoom BP_100000
Calculating norms for zoom BP_50000
Calculating norms for zoom BP_25000
Calculating norms for zoom BP_10000
Calculating norms for zoom BP_5000
Writing expected
Writing norms
Finished writing norms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants