koustav-pal/HiCBricks

Need help to read in the mcool file converted by hicexplorer

zhjilin opened this issue · 1 comments

Hi,
Has anyone come across problems to read the mcool files converted by hicexplorer? Not sure what went wrong, can someone give some hints where should I change in mcool?

Thanks!

First, I figured out there should be "format-version" attribute in mcool file, so I added it back "format-version: 2". (I guess it should be 2. I tried 1 and 3, didn't read either)

However, it threw the following error:
output=CreateBrick_from_mcool(Brick="./test40k", binsize=40000, mcool="Merged.4bins_corrected.mcool", remove.existing=T)

Error in rep(chr, Offset) : invalid 'times' argument

Here I listed the file content, one from my file and the other one from the example:

h5ls("Merged.4bins_corrected.mcool")
                        group         name       otype  dclass      dim
0                           /  resolutions   H5I_GROUP                 
1                /resolutions        40000   H5I_GROUP                 
2          /resolutions/40000         bins   H5I_GROUP                 
3     /resolutions/40000/bins        chrom H5I_DATASET    ENUM    27752
4     /resolutions/40000/bins          end H5I_DATASET INTEGER    27752
5     /resolutions/40000/bins        start H5I_DATASET INTEGER    27752
6     /resolutions/40000/bins       weight H5I_DATASET   FLOAT    27752
7          /resolutions/40000       chroms   H5I_GROUP                 
8   /resolutions/40000/chroms       length H5I_DATASET INTEGER       32
9   /resolutions/40000/chroms         name H5I_DATASET  STRING       32
10         /resolutions/40000      indexes   H5I_GROUP                 
11 /resolutions/40000/indexes  bin1_offset H5I_DATASET INTEGER    27753
12 /resolutions/40000/indexes chrom_offset H5I_DATASET INTEGER       33
13         /resolutions/40000       pixels   H5I_GROUP                 
14  /resolutions/40000/pixels      bin1_id H5I_DATASET INTEGER 81274286
15  /resolutions/40000/pixels      bin2_id H5I_DATASET INTEGER 81274286
16  /resolutions/40000/pixels        count H5I_DATASET   FLOAT 81274286
h5ls("../4DNFI7JNCNFB.mcool")
                            group         name       otype  dclass       dim
0                               /  resolutions   H5I_GROUP                  
1                    /resolutions         1000   H5I_GROUP                  
2               /resolutions/1000         bins   H5I_GROUP                  
3          /resolutions/1000/bins           KR H5I_DATASET   FLOAT   3088281
4          /resolutions/1000/bins           VC H5I_DATASET   FLOAT   3088281
5          /resolutions/1000/bins      VC_SQRT H5I_DATASET   FLOAT   3088281
6          /resolutions/1000/bins        chrom H5I_DATASET    ENUM   3088281
7          /resolutions/1000/bins          end H5I_DATASET INTEGER   3088281
8          /resolutions/1000/bins        start H5I_DATASET INTEGER   3088281
9          /resolutions/1000/bins       weight H5I_DATASET   FLOAT   3088281
10              /resolutions/1000       chroms   H5I_GROUP                  
11       /resolutions/1000/chroms       length H5I_DATASET INTEGER        24
12       /resolutions/1000/chroms         name H5I_DATASET  STRING        24
13              /resolutions/1000      indexes   H5I_GROUP                  
14      /resolutions/1000/indexes  bin1_offset H5I_DATASET INTEGER   3088282
15      /resolutions/1000/indexes chrom_offset H5I_DATASET INTEGER        25
16              /resolutions/1000       pixels   H5I_GROUP                  
17       /resolutions/1000/pixels      bin1_id H5I_DATASET INTEGER 356526446
18       /resolutions/1000/pixels      bin2_id H5I_DATASET INTEGER 356526446
19       /resolutions/1000/pixels        count H5I_DATASET INTEGER 356526446
20                   /resolutions        10000   H5I_GROUP                  
21             /resolutions/10000         bins   H5I_GROUP                  
22        /resolutions/10000/bins           KR H5I_DATASET   FLOAT    308837
23        /resolutions/10000/bins           VC H5I_DATASET   FLOAT    308837

Hi,

Sorry for the very long silence on this thread. I haven't had the chance to take a look at the repository for quiet some time. HiCExplorer and sparse format files are a planned addition for bioconductor release 3.11.

Other than that, I am trying to find the source of your bug. Can you please provide a file for testing purposes?