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

BED file coordinates should be treated as 0-start, half-open intervals #511

Closed
huddlej opened this issue Mar 31, 2020 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@huddlej
Copy link
Contributor

huddlej commented Mar 31, 2020

Current Behavior

augur's functions to read in BED files with a CSV parser treat coordinates as 0-start, fully-closed intervals. This means they include both the start and the end coordinates in the interval and treat these as zero-based coordinates. This behavior happens in load_excluded_sites in tree.py and also in augur mask.

The current behavior results in one extra base getting included at the end of given interval.

Expected behavior

BED coordinates should be 0-start, half-open intervals.

Possible solution

  • Update BED functions to not add 1 to the final coordinate of each range
  • Update corresponding BED files in test data and production builds to the desired coordinates under the expected BED coordinate behavior
@huddlej huddlej added the bug Something isn't working label Mar 31, 2020
jstoja pushed a commit to jstoja/augur that referenced this issue Apr 5, 2020
In addition, tests have been added to confirm it works as expected.

Fixes nextstrain#511
jstoja pushed a commit to jstoja/augur that referenced this issue Apr 5, 2020
In addition, tests have been added to confirm it works as expected.

Fixes nextstrain#511
@jstoja
Copy link

jstoja commented Apr 5, 2020

I've taken a shot at it with #521 but I didn't find any BED files for excluded_sites.

@huddlej huddlej closed this as completed Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants