What is the Eigenvector input .hic file?

643 views
Skip to first unread message

Jenny

unread,
Aug 15, 2019, 10:19:29 PM8/15/19
to 3D Genomics
Hi all,
I am trying to get A/B compartments from my Hi-C library.
I have generated .hic files using juicer.sh and I also have used juicer_tools.jar pre to generate a 40kb resolution .hic file.
Then I tried the following:

for i in {1..22}
do
    java -jar $Juicer_tools eigenvector KR $hic_file $i BP 40000 $HOME/Eigenvector/${sample_name}_chr${i}_eigen.txt
done
java -jar $Juicer_tools eigenvector KR $hic_file X BP 40000 $HOME/Eigenvector/${sample_name}_chrX_eigen.txt
java -jar $Juicer_tools eigenvector KR $hic_file Y BP 40000 $HOME/Eigenvector/${sample_name}_chrY_eigen.txt

However, all the output files are 0B.

The Eigenvector.oxxx file only says: WARNING: Pearson's and eigenvector calculation at high resolution can take a long time
The Eigenvector.exxx file says:

Unknown resolution: BP_40000

This data set has the following bin sizes (in bp): 

2500000 1000000 500000 250000 100000 50000 25000 10000 5000 

and the following bin sizes (in frag): 

500 200 100 50 20 5 2 1

When I changed to use .hic file from juicer_tools.java pre, I got only the warnings but no error message. However, all the output files are still 0 byte.


I'm wondering what shall I do to make this work?
Thanks,
Jenny

Moshe Olshansky

unread,
Aug 15, 2019, 11:51:15 PM8/15/19
to 3D Genomics
Hi Jenny,

I have an R script to compute the eigenvector at high resolution (even 5 kb resolution for mouse chr1 takes a few minutes or less).
I think that you can get it from juicer github. If not I can e-mail you my scripts.

Moshe.

Neva Durand

unread,
Aug 16, 2019, 7:31:36 AM8/16/19
to Moshe Olshansky, 3D Genomics
Jenny,

There are several issues. 

1) You did not create a hic map with the resolution 40000 so you can’t do an eigenvector at that resolution. 
2) You need to include the -p flag since you are trying to calculate an eigenvector at very high resolution. It can take a while. 

Moshe has scripts for this however I’m not sure they operate on the same matrix (the O/E is whitened before calculating Pearson, creating a dense matrix, which is why it is a very long calculation). 

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/a6397099-e18f-4d51-b821-7ab64fe05eb6%40googlegroups.com.
--
Neva Cherniavsky Durand, Ph.D.
Staff Scientist, Aiden Lab

Jiani Yin

unread,
Aug 16, 2019, 1:29:38 PM8/16/19
to Neva Durand, Moshe Olshansky, 3D Genomics
So I can start with the 40kb .hic file from juicer_tools pre, and then add -p flag to the juicer_tools eigenvector. Let me try this first.
Thank you guys.
Jenny


Moshe Olshansky

unread,
Aug 16, 2019, 10:00:03 PM8/16/19
to 3D Genomics
Yes. And at 40 kb resolution it should not take more than an hour or two for mouse or human chr1 and much less time for smaller chromosomes.


On Friday, August 16, 2019 at 12:19:29 PM UTC+10, Jenny wrote:

Jiani Yin

unread,
Aug 16, 2019, 10:02:13 PM8/16/19
to Moshe Olshansky, 3D Genomics
You are right, it took 40-50min for the X chromosome.
I’m thinking is there more value to do this on 40kb resolution map? Or 100kb is sufficient for compartment level analysis?
Jenny


--
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.

Moshe Olshansky

unread,
Aug 16, 2019, 10:26:58 PM8/16/19
to 3D Genomics
I think that you can do this at 100 kb resolution but Neva should be able to answer this better than me.
We were using this for TADs and wanted to try 5 kb resolution which would take more than a month for mouse chr1 and this is what made me look for an alternative.


On Friday, August 16, 2019 at 12:19:29 PM UTC+10, Jenny wrote:

Neva Durand

unread,
Aug 17, 2019, 7:21:44 AM8/17/19
to Moshe Olshansky, 3D Genomics
Yes, for compartments 100Kb is fine. 

--
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.

Joji Marie Teves

unread,
Jan 29, 2020, 9:23:48 AM1/29/20
to 3D Genomics
Hello Moshe, 

I'm interested to get the R script for high resolution eigenvector, is it possible to have it too? 

Thanks,
Joji

Nasreen Bano

unread,
Apr 27, 2023, 8:41:27 AM4/27/23
to 3D Genomics
Hello Moshe, 

I'm also interested to get this R script for high resolution eigenvector. Will you please give it to me?

Thanks,
Nasreen

Moshe Olshansky

unread,
Apr 30, 2023, 1:28:07 AM4/30/23
to 3d-ge...@googlegroups.com
Hi Nasreen,

Sorry for the delay - I somehow didn't notice your email.

The code is in 
It contains both R and C/C++ code.
Please keep in mind that R code (even though it works) is older, slower and less flexible than the C/C++ code.

Let me know if you need further help.

Best regards,
Moshe.


--
You received this message because you are subscribed to a topic in the Google Groups "3D Genomics" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/3d-genomics/8dp9EChj4Nw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 3d-genomics...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/3d-genomics/f5899b8d-139f-42cc-95e3-49877eebc9e8n%40googlegroups.com.

Nasreen Bano

unread,
May 3, 2023, 5:16:29 AM5/3/23
to 3d-ge...@googlegroups.com
Thank you so much Moshe.



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/CAFuhK5ycNurU76y4g8mOsgPHfTCyPwfQ7jy7UG%2BywTfNq6rPFA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages