Jwindler/AutoHiC

adjusted.assembly is the same as before when using onehic.py.

Opened this issue · 11 comments

Hi,

I used HapHiC to generate out.hic and out.assembly. Then, using onehic.py, I obtained the same adjusted.assembly with no changes. Is it normal?

Best regards.

This is possible, and could be caused by very good or very bad results from HapHiC.

Hi, Thanks for developing autohic!

I ran onehic.py for my juicer & 3ddna generated assembly file but met the same issue that no changes occur in adjusted.assembly . The logs are as follow:

[2024-12-08  14:15:22] mul_gen_png.py -> mul_process line:49 [INFO] : Multiple Process Initiating ...
[2024-12-08  14:15:22] hic_adv_model.py -> __init__ line:30 [INFO] : Base Model Initiating
[2024-12-08  14:15:22] hic_adv_model.py -> __init__ line:40 [INFO] : Create genome folder: /home/wsq_pkuhpc/lustre2/user/lhy/results/genome_asm/ccs_asm/scaffolding/autohic/cpu/results/png
[2024-12-08  14:15:22] mul_gen_png.py -> mul_process line:56 [INFO] : Number of processes is : 24
[2024-12-08  14:15:22] hic_adv_model.py -> get_chr_len line:63 [INFO] : Hic file sequence length is : 1817304916
[2024-12-08  14:29:30] mul_gen_png.py -> mul_process line:120 [INFO] : Multiple process finished
[2024-12-08  14:29:30] get_cfg.py -> get_ratio line:49 [INFO] : Ratio(assembly length / hic length) is 2.0
[2024-12-08  14:29:31] get_cfg.py -> get_hic_real_len line:105 [INFO] : Hic file real len: 2386526
/home/wsq_pkuhpc/lustre2/user/hy/miniconda3/envs/autohic/lib/python3.9/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  /opt/conda/conda-bld/pytorch_1639180487213/work/aten/src/ATen/native/TensorShape.cpp:2157.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
/lustre2/wsq_pkuhpc/user/lhy/biosofts/AutoHiC/src/models/swin/mmdet/datasets/utils.py:64: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file.
  warnings.warn(
/lustre2/wsq_pkuhpc/user/lhy/biosofts/AutoHiC/src/models/swin/mmdet/models/roi_heads/bbox_heads/bbox_head.py:353: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  /opt/conda/conda-bld/pytorch_1639180487213/work/torch/csrc/utils/tensor_new.cpp:201.)
  scale_factor = bboxes.new_tensor(scale_factor).unsqueeze(1).repeat(
[2024-12-09  01:12:09] error_pd.py -> de_diff_overlap line:436 [INFO] : Filter all error category Done
[2024-12-09  01:12:09] error_pd.py -> chr_len_filter line:479 [INFO] : Warning: inversion not in errors_dict
[2024-12-09  01:12:09] error_pd.py -> loci_zoom line:513 [INFO] : zoom threshold: 0
[2024-12-09  01:12:09] error_pd.py -> loci_zoom line:527 [INFO] : Warning: inversion not in errors_dict
[2024-12-09  01:12:09] error_pd.py -> divide_error line:558 [INFO] : Divide all error category Done
[2024-12-09  01:12:09] error_pd.py -> json_vis line:722 [INFO] : Done loading json file.
[2024-12-09  01:12:09] adjust_all_error.py -> adjust_all_error line:54 [INFO] : Do not rectify translocation error
[2024-12-09  01:12:09] adjust_all_error.py -> adjust_all_error line:66 [INFO] : Do not rectify inversion error
[2024-12-09  01:12:09] adjust_all_error.py -> adjust_all_error line:77 [INFO] : Do not rectify debris error
[2024-12-09  01:12:09] get_cfg.py -> get_ratio line:49 [INFO] : Ratio(assembly length / hic length) is 2.0

No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Check if the GPU is available
GPU is not available, AutoHiC will run on CPU

load checkpoint from local path: /home/wsq_pkuhpc/lustre2/user/lhy/biosofts/sup_autohic//error_model.pth
img size:  (1116, 1116)
AutoHiC finished!

The logs showed no rectifications on those errors, could you help me with this?

Looking forward to your reply!

can you upload out.hic and out.assembly ? (if too large can upload google drive)

Maybe I can offer you a baidu netdisk link?
https://pan.baidu.com/s/1sTzz9BeLEz83hBjFENl5og?pwd=9jpa
9jpa

above are my input .hic and .assembly for onehic.py
Thanks for your timely reply

I'm very sorry, I can't access Baidu Cloud Disk, and the download speed of Baidu Cloud Disk is very slow. Google Drive provides 5G free space and no speed limit. I suggest you provide it. Thank you.

Your results are too bad for AutoHiC to correct. If you are using 3d-dna for scaffolding, I recommend using the -r 2 parameter. Or try the quickview mode of HapHiC. Then run the final x.hic file with onehic.py.
image

Thanks for your timely help! I will try what you recommoned. :)

Hi,I took your suggestions and the onehic.py run smoothly. However, I noticed some errors in the log file as:
image
I wonder if those errors need to be concerned? Intact log files atteched below.
Sincere thanks for your help!
onehic.log

nothing, its AutoHiC inner info

Thanks! Really apprciate your help!