koustav-pal / HiCBricks

HiCBricks offers user-friendly and efficient solutions for handling large high-resolution Hi-C datasets. The package provides a R/Bioconductor framework with the bricks to build more complex data analysis pipelines and algorithms.
Other
3 stars 4 forks source link

y-axis coordinates and x-axis coordinates are the same #18

Open koustav-pal opened 4 years ago

koustav-pal commented 4 years ago

A potential problem here. When x_coords and y_coords are not the same, y_axis inherits axis labels and values from x_axis. Refer, line 222 - 235 in Brick_vizart_plot_heatmap.

Kelly-ST-HRI commented 1 year ago

Thanks for your efforts to develop this package @koustav-pal

We've replicated this issue (@kuguit and I) when plotting trans-chromosomal contacts between chromosomes of different sizes (x-axes chromosome was smaller than y-axes). The y_coords therefore did not match the axes limits defined by x_coords or the maximum length of the shorter chromosome.

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'end': subscript contains out-of-bounds indices

I've found the bug causing this and have a working solution which allows:

I've tested this solution by modifying the function code and running "source" on this R script to import the update version. I'll submit a pull request with recommended changes.

Kelly-ST-HRI commented 1 year ago

I think this solution will resolve issue #17 as well.

Kelly-ST-HRI commented 1 year ago

I've added these as 2 separate PRs as #25 directly addresses this issue while #26 significantly changes the codebase to allow transpose matrices in the lower triangle to be plotted.