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

Change how method get_genes handle end position #212

Merged
merged 4 commits into from
Jun 4, 2024
Merged

Change how method get_genes handle end position #212

merged 4 commits into from
Jun 4, 2024

Conversation

jpjarnoux
Copy link
Member

Previously, get_genes handled the last position to agree with Python list slicing syntax, i.e., if the begin was 0 and the end was 5, get_genes returned genes at positions 0, 1, 2, 3, and 4. In the PPanGGOLiN algorithms, the syntax was known, and the results were what was expected.

However, we judged that was not the intended behavior of the method. So now, get_genes includes the gene in the position end. Also, an argument outrange_ok (boolean = False by default) was added to prevent some out-of-range index errors.

@axbazin
Copy link
Member

axbazin commented Apr 22, 2024

I think this is all good, but I'd like to integrate the "functional_tests" branch before merging this, as this change is at the core of ppanggolin and it will be much easier to verify that there is no unexpected effects with it

Copy link
Member Author

Choose a reason for hiding this comment

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

Same content, tab has been replaced by spaces

@axbazin axbazin merged commit d5e7aac into dev Jun 4, 2024
4 checks passed
@axbazin axbazin deleted the GetGenePos branch June 4, 2024 08:56
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.

None yet

2 participants