problem generating hic file using pre command

120 views
Skip to first unread message

Laiqa Zia

unread,
Apr 15, 2024, 6:34:28 AM4/15/24
to 3D Genomics
Hi,
I am facing a problem generating hic file using pre command. I used the following command to generate my inout file:  nohup samtools view homo_sapiens-bloodhic.bam | awk 'BEGIN {FS="\t"; OFS="\t"} {name1=$1; str1=and($2,16); chr1=$3; pos1=$4; mapq1=$5; getline; name2=$1; str2=and($2,16); chr2=$3; pos2=$4; mapq2=$5; if(name1==name2) { if (chr1>chr2){print name1, str2, chr2, pos2,1, str1, chr1, pos1, 0, mapq2, mapq1} else {print name1, str1, chr1, pos1, 0, str2, chr2, pos2 ,1, mapq1, mapq2}}}' | sort -k3,3d -k7,7d > pre_input_test.txt &

following that I am using java -jar /path/to/jarfile/juicerbox_tools.2.20.00.jar pre -q 10 bam/pre_input_test.txt bam/pre_output_test.hic hg38

Here I am getting following warnings: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
WARN [2024-04-15T11:17:15,400]  [Globals.java:138] [main]  Development mode is enabled
Using 1 CPU thread(s) for primary task
Using 10 CPU thread(s) for secondary task
Not including fragment map
Start preprocess
Writing header
Writing body
..........................
Writing footer
nBytesV5: 1374274
masterIndexPosition: 4312372

Finished preprocess

Calculating norms for zoom BP_2500000java.lang.NullPointerException: Cannot invoke "java.util.Iterator.hasNext()" because "this.currentIterator" is null
at juicebox.data.iterator.ListOfListIterator.hasNext(ListOfListIterator.java:44)
at juicebox.data.iterator.IteratorContainer.getNumberOfContactRecords(IteratorContainer.java:54)
at juicebox.data.iterator.ListOfListIteratorContainer.getIsThereEnoughMemoryForNormCalculation(ListOfListIteratorContainer.java:56)
at juicebox.tools.utils.norm.NormalizationCalculations.<init>(NormalizationCalculations.java:59)
at juicebox.tools.utils.norm.GenomeWideNormalizationVectorUpdater.getWGVectors(GenomeWideNormalizationVectorUpdater.java:167)
at juicebox.tools.utils.norm.GenomeWideNormalizationVectorUpdater.updateHicFileForGWfromPreAddNormOnly(GenomeWideNormalizationVectorUpdater.java:132)
at juicebox.tools.utils.norm.NormalizationVectorUpdater.updateHicFile(NormalizationVectorUpdater.java:159)
at juicebox.tools.clt.old.AddNorm.launch(AddNorm.java:83)
at juicebox.tools.clt.old.PreProcessing.run(PreProcessing.java:185)
at juicebox.tools.HiCTools.main(HiCTools.java:97) 

I am not sure what is the error, could someone help me here, please.

Laiqa Zia

unread,
Apr 17, 2024, 9:14:06 PM4/17/24
to 3D Genomics
I have done multiple thing,

I used this command for input file generation :  samtools view homo_sapiens-bloodhic.bam | awk 'BEGIN {FS="\t"; OFS="\t"} {name1=$1; str1=and($2,16); chr1=$3; pos1=$4; mapq1=$5; getline; name2=$1; str2=and($2,16); chr2=$3; pos2=$4; mapq2=$5; if(name1==name2) { if (chr1>chr2){print name1, str2, chr2, pos2,1, str1, chr1, pos1, 0, mapq2, mapq1} else {print name1, str1, chr1, pos1, 0, str2, chr2, pos2 ,1, mapq1, mapq2}}}'  | sort -k3,3d -k7,7d > output.txt

and then this command for hic file generation:  java -jar hic_tools.3.30.00.jar pre -q 10 output.txt output.hic hg38

The only problem is that the heatmap that I get when I view the hic file in juicebox is just a dotted kind of line on diagonal, I don't see full heatmap. Is that because I am not using fragment information and filling dummy numbers? Also, I tested the test data for the pre command and for the test data heat map looked fine, so I know for sure that something might be wrong for the first command. Any help will be appreciated. Thank You.
Reply all
Reply to author
Forward
0 new messages