Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to keep zero length intervals when converting bed -> interval_list #1928

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

rickymagner
Copy link
Contributor

@rickymagner rickymagner commented Dec 14, 2023

Description

This PR is a follow-up to the discussion in #1914. In particular, it implements a boolean flag KEEP_ZERO_LENGTH_INTERVALS for the BedToIntervalList tool, and sets the default to false. This means that if the input bed file has length 0 intervals, e.g. chr1 1000 1000, they will be skipped in the .interval_list output file, unless the flag is manually toggled to true. Note this will change default behavior from previous versions, but based on the discussion there seems like a very sensible default.

A new test was added to test the functionality, and previous tests were modified to toggle this flag to true to ensure that existing tests meant to ensure length zero intervals were properly handled are still handled correctly when the flag is turned on.


Checklist

Content

  • Added or modified tests to cover changes and any new functionality
  • Edited the README / documentation (if applicable)
  • All tests passing on github actions

Review

  • Final thumbs-up from reviewer
  • Rebase, squash and reword as applicable

@kockan kockan self-requested a review December 15, 2023 14:32
@@ -107,9 +107,13 @@ public class BedToIntervalList extends CommandLineProgram {
@Argument(doc = "If true, entries that are on contig-names that are missing from the provided dictionary will be dropped.")
public boolean DROP_MISSING_CONTIGS = false;

@Argument(doc = "If true, write length zero intervals in input bed file to resulting interval list file.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we say "zero-length intervals" instead of "length zero intervals". I know it's not critical, just for the sake of consistency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually like "length zero" better than "zero length" so I switched the labelings everywhere to make it consistent.

@rickymagner rickymagner merged commit 5e2c94a into master Dec 15, 2023
6 checks passed
@rickymagner rickymagner deleted the rm_empty_bed_intervals branch December 15, 2023 18:01
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.

2 participants