Skip to content

How to produce input matrix #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aaannaw opened this issue Jul 14, 2022 · 5 comments
Open

How to produce input matrix #7

aaannaw opened this issue Jul 14, 2022 · 5 comments

Comments

@aaannaw
Copy link

aaannaw commented Jul 14, 2022

Hello,Professor
I have produced a .matrix file and a .bed file after running Hic-Pro. Then I runned the R package hicpro2bedpe to convert into the sparse matrices. But when I run the calder.R:

library(CALDER)

contact_mat_file_Ma6 = "1.Chr01.matrix"
CALDER_main(contact_mat_file_Ma6, chr=1, bin_size=40E4, out_dir='./Chr01_Ma', sub_domains=TRUE, save_intermediate_data=FALSE)

The error occurs:

Begin process contact matrix and compute correlation score at: 2022-07-14 22:59:55 
Error in if (nrow(A_oe) < 100) A_oe = remove_blank_cols(mat_oe_sparse,  : 
  argument is of length zero
Calls: CALDER_main -> CALDER_CD_hierarchy -> contact_mat_processing
Execution halted

I am not sure my preparing input is correct? Can you give me any suggestion how to produce the input based on the hicppro results.

@YuanlongLiu
Copy link
Collaborator

Can you share your 1.Chr01.matrix to [email protected]?

@aaannaw
Copy link
Author

aaannaw commented Jul 17, 2022

Hello
I am sorry for delayed response. Firstly I have converted the .bed and .matrix file produced by hic-pro to the full-matrix file by running the python script sparseToDense.py. Then I have converted the full-matrix file to sparse upper triangular matrix file by R package HiCcompre full2sparse function. Finally I got upper triangular matrix as the input file ofcalderand I successly run the procedure. But when I run by per chromosome, some chromosomes do not produce the output except log file and the errors occurs:

 >>>> Begin compute compartment domains and their hierachy at: 2022-07-17 01:34:54Error in if (abs(gene_density_cor) < 0.2) warning("correlation between gene density and PC1 is too weak") : 
  missing value where TRUE/FALSE needed
Calls: CALDER_main -> CALDER_CD_hierarchy
In addition: Warning messages:
1: In .Seqinfo.mergexy(x, y) :
  The 2 combined objects have no sequence levels in common. (Use
  suppressWarnings() to suppress this warning.)
2: In .Seqinfo.mergexy(x, y) :
  The 2 combined objects have no sequence levels in common. (Use
  suppressWarnings() to suppress this warning.)
3: In cor(method = "spearman", subset(bin_pc_gene_coverage, (PC1_val <  :
  the standard deviation is zero
Execution halted  

I have carefully read the [README.md (https://github.com/CSOgroup/CALDER2.0#readme), but I have not got the answet of the error. Could you give any suggestions ?

@YuanlongLiu
Copy link
Collaborator

Hi,
Can you share one of the input contact matrices which failed for running Calder?

@aaannaw
Copy link
Author

aaannaw commented Jul 24, 2022

Hello
I am sorry for delayed response.
tmp.txt

@YuanlongLiu
Copy link
Collaborator

YuanlongLiu commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants