juicer error when merging customly created .hic files

756 views
Skip to first unread message

Geert Geeven

unread,
May 6, 2016, 5:14:31 AM5/6/16
to 3D Genomics
When I try to run hiccups on a pool of .hic files that I have created from custom made and processed
.txt files with filtered hic ditags, I get the following error :

################################################


./juicer hiccups -m 512 -r 10000 -k KR S1.hic+S2.hic+S3.hic hiccups_loops_S1_S2_S3_pooled


Reading summed files: [S1.hic, S2.hic, S3.hic]
HiC file version: 8
HiC file version: 8
HiC file version: 8
Running HiCCUPS for resolution 10000
Exception in thread "main" java.lang.NullPointerException
        at juicebox.data.Dataset.getZoomForBPResolution(Dataset.java:200)
        at juicebox.tools.clt.juicer.HiCCUPS.runHiccupsProcessing(HiCCUPS.java:311)
        at juicebox.tools.clt.juicer.HiCCUPS.run(HiCCUPS.java:283)
        at juicebox.tools.HiCTools.main(HiCTools.java:79)


##################################################

The .hic files were created using this command :

./juicer pre -f ~/juicer/misc/mm9_NlaIII.txt S1_juicerPre.txt S1.hic mm9

and my custom created txt files as input to the juicer pre look as follows :

ID 0 chr1 3000173 1 1 chr1 5860619 12951 32 32
ID 0 chr1 3000253 1 0 chr1 5392273 10936 32 32
ID 0 chr1 3000303 1 1 chr1 3785307 3762 32 32
ID 0 chr1 3000313 1 0 chr1 3763626 3645 32 32
ID 0 chr1 3000322 1 0 chr1 3484064 2295 32 32
ID 0 chr1 3000326 1 1 chr1 16072169 61128 32 32
ID 0 chr1 3000327 1 1 chr1 90158710 409329 32 32
ID 0 chr1 3000331 1 1 chr1 3565418 2684 32 32
ID 0 chr1 3000396 1 0 chr1 10830095 35699 32 32
ID 0 chr1 3000409 1 1 chr1 3436125 2017 32 32
ID 0 chr1 3000414 1 1 chr1 3659662 3183 32 32
ID 0 chr1 3000419 1 0 chr1 42830393 190123 32 32
ID 0 chr1 3000433 1 1 chr1 4050043 4912 32 32
ID 0 chr1 3000437 1 0 chr1 3644960 3094 32 32
ID 0 chr1 3000465 1 0 chr1 3422541 1950 32 32

That is, I use a 'fake' ID column and I don't have the mapping quals (just use a constant, 32 ). I have the chr, strand position and I already computed
what fragment the read maps to in the fragment file I later use in Juicer pre (mm9_NlaIII.txt ) which is created using the scripts provided with juicer.

All my .hic files are created with no errors and load without problems in Juicebox for visualization, including the normalization at different resolutions / zooms.

There is no additional meta-data in my .hic files (no stats etc..... ) and in Juicebox I am not able to load any annotation for my maps.

Somehow merging the different replicates creates the NullPointerException at juicebox.data.Dataset.getZoomForBPResolution mentioned above.
Also, for a single replicate with enough density, I am able to run the arrowhead and hiccups algorithms on my .hic files without problems.

Am I doing something wrong ? Can you help me ?

Best regards,

Geert

Neva Durand

unread,
May 6, 2016, 11:56:02 AM5/6/16
to Geert Geeven, 3D Genomics
Hi Geert,

In order to combine replicates, we recommend making a new HiC file with the replicates together.  This is because the KR normalization has to happen on the original combined matrix.  That is, the normalization is not an independent operation - the individual normalization factors cannot be arithmetically combined together to produce the proper normalization factors for the combined map.

You can find a script for making a Hi-C map from replicates here (and in the corresponding folder for the other clusters):  

But basically what you would do is 
sort -m -k2,2d -k6,6d S1_juicerPre.txt S2_juicerPre.txt S3_juicerPre.txt > S1_S2_S3.txt

and
./juicer pre -f ~/juicer/misc/mm9_NlaIII.txt S1_S2_S3.txt S1_S2_S3.hic mm9

By the way, if you're not interested in fragment maps, "pre" will run faster without the "-f <fragment>".  This is because the normalization takes a long time on single fragment delimited matrices.

Finally - I'm surprised to hear you're not able to load annotations in Juicebox.  Do you mean your custom annotations?  You should see some default tracks with mm9 and you should also be able to load ENCODE tracks.

Best
Neva

--
You received this message because you are subscribed to the Google Groups "3D Genomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3d-genomics...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/3d-genomics/1bea7b52-7fa2-4d2b-90ac-f5df6ad7ec52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Neva Cherniavsky Durand, Ph.D.
Staff Scientist, Aiden Lab
Reply all
Reply to author
Forward
0 new messages