dekkerlab / cworld-dekker

perl cworld module and collection of utility/analysis scripts for C data (3C, 4C, 5C, Hi-C)
Apache License 2.0
63 stars 20 forks source link

Get error report when using matrix2compartment #7

Open SiyiWanggou opened 5 years ago

SiyiWanggou commented 5 years ago

Hi, authors of cworld: I builded the .iced.matrix and _abs.bed files by hicpro. Then, by using export.my5C from HiTC, I exported a symmetric matrix, ps.mat . However, when I use the matrix2compartment for compartment calling, I got the error report as below:

perl ~/biosoft/cworld-dekker/scripts/perl/matrix2compartment.pl -i ~/cworlddata/ps.matrix Report: matrix must be symmetrical / equal sized intervals at ~/biosoft/cworld-dekker/scripts/perl/matrix2compartment.pl line 207.

I successfully called compartments of sample data from cworld-dekker/sample-data/collapseMatrix/EHSNP-mNPemm9genome__C-500000-iced.matrix. However, when I use this package for my own data, it reported as above.

Could anybody help me solve this problem? Thanks a lot.

blajoie commented 5 years ago

Hi,

The input matrix must be symmetrical and have equal sized bins. It looks like you may be feeding in a 5C-style matrix? Where each row/col represents a restriction fragment? Instead of a hic-style (or 5C binned) matrix.

Can you bin your data into fix-sized-windows first and then try to re-run? binMatrix.pl (or more current equiv.) should be able to do the binning for you.