ay-lab / dcHiC

dcHiC: Differential compartment analysis for Hi-C datasets
MIT License
57 stars 10 forks source link

Error during running dcHiC #3

Closed biozzq closed 3 years ago

biozzq commented 3 years ago

Dear all,

When running dcHiC, an error occurred to me, likes following:

Chromosome chr1 Output
###################
/path/dchic
4
2

python /path/run.py -nExp 4 -chrNum chr1 -res 100000 -numGroups 2 -grouping 1 -ncp 2 -group 2 -group 2 -expNames mm8WF-1 -expNames mm8WF-2 -expNames mm8WM-1 -expNames mm8WM-2 -groupNames mm8WF -groupNames mm8WM -blacklist /mm10/mm10-blacklist.v2.bed -genome mm10 -alignData /mm10/goldenpathData -prePath /path/CorrelationMatrices/mm8WF-1_mat/ -prePath /path/CorrelationMatrices/mm8WF-2_mat/ -prePath /path/CorrelationMatrices/mm8WM-1_mat/ -prePath /path/CorrelationMatrices/mm8WM-2_mat/

Traceback (most recent call last):
  File "/path/run.py", line 128, in <module>
    obj = open(results.tag_list[itempos], "r")
IsADirectoryError: [Errno 21] Is a directory: '/path/CorrelationMatrices/mm8WF-1_mat/'
python /path/makeBedGraph.py -eigfile chr_chr1/hmfa_mm8WF_exp_1.txt -chr chr1 -exp mm8WF
cat input.txt
mm8WF-1 mm8WF /path/CorrelationMatrices/mm8WF-1_mat
mm8WF-2 mm8WF /path/CorrelationMatrices/mm8WF-2_mat
mm8WM-1 mm8WM /path/CorrelationMatrices/mm8WM-1_mat
mm8WM-2 mm8WM /path/CorrelationMatrices/mm8WM-2_mat

my command is as following: python /path/dchic.py -res 100000 -inputFile input.txt -chrFile chr.txt -input 2 -genome mm10 -alignData /mm10/goldenpathData -keepIntermediates 1 -blacklist /mm10/mm10-blacklist.v2.bed

Best wishes, Zheng zhuqing

ay-lab commented 3 years ago

Hello,

Can you list your O/E correlation matrix directory and check that it has all of these files? For example, in "mm8WF-1_mat", there should be these files:

mm8WF-1_mat 
    chr1.matrix
    chr2.matrix
    chr3.matrix 
    ... 

I believe this error is occurring because dcHiC can't find the O/E matrices it is looking for (and am updating the runtime script to catch this error in a clearer way in the future). All of them should be in the format ("chr.matrix"). Also, check that the chromosomes in chr.txt match the chromosomes ("chr.matrix") in the directory.

biozzq commented 3 years ago

Dear @ay-lab

Yes, here is the matrix files in your mentioned directory. I also checked the chromosomes in chr.txt. Although the command failed, it also created two empty directory (chr_chr10 and pcFiles). Thank you.

ls /path/CorrelationMatrices/mm8WF-1_mat/*.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr10.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr11.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr12.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr13.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr14.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr15.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr16.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr17.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr18.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr19.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr1.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr2.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr3.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr4.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr5.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr6.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr7.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr8.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chr9.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chrMT.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chrX.matrix
/path/CorrelationMatrices/mm8WF-1_mat/chrY.matrix

Best wishes, Zheng zhuqing

ay-lab commented 3 years ago

Hello,

Ah! In the -chrFile, instead of formatting like this...

chr10
chr11
...
X

Don't include the "chr" tags:

10
11
...
X
biozzq commented 3 years ago

Dear all,

Thank you. It is Ok now.

Best wishes, Zheng zhuqing