robinweide / GENOVA

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

Matrix plot visualization issue #347

Closed LucasMcNU closed 6 months ago

LucasMcNU commented 6 months ago

When using GENOVA with R 3.0 (or 2.3) on the HPC at my uni, I recently came upon an issue when trying to use any of the visualization functions (Pyramid(), Matrixplot(), etc..)

Error in guides$setup(scales, aesthetics, default = params$guide_default %||%  : 
  attempt to apply non-function

I uninstalled and reinstalled GENOVA. The issue persisted. Here is an example call:

GENOVA::pyramid(exp = wt.100kb, 
        chrom = "8",
        start = 132787754,
        end=133587757)

The visualization functions worked fine with this same data a week ago and visualize() still works fine with relative contact probability or aggregate tad analysis. It appears to just be an issue with generating matrix plots

teunbrand commented 6 months ago

I can only reproduce the pyramid() issue, the others seem to work as intended. In any case, this is due to an update in ggplot2 3.5.0, which we'll have to accommodate in GENOVA.

library(GENOVA)

exp <- get_test_data("150k", download = TRUE)

pyramid(exp, "chr22", 30e6, 35e6)
#> Error in guides$setup(scales, aesthetics, default = params$guide_default %||% : attempt to apply non-function
hic_matrixplot(exp, chrom = "chr22", start = 30e6, end = 35e6)
#> No colour limits were given: using 99% percentile: 11581.

trans_matrixplot(exp, chrom_up = "chr22", chrom_down = "chr22",
                 start_up = 30e6, start_down = 30e6,
                 end_up = 35e6, end_down = 35e6)

insulation_matrixplot(exp, chrom = "chr22", start = 30e6, end = 35e6)
#> Limits set to [0,7188]

compartment_matrixplot(exp, chrom = "chr22", arm = "q")
#> Limits set to [0,4543]

Created on 2024-03-13 with reprex v2.1.0

LucasMcNU commented 6 months ago

I'll try the other plotting functions in the meantime. Thank you for the quick response!

teunbrand commented 6 months ago

The pyramid() function should be fixed now. If other functions are unaffected, please feel free to close the issue.