GFF_Reader coordinates not correct for minus strand. Subtracting 2/1 from start/end for minus strand/end_included=false and 2/2 minus strand/end_included=true. Should subtract 1/1 for end_included=false (which is the correct option for this example). For end_include=false (wrong for this example but included anyway) should subtract 1 from start (which is the minus end) and 0 from end (which is minus start).
Tested on Xenopus_tropicalis.JGI_4.2.72.gtf from ftp://ftp.ensembl.org/pub/release-72/gtf/xenopus_tropicalis
Gtf file has:
GL180064.1 snRNA exon 2054 2152 . + . gene_id "ENSXETG00000029782"; transcript_id "ENSXETT00000059982"; exon_number "1"; gene_name "U2"; gene_biotype "snRNA"; transcript_name "U2-201"; exon_id "ENSXETE00000351529";
GL185866.1 misc_RNA exon 452 763 . - . gene_id "ENSXETG00000030108"; transcript_id "ENSXETT00000060204"; exon_number "1"; gene_name "RNaseP_nuc"; gene_biotype "misc_RNA"; transcript_name "RNaseP_nuc-201"; exon_id "ENSXETE00000380528";
GFF_reader produces:
>>> gtf_file = HTSeq.GFF_Reader( "Xenopus_tropicalis.JGI_4.2.72.gtf",end_included=False )
>>> for feature in itertools.islice( gtf_file, 30 ):
... print feature
--ommited lines--
<GenomicFeature: exon 'ENSXETG00000029782' at GL180064.1: 2053 -> 2151 (strand '+')>
<GenomicFeature: exon 'ENSXETG00000030108' at GL185866.1: 761 -> 450 (strand '-')>
>>> gtf_file = HTSeq.GFF_Reader( "Xenopus_tropicalis.JGI_4.2.72.gtf",end_included=True )
>>> for feature in itertools.islice( gtf_file, 30 ):
... print feature
--ommited lines--
<GenomicFeature: exon 'ENSXETG00000029782' at GL180064.1: 2053 -> 2152 (strand '+')>
<GenomicFeature: exon 'ENSXETG00000030108' at GL185866.1: 762 -> 450 (strand '-')>
>>> HTSeq.__version__
'0.5.4p2'
For end_include=
falsetrue(wrong for this example but included anyway) should subtract 1 from start (which is the minus end) and 0 from end (which is minus start).