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

how get TADs with a matrix from HiCPro? #9

Open
jacomegutierrez opened this issue Feb 7, 2019 · 11 comments
Open

how get TADs with a matrix from HiCPro? #9

jacomegutierrez opened this issue Feb 7, 2019 · 11 comments

Comments

@jacomegutierrez
Copy link

Hi, I want to analyse ice matrix from hicpro with the script matrix2insulation.pl, is this posible? because I got the ERROR: Must supply headered matrix.

@nservant
Copy link

nservant commented Feb 7, 2019

Hi,
The HiC-Pro output cannot be directly loaded in matrix2insulation.pl
You have to convert it first.
I'm not 100% sure, but if I remember correctly matrix2insulation requires a dense matrix with bin names as rownames ... as in the my5C tool.
In the HiTC R package, you can load HiC-Pro data (using importC function) and export dense matrix using the export.my5C function.
I can also write a small tool to make the convertion in HiC-Pro if it helps.
Nicolas

@jacomegutierrez
Copy link
Author

it would be great a small tool in HiCPro to convert matrix!

@jacomegutierrez
Copy link
Author

I was trying to generated the input for matrix2insulation.pl in HiTC, first with importC then using export.my5C for all the matrix but the following error appear:

export.my5C(a, "15min_a_my5C", genome="BSgenome.Hsapiens.UCSC.hg19", per.chromosome=FALSE)
Start combining HTCexp objects ...
Object size: 77323496
Exporting data in '15min_a_my5C_hg19.mat' ...
Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105

Then I try the same per chromosome, but that matrix are not symmetrical!

@nservant
Copy link

nservant commented Mar 1, 2019

Hi Jacome,
Will try to move on that asap.
Do you have somewhere an example of input file for matrix2insulation.pl ?
I have in mind a dense format with rownames/colnames as :
bin_number|organism|genomic_position| (ie. 35126|mm9|chr10:320001-360000)
Is that correct ?
Anyone knows if the organism is useful ? can I put a default to 'org' for instance ?
thanks

@jacomegutierrez
Copy link
Author

jacomegutierrez commented Mar 1, 2019 via email

@nservant
Copy link

nservant commented Mar 7, 2019

Hi Jacome
I just released the sparse2dense.py script to convert HiC-Pro data to matrix2insulation.pl input.
See https://github.com/nservant/HiC-Pro/tree/devel/bin/utils
See --ins option
N

@jacomegutierrez
Copy link
Author

jacomegutierrez commented Mar 8, 2019 via email

@nservant
Copy link

nservant commented Mar 8, 2019

great ! N

@hzaumsq
Copy link

hzaumsq commented Jun 14, 2019

When I use the hicpro result to look for Tad
1 .sparseToDense.py matrix/sample1/iced/40000/sample1_40000_iced.matrix -b matrix/sample1/raw/40000/sample1_40000_abs.bed -d -o 40000.matrix
the first step looks like correct;
2. perl /public/home/csxie/msq/tool/crane-nature-2015/scripts/matrix2insulation.pl -i 40000.matrix
ERROR: matrix must be symmetrical!
more 40000.matrix
Scaffold0 0 40000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 291.48 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 86.158 0.0 0.0 0.0 0.0 0.0 113.291 215.461 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 350.491 0.0 0.0 0.0 0.0 352.66 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 81.84 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 104.334 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Then I got a error

@nservant
Copy link

Hi,
A couple of months ago, I added a '--ins" option to the spaseToDense script that should generate the right format for matrix2insulation.pl
Can you check if you used this option please ?
N

@guleiathms
Copy link

How much memory I should use for hg19, if I don't set -c? I used 120G, but it still runs out of memory.
Thanks.

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

4 participants