CSOgroup / CALDER

MIT License
19 stars 3 forks source link

Demo run has an error #9

Open Wan9299 opened 9 months ago

Wan9299 commented 9 months ago

Dear Author, when I use The CALDER to run the demo data, i could not get a successful result:

library(CALDER)

contact_mat_file <- system.file("extdata", "mat_chr22_10kb_ob.txt.gz", package='CALDER')

CALDER_main(contact_mat_file, 
            chr=22, 
            bin_size=10E3, 
            out_dir='./GM12878', 
            sub_domains=TRUE, 
            save_intermediate_data=FALSE
            )
>>>> Begin process contact matrix and compute correlation score at: 2023-11-23 19:13:07.592163 
 >>>> Begin compute compartment domains and their hierachy at: 2023-11-23 19:14:15.745756Error in i_set_vertex_attr(x, attr(value, "name"), index = value, value = attr(value,  : 
  Length of new attribute value must be 1 or 0, the number of target vertices, not 2
Error in rep(hc_k_labels_full, sapply(res$initial_clusters, length)) : 
  'times'参数不对

image

Wan9299 commented 9 months ago

so, what should i do ? and, before i installed the packges from online and local files, image

Henrikkoe commented 9 months ago

I got the same error

YuanlongLiu commented 9 months ago

This was linked to issue: https://github.com/CSOgroup/CALDER2/issues/6

And has been solved by changing the code here: https://github.com/CSOgroup/CALDER2/commit/c2a4ebfcb354ffbaabd8eea5af2c13e3bd10e5b1

Can you paste how the code looks like in your _assign_twinsname function here?