Closed tzeitim closed 3 years ago
Calling mcell_mc_plot_by_factor in a fresh environment returns an error:
mcell_mc_plot_by_factor
> mcell_mc_plot_by_factor(mc_id_f, meta_field = 'batch_set_id', mat_id) Error in png(filename = sub("ps$", "png", fn), width = w, height = h, : invalid 'width' argument
This seems to happen as a result of internally looking for the mcp_heatmap_width, apparently absent by default.
mcp_heatmap_width
> tgconfig::get_param("mcp_heatmap_width", "metacell") NULL
A workaround is to declare mcp_heatmap_width before calling mcell_mc_plot_by_factor to make it run, e.g:
> tgconfig::set_param("mcp_heatmap_width", 1000, 'metacell') > mcell_mc_plot_by_factor(mc_id_f, meta_field = 'batch_set_id', mat_id)
A simple internal assertion in mcell_mc_plot_by_factor should solve this.
if( is.null(tgconfig::get_param("mcp_heatmap_width", "metacell")){ tgconfig::set_param("mcp_heatmap_width", 1000, 'metacell') } mcp_heatmap_width = tgconfig::get_param("mcp_heatmap_width")
Thanks for the opening this issue. We will change the default of mcp_heatmap_width or add an assertion.
The mcp_heatmap_width was added to the default parameters, thanks!
Calling
mcell_mc_plot_by_factor
in a fresh environment returns an error:This seems to happen as a result of internally looking for the
mcp_heatmap_width
, apparently absent by default.A workaround is to declare
mcp_heatmap_width
before callingmcell_mc_plot_by_factor
to make it run, e.g:A simple internal assertion in
mcell_mc_plot_by_factor
should solve this.