simon-anders / htseq

HTSeq is a Python library to facilitate processing and analysis of data from high-throughput sequencing (HTS) experiments.
https://htseq.readthedocs.io/en/release_0.11.1/
GNU General Public License v3.0
122 stars 77 forks source link

Error in documentation describing coordinate conversion for GFF_Reader #98

Closed marykthompson closed 4 years ago

marykthompson commented 4 years ago

Hi,

I believe the text below is wrong because to convert Ensembl 1-based, end included coordinates to Python coordinates you only need to subtract one from start coordinate, but not the end coordinate. i.e. [1, 100] -> [0, 100)

https://htseq.readthedocs.io/en/release_0.11.1/features.html#gff-reader-and-genomicfeature "GFF_Reader will convert the coordinates from GFF standard (1-based, end maybe included) to HTSeq standard (0-base, end not included) by subtracting 1 from the start position, and, for end_included=True, also subtract 1 from the end position."

This says that you are also subtracting 1 from the end position if end_included = True, which I believe is not correct and also thankfully does not seem to be what GFF_Reader does. Just a small thing but letting you know because it confused me and led me to go checking for off-by-one errors. Thanks.

iosonofabio commented 4 years ago

@marykthompson you are right, I updated the docs now in commit 4021c20. Closing