GFFtools-GX icon indicating copy to clipboard operation
GFFtools-GX copied to clipboard

gff_to_bed int and str arguments to - operator

Open tzintzuni opened this issue 8 years ago • 0 comments

Hi I encountered this while converting GCF_000001405.33_GRCh38.p7_genomic.gff.

I got an error about a string and int value being passed as operands to the - operator.

In gff_to_bed.py, line 90 is missing some parentheses:

89            out_print = [ent1['chr'], 
90                        '%d' % int(ent1['start'])-1,
91                        '%d' % int(ent1['stop']),

This fixed the issue:

89            out_print = [ent1['chr'], 
90                        '%d' % (int(ent1['start'])-1),
91                        '%d' % int(ent1['stop']),

Thanks for the great tool!

tzintzuni avatar Jul 20 '16 16:07 tzintzuni