Skip to content

Personal tool to split up large intervals in an interval list. - #1100

Open
tfenne wants to merge 1 commit into
mainfrom
tf_split_intervals
Open

Personal tool to split up large intervals in an interval list.#1100
tfenne wants to merge 1 commit into
mainfrom
tf_split_intervals

Conversation

@tfenne

@tfenne tfenne commented Sep 29, 2025

Copy link
Copy Markdown
Member

Personal tool used once to break up an interval list for a project, that's here for posterity.

@github-actions

Copy link
Copy Markdown
PR Preview Action v1.6.1

🚀 View preview at
https://fulcrumgenomics.github.io/fgbio/pr-preview/pr-1100/

Built to branch gh-pages at 2025-09-29 22:25 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@clp(group=ClpGroups.Personal, description=
"""
|Splits intervals within an interval list. Consumes an input interval list and attempts to break it
|into _at least_ `--num-intervals` intervals. The resulting interval list will likely end up with additional

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|into _at least_ `--num-intervals` intervals. The resulting interval list will likely end up with additional
|into _at least_ `--num-intervals` intervals of approximately equal size. The resulting interval list will likely end up with additional

|intervals.
|
|Calculates a max interval size by summing the length of all input intervals and dividing by the desired
|number of output intervals. Then each input interval is is broken up into approximately equals size,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|number of output intervals. Then each input interval is is broken up into approximately equals size,
|number of output intervals. Then each input interval is is broken up into approximately equal size,

|Calculates a max interval size by summing the length of all input intervals and dividing by the desired
|number of output intervals. Then each input interval is is broken up into approximately equals size,
|non-overlapping, sub-intervals of no more than the max size.
""")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the usage very confusing, sorry. Perhaps something like, takes in a interval list, and tries splitting intervals such that the output interval list has at least --num-intervals intervals. If the interval list already has at least this number, nothing is done (is this true?)

|into _at least_ `--num-intervals` intervals. The resulting interval list will likely end up with additional
|intervals.
|
|Calculates a max interval size by summing the length of all input intervals and dividing by the desired

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|Calculates a max interval size by summing the length of all input intervals and dividing by the desired
|Calculates a max interval size by taking the size of the covered territory and dividing by the desired

@yfarjoun yfarjoun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code does what I expect, the documentation I leave to the english speakers...

@codecov

codecov Bot commented Sep 30, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.86%. Comparing base (2ef1130) to head (66314de).
⚠️ Report is 48 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1100   +/-   ##
=======================================
  Coverage   95.86%   95.86%           
=======================================
  Files         131      131           
  Lines        7884     7884           
  Branches      547      547           
=======================================
  Hits         7558     7558           
  Misses        326      326           
Flag Coverage Δ
unittests 95.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants