-
Notifications
You must be signed in to change notification settings - Fork 4
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
Is GenomicRanges object open-ended? #132
Comments
I believe this is mostly an issue when we print the objects; internally the methods work as close-ended. But will verify again this week. |
Thanks, so Python IRanges seems to be implemented as half-open-ended as
but otherwise all the functions handle the ranges in a close-end manner? |
Probably related to BiocPy/IRanges#42. We're working on rewriting some of these in C/C++ relatively soon and i'll be more explicit on this issue. |
Yes, that's exactly what I meant; thanks for sharing. I think the width values are confusing, and the gtf parser needs to be fixed to include the end written on the gtf file. I'm looking forward to the update! |
Hi, it's great to have GenomicRanges in Python and really appreciated.
I've encountered a coordinate issue when loading a GENCODE gtf file with the
genomicranges.read_gtf()
function (I'm using v0.4.34).I have a small GTF file that is the top 1000 lines of GENCODE v46 human GTF file:
When I load this in Python with the following code:
Which successfully reads the input:
As it's described in the manual, I thought
genomicranges
handles the data as 1-based, which should be close-ended. However, the widths of the ranges indicate it's open-ended:The same thing seems to be happening for the example code, where I tried:
returning the following, which again indicates open-ended range:
GTF file is 1-start for both start and end as long as I read the description, and when I load the same GTF file with R
rtracklayer
, it reads as 1-start close-ended.output:
As seen in the above output, the widths are 2541 for the first range when loaded by R, while the same track's range is 2540 when loaded by Python
genomicranges
.Please let me know if I misunderstand something. Thank you!
The text was updated successfully, but these errors were encountered: