XiaoTaoWang / NeoLoopFinder

A computation framework for genome-wide detection of enhancer-hijacking events from chromatin interaction data in re-arranged genomes
Other
53 stars 16 forks source link

How do I handle cool files #23

Open shidetong opened 2 years ago

shidetong commented 2 years ago

Hello, there are some problems when I use it, there should be some problems with my cool file, I used Juicer to generate Hic file and then converted it into cool file, but NOW I have such errors.

root INFO @ 09/05/21 18:28:30:

ARGUMENT LIST:

Output Prefix = PANC

Break Points = nochr_output_10kb.txt

Minimum fragment size = 500000bp

Cooler URI = inter_10000.cool

Extended Genomic Span = 5000000bp

Balance Type = CNV

Experimental protocol = insitu

Number of Processes = 1

Log file name = assembleSVs.log

root INFO @ 09/05/21 18:28:31: Filtering SVs by checking distance decay of the induced contacts ... Traceback (most recent call last): File "/public/home/shidetong/anaconda2/envs/neoloop/bin/assemble-complexSVs", line 104, in run protocol=args.protocol, minIntra=args.minimum_size) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/neoloop/assembly.py", line 57, in init results = Parallel(n_jobs=n_jobs, verbose=10)(delayed(filterSV)(*i) for i in params) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/joblib/parallel.py", line 921, in call if self.dispatch_one_batch(iterator): File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/joblib/parallel.py", line 759, in dispatch_one_batch self._dispatch(tasks) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/joblib/parallel.py", line 716, in _dispatch job = self._backend.apply_async(batch, callback=cb) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/joblib/_parallel_backends.py", line 182, in apply_async result = ImmediateResult(func) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/joblib/_parallel_backends.py", line 549, in init self.results = batch() File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/joblib/parallel.py", line 225, in call for func, args, kwargs in self.items] File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/joblib/parallel.py", line 225, in for func, args, kwargs in self.items] File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/neoloop/assembly.py", line 14, in filterSV fu = Fusion(clr, c1, c2, p1, p2, s1, s2, note, span=span, col=col, protocol=protocol, trim=False) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/neoloop/callers.py", line 88, in init self.get_matrix(span, col, trim) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/neoloop/callers.py", line 139, in get_matrix M1 = self.clr.matrix(balance=col).fetch((self.c1, k_p[0], k_p[1])) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/cooler/core.py", line 570, in fetch return self._slice(self.field, i0, i1, j0, j1) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/cooler/api.py", line 342, in _slice self._is_symm_upper) File "/public/home/shidetong/anaconda2/envs/neoloop/lib/python3.7/site-packages/cooler/api.py", line 640, in matrix "calculate balancing weights or set balance=False.") ValueError: No column 'bins/sweight' found. Use cooler.balance_cooler to calculate balancing weights or set balance=False.

I have processed cool files using Cooler Balance.

XiaoTaoWang commented 2 years ago

Sorry for the delay. The error message ValueError: No column 'bins/sweight' found tells that you didn't run correct-cnv on your contact matrices. Note that if you want to run assemble-complexSVs and neoloop-caller on ICE-normalized matrices, you have to specify --balance-type ICE on your command.