robinweide / GENOVA

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

Make error of check_compat_exp() informative #173

Closed asedenocacciatore closed 4 years ago

asedenocacciatore commented 4 years ago

GENOVA gives a cryptic error when experiments in a explist are not compatible:

Error in vapply(seq_along(hic_10kb)[-1], function(i) { : 
  values must be type 'double',
 but FUN(X[[1]]) result is type 'character'

This is because check_compat_exp() uses a vapply that restricts FUN.VALUE to a logical, but when the IDX of the experiments differs the current comparison outputs "Different number of rows" rather than FALSE.

This can be solved by wrapping this comparison within an isTRUE(), for instance.

teunbrand commented 4 years ago

Closing this, as this should be OK now with Angela's PR