robinweide / GENOVA

GENome Organisation Visual Analytics
GNU General Public License v3.0
68 stars 15 forks source link

list of loops in hic_matrixplot #329

Open Guanchen-Li opened 1 year ago

Guanchen-Li commented 1 year ago

Dear all, I am using the function hic_matrixplot to compare two hic matrices. And I also want to add the loops info of two samples (called by hiccups) into the plot. Yet, when I add a list of data.frame of loops into function hic_matrixplot, I met an error. So, I want to ask whether this feature has not been covered in this function. Moreover, if I use hic_matrixplot to show one sample's hic matix, the loops features for one sample can do well.

hic_matrixplot(exp1 = WT_10kb,
                exp2 = KO_10kb,
                chrom = 'chr*',
                start = ***e6,
                end=***e6,
                cut.off = 100,
                loops = list(WT_loops,KO_loops),
                loops.colour = c("blue", "green"),
                loops.type = c("upper", "lower"),
                loops.radius = 20e3)
Error in loops[, 1] : incorrect number of dimensions
sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 8 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggrepel_0.9.3     corrplot_0.92     ggbiplot_0.55     scales_1.2.1      plyr_1.8.8        ggplot2_3.4.2    
[7] readr_2.1.4       dplyr_1.1.2       GENOVA_1.0.0.9000

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.10       pillar_1.9.0      compiler_4.0.5    tools_4.0.5       bit_4.0.5         lifecycle_1.0.3  
 [7] tibble_3.2.1      gtable_0.3.3      pkgconfig_2.0.3   rlang_1.1.1       cli_3.6.1         rstudioapi_0.14  
[13] parallel_4.0.5    xfun_0.39         withr_2.5.0       strawr_0.0.9      generics_0.1.3    vctrs_0.6.2      
[19] hms_1.1.3         bit64_4.0.5       tidyselect_1.2.0  glue_1.6.2        data.table_1.14.8 R6_2.5.1         
[25] fansi_1.0.4       vroom_1.6.3       tzdb_0.3.0        magrittr_2.0.3    colorspace_2.1-0  utf8_1.2.3       
[31] tinytex_0.45      munsell_0.5.0     crayon_1.5.2     

Cheers,

Guanchen

LucasMcNU commented 7 months ago

also run into this issue. using a BED format with V1= chr, V2 = pos1, V3 = pos2. what format should the bed files be in for loops?

LucasMcNU commented 6 months ago

any update on this issue? I'm using a loops list generated by Juicer

teunbrand commented 6 months ago

The loops should be a data.frame with the columns 'chromosome1', 'start1', 'end1', 'chromosome2', 'start2', 'end2'. Or a list of such data.frames. Not sure why the documentation says 'BED-like data.frame', it is confusing.