R/shaman_feature_grid.R
shaman_plot_feature_grid.Rd
shaman_plot_feature_grid
shaman_plot_feature_grid(
grids,
range,
grid_resolution,
plot_resolution,
type = "enrichment",
fig_fn = "",
fig_width = 400,
fig_height = 400,
pal = colorRampPalette(c("blue", "#87FFFF", "white", "#FF413D", "black")),
zlim = c(-1, 1)
)
List of grids generated for the same two feature sets from replicate observed / expected hic tracks.
Window size around the grid point that was used to generate the grid.
Size of bins that was used to generate the grid.
Size of bins to display.
The type of data to plot, can be "observed" for log10(obs/sum(obs)), "expected" for log10(exp/sum(exp)) or "enrichment" for log2(obs/sum(obs) / exp/sum(exp))
Name of png file to output to. Empty string will cause the figure to be plotted to the current device.
Width in pixels of output png figure.
Height in pixels of output png figure.
Color palette to use for image
The minimum and maximum values for which colors should be plotted. Suggested zlim values by type: enrichment: (-1,1), obs,exp: (-4.5, -3)
After contact feature grids are generated via shaman_generate_feature_grid, use this function to visualize them.
# Set misha db to test
gsetroot(shaman_get_test_track_db())
#> Error in setwd(groot): cannot change working directory
grid <- shaman_generate_feature_grid(shaman::ctcf_forward, shaman::ctcf_reverse, "hic_obs",
exp_track_nm = "hic_exp", score_track_nm = "hic_score"
)
#> Error in shaman_generate_feature_grid(shaman::ctcf_forward, shaman::ctcf_reverse, "hic_obs", exp_track_nm = "hic_exp", score_track_nm = "hic_score"): Missing obs_track_nm ( hic_obs ) in track db
shaman_plot_feature_grid(list(grid), 25000, 500, 500)
#> Error: object of type 'closure' is not subsettable
shaman_plot_feature_grid(list(grid), 25000, 500, 1000)
#> Error: object of type 'closure' is not subsettable
shaman_plot_feature_grid(list(grid), 25000, 500, 2000)
#> Error: object of type 'closure' is not subsettable