robinweide / GENOVA

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

Example in Tutorial page 32 could not be reproduced #285

Open YiweiNiu opened 2 years ago

YiweiNiu commented 2 years ago

Hi,

The example from tutorial of GENOVA (page 32) could not be reproduced.

hic_matrixplot(exp1 = Hap1_WT_10kb,
               chrom = 'chr7',
               start = 25e6,
               end=29e6,
               tads = WT_TADs, # see ATA
               tads.type = 'upper', # only plot in lower triangle
               tads.colour = '#91cf60', # green TAD-borders
               cut.off = 25, # upper limit of contacts
               skipAnn = T) # skip the outside annotation
plot(ID, minimalist = TRUE)

The above code could not produce a plot which combing hic_matrixplot and insulation_domainogram.

Bests, Yiwei

teunbrand commented 2 years ago

Hi there,

Thanks for reporting this, indeed it doesn't work as intended.

For a workaround, you can explicitly set the figure panel where the domainogram is drawn as follows:

library(GENOVA)

exp <- get_test_data("40k")

id <- insulation_domainogram(
  exp, "chr22:21e6:31e6"
)

hic_matrixplot(exp, chrom = "chr22:21e6:31e6", rasterise = TRUE)
#> No cut.off was given: using 99% percentile: 1126.
par(mfg = c(1,2))
plot(id, minimalist = TRUE)

Created on 2021-12-30 by the reprex package (v2.0.1)

YiweiNiu commented 2 years ago

Thank you for your quick reply.

This line par(mfg = c(1, 2)) induced another error:

Error in par(mfg = c(1, 2)) : parameter "j" in "mfg" is out of range

I guess there were other settings in par?