ay-lab / dcHiC

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

dloop error #58

Closed Zheng19w closed 1 year ago

Zheng19w commented 1 year ago

Reading DaBai_R1_100kb_pca/intra_pca/DaBai_R1_100kb_mat/chr5.txt Reading DaBai_R2_100kb_pca/intra_pca/DaBai_R2_100kb_mat/chr5.txt Reading LaiWu_R1_100kb_pca/intra_pca/LaiWu_R1_100kb_mat/chr6.txt Reading LaiWu_R2_100kb_pca/intra_pca/LaiWu_R2_100kb_mat/chr6.txt Reading DaBai_R1_100kb_pca/intra_pca/DaBai_R1_100kb_mat/chr6.txt Reading DaBai_R2_100kb_pca/intra_pca/DaBai_R2_100kb_mat/chr6.txt Reading LaiWu_R1_100kb_pca/intra_pca/LaiWu_R1_100kb_mat/chr7.txt Reading LaiWu_R2_100kb_pca/intra_pca/LaiWu_R2_100kb_mat/chr7.txt Reading DaBai_R1_100kb_pca/intra_pca/DaBai_R1_100kb_mat/chr7.txt Reading DaBai_R2_100kb_pca/intra_pca/DaBai_R2_100kb_mat/chr7.txt Reading LaiWu_R1_100kb_pca/intra_pca/LaiWu_R1_100kb_mat/chr8.txt Reading LaiWu_R2_100kb_pca/intra_pca/LaiWu_R2_100kb_mat/chr8.txt Reading DaBai_R1_100kb_pca/intra_pca/DaBai_R1_100kb_mat/chr8.txt Reading DaBai_R2_100kb_pca/intra_pca/DaBai_R2_100kb_mat/chr8.txt Reading LaiWu_R1_100kb_pca/intra_pca/LaiWu_R1_100kb_mat/chr9.txt Reading LaiWu_R2_100kb_pca/intra_pca/LaiWu_R2_100kb_mat/chr9.txt Reading DaBai_R1_100kb_pca/intra_pca/DaBai_R1_100kb_mat/chr9.txt Reading DaBai_R2_100kb_pca/intra_pca/DaBai_R2_100kb_mat/chr9.txt Reading LaiWu_R1_100kb_pca/intra_pca/LaiWu_R1_100kb_mat/chrX.txt Reading LaiWu_R2_100kb_pca/intra_pca/LaiWu_R2_100kb_mat/chrX.txt Reading DaBai_R1_100kb_pca/intra_pca/DaBai_R1_100kb_mat/chrX.txt Reading DaBai_R2_100kb_pca/intra_pca/DaBai_R2_100kb_mat/chrX.txt Error in robust::covRob(mat.cen) : not enough observations Calls: compartmentLoop -> mahalanobis -> solve -> Execution halted

Rscript dchicf.r --file lib_matrix.txt --pcatype dloop --dirovwt T --diffdir Laiwu_vs_Dabai_100Kb

Dear Professor:

Hello, the above error occurs when I use the dloop function. How to solve it and ask for your help

ay-lab commented 1 year ago

Hi, it seems that chrX doesn't have enough common set of interactions. Can you please share the "fithic_run/FithicResult.txt" file?

Also, before running the 'dloop' step and during the 'fithic' step you can increase the maximum distance between two interacting partners by adding this argument '--maxd 10e6'. This tells fithic to search for loops that are at max 10Mb apart and ensures that it will find some minimum number of loop to avoid the issue.

Rscript dchicf.r --file lib_matrix.txt --pcatype fithic --dirovwt T --diffdir Laiwu_vs_Dabai_100Kb --maxd 10e6 --fithicpath <fithic-path> --pythonpath <python-path>

You can then invoke the same argument in the 'dloop' step

Rscript dchicf.r --file lib_matrix.txt --pcatype dloop --dirovwt T --diffdir Laiwu_vs_Dabai_100Kb --maxd 10e6

Once you have the differential calls, you can then filter the loops based on your choice of distance threshold.

Zheng19w commented 1 year ago

Thank you for your reply. I have a question: the smaller the resolution setting, the more loop there will be. Is 100kb itself less loop? Is it better to reduce the resolution? Like 50

---- Replied Message ---- | From | @.> | | Date | 02/15/2023 07:03 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [ay-lab/dcHiC] dloop error (Issue #58) |

Hi, it seems that chrX doesn't have enough common set of interactions. Can you please share the "fithic_run/FithicResult.txt" file?

Also, before running the 'dloop' step and during the 'fithic' step you can increase the maximum distance between two interacting partners by adding this argument '--maxd 10e6'. This tells fithic to search for loops that are at max 10Mb apart and ensures that it will find some minimum number of loop to avoid the issue.

Rscript dchicf.r --file lib_matrix.txt --pcatype fithic --dirovwt T --diffdir Laiwu_vs_Dabai_100Kb --maxd 10e6 --fithicpath --pythonpath

You can then invoke the same argument in the 'dloop' step

Rscript dchicf.r --file lib_matrix.txt --pcatype dloop --dirovwt T --diffdir Laiwu_vs_Dabai_100Kb --maxd 10e6

Once you have the differential calls, you can then filter the loops based on your choice of distance threshold.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Zheng19w commented 1 year ago

FithicResult.txt

Zheng19w commented 1 year ago

Rscript /work/home/xiang1996/softmare/dchic/dcHiC-dcHiCv2.0/dchic/igvtrack.r differential.intra_sample_group.pcQnm.bedGraph --genome susScr11 --gfolder /work/home/xiang1996/database/susScr11_100000_goldenpathData

Calls: htmlbody Execution halted Error in file(file, "rt") : cannot open the connection Calls: read.table -> file In addition: Warning messages: 1: In file(file, "rt") : 'raw = FALSE' but '/work/home/xiang1996/database/susScr11_100000_goldenpathData' is not a regular file 2: In file(file, "rt") : cannot open file '/work/home/xiang1996/database/susScr11_100000_goldenpathData': it is a directory Execution halted

igvtrack.r error

ay-lab commented 1 year ago

Yes, it would be better to use 50Kb resolution if you want to look at the loops. Unfortunately, IGV-html doesn't support non-standard genomes. You can try the WashU browser or IGV desktop to visualize the data.

Zheng19w commented 1 year ago

Thank you for your help