Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions dimelo/plot_read_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,17 @@ def make_browser_figure(
colorscales: dictionary mapping motif names to plotly colorscale specifications

TODO: Think about how this interfaces with different types of initial sorting...
TODO: Make it so that this method does NOT modify the input dataframe
TODO: Should this method do the collapsing, or should this method require collapsing outside?
"""
if collapse:
index_map = collapse_rows(read_extent_df, **kwargs)
read_extent_df["y_index"] = read_extent_df["y_index"].map(index_map)
mod_event_df["y_index"] = mod_event_df["y_index"].map(index_map)
# NOTE: `DataFrame.assign` performs a deep copy, preventing the modification of the array that is passed in. For very large datasets, this duplication may cause memory issues.
read_extent_df = read_extent_df.assign(
y_index=read_extent_df["y_index"].map(index_map)
)
mod_event_df = mod_event_df.assign(
y_index=mod_event_df["y_index"].map(index_map)
)

# Build final figure
# TODO: Enable setting some relevant parameters
Expand Down
Loading