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

Does the parameter end from VariantFile.fetch is included or excluded #986

Closed
bioinfornatics opened this issue Jan 30, 2021 · 2 comments
Closed

Comments

@bioinfornatics
Copy link

Dear,
little question, into the documentation it is tell that start and end is 0-based but what about inclusive/exclusive ?
I would like to know if start=0 and end=5 that fetch 6 bases or 5 ?

Thanks

Best regards

@jmarshall
Copy link
Member

In general in pysam, where parameters are supplied as start,stop integers, they are 0-based half-open. Where they are supplied as a human-readable "chr:start-stop" string, the coordinates are 1-based inclusive.

I've prepared a clarification for the VariantFile.fetch documentation accordingly. Thanks for pointing out the documentation deficiency.

@bioinfornatics
Copy link
Author

Thanks

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

No branches or pull requests

2 participants