Skip to content

Accept interval columns by name regardless of order - #198

Open
buyan-kh wants to merge 1 commit into
Genentech:mainfrom
buyan-kh:fix/resize-column-order
Open

buyan-kh wants to merge 1 commit into
Genentech:mainfrom
buyan-kh:fix/resize-column-order

Conversation

@buyan-kh

@buyan-kh buyan-kh commented Sep 8, 2026

Copy link
Copy Markdown

Summary

  • check_intervals now validates chrom / start / end by column name (order-independent), so grelu.sequence.utils.resize and other callers no longer fail when those columns are present but reordered.
  • Updated resize / format docstrings to document name-based interval columns; DFSeqDataset also selects interval columns by name for consistency.
  • Added unit tests for out-of-order (and extra) interval columns in get_input_type and resize.

Fixes #34

Test plan

  • pytest tests/test_sequence.py::test_get_input_type tests/test_sequence.py::test_resize
  • Confirm tutorial-style dataframe with columns like name, end, chrom, start works with resize

check_intervals previously required chrom/start/end as the first
three columns, which broke resize and tutorials when columns were
present but reordered. Identify required columns by name, update
docstrings, select interval columns by name in DFSeqDataset, and
add unit tests for out-of-order dataframes.

Fixes Genentech#34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update doc string and input allowances for grelu.sequence.utils.resize

1 participant