Error occurred performing CAIC

110 views
Skip to first unread message

Jiani Yin

unread,
Apr 7, 2020, 2:32:32 AM4/7/20
to HiC-Pro
Hi,
I am trying to use CAIC to normalize raw Hi-C matrices (100kb bins). The raw matrices were generated using HiC-Pro_2.11.1, python 2.7.13

When I ran 
`python ice_cnv.py rawdata_100000.matrix --bed-file rawdata_100000_abs.bed`,
it did output a file rawdata_100000.matrix_cnv_iced.matrix

But when I then ran 
`python ice_cnv.py rawdata_100000.matrix --bed-file rawdata_100000_abs.bed --remove-cnv`,
an error occurred:

Traceback (most recent call last):

  File "ice_cnv.py", line 217, in <module>

bias_es = iced.normalization._ca_utils.estimate_block_biases(counts, lengths,

AttributeError: 'module' object has no attribute '_ca_utils'


This happened when it was "Estimating CNV-effects."
I couldn't figure out how to go about this. Could someone suggest what to do?

And correct me if I am wrong, I think the first code is to perform LOIC normalization, and the second code with --remove-cnv is to perform CAIC normalization.

Thanks,
Jenny


Message has been deleted

Jiani Yin

unread,
May 11, 2020, 12:18:07 AM5/11/20
to Nelle Varoquaux, HiC-Pro
I’ve upgraded the iced package to 0.5.7, but it still gives me the same error. 
When I import iced in python 2.7, it gives a warning: The API of this module is likely to change. Use only for testing purposes. "The API of this module is likely to change. "

I tried iced 0.5.1 and it gives the same messages.
Really don’t know what to do.

Jenny



On Apr 16, 2020, at 12:49 PM, Jiani Yin <yinjian...@gmail.com> wrote:

Hi Nelle,
Hope you are doing well. 
Do you see a problem in the iced version that I was using?

Thanks a lot,
Jenny


On Apr 11, 2020, at 12:19 AM, Jiani Yin <yinjian...@gmail.com> wrote:

Hi Nelle,
Thank you for responding! I am sorry, for some reason, I did not see this email earlier.
It was 0.4.2 that I used.

Thanks,
Jenny




On Apr 7, 2020, at 12:00 AM, Nelle Varoquaux <nelle.v...@gmail.com> wrote:

Hello,

Which version of iced are you using? You can find it out through the following command:
python -c "import iced; print(iced.__version__)"

Many thanks,
Nelle

--
You received this message because you are subscribed to the Google Groups "HiC-Pro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hic-pro+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hic-pro/9be9f637-a64b-44de-9f2e-849167a44bfc%40googlegroups.com.



Nelle Varoquaux

unread,
May 11, 2020, 3:01:07 AM5/11/20
to Jiani Yin, HiC-Pro
Hi Jiani
Then it was indeed a version problem. This warning is not an error: the method should now work. You can safely ignore the warning : it refers to changes that may occur internally.
Thanks,
Nelle

Jiani Yin

unread,
May 12, 2020, 3:32:27 PM5/12/20
to Nelle Varoquaux, HiC-Pro
Thank you for your response, Nelle.
I tried it again, and this time it stopped at an earlier step with error:
Traceback (most recent call last):
  File "/u/project/jennybea/scripts/ice_cnv.py", line 193, in <module>
    verbose=100, max_iter=args.max_iter, counts_profile=cnv)
  File "/u/home/j/jennybea/.local/lib/python2.7/site-packages/iced/normalization/__init__.py", line 85, in ICE_normalization
    total_counts = X.sum()
AttributeError: 'NoneType' object has no attribute ‘sum'

Maybe the error occurred because I updated the scipy version during my trouble-shooting. I noticed that many codes in the ice_cnv.py script is not compatible with different versions of the packages. Sorry that I am new to python, and this could be because of my ignorance.
I was using ice_cnv.py downloaded from https://github.com/nservant/cancer-hic-norm/blob/master/CNV_norm/ice_cnv.py. It requires a few packages to be imported: argparse, sys, numpy, scipy, pandas, iced, and from iced import io. I know that iced version should be >= 0.5.1. Could you specify which version the other packages should use? Or will you upgrade them all to the latest version? Also which python version do you suggest? 
Thank you very much,
Jenny

Jiani Yin

unread,
Jul 2, 2020, 9:03:47 PM7/2/20
to HiC-Pro
Hi Nelle,
I updated all python modules to the latest version and ran the CAIC package again. But It has been running for 20 days without result. I don't see any error. 
When I tried LOIC, it only took 2 hours and a file named ID_rawdata_100000.matrixcnv_iced.matrix was successfully generated.

Here are the codes I used:

CAIC
python3 ice_cnv.py ./ID_rawdata_100000.matrix --bed-file ./rawdata_100000_abs.bed --remove-cnv --max_iter 100

LOIC
python3 ice_cnv.py ./ID_rawdata_100000.matrix --bed-file ./rawdata_100000_abs.bed


Do you see any problem in the CAIC codes?
Thank you,
Jenny


Hi Nelle,
To unsubscribe from this group and stop receiving emails from it, send an email to hic...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "HiC-Pro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hic...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages