MaciekAber / pysam

Automatically exported from code.google.com/p/pysam
0 stars 0 forks source link

pytype not defined for FloatType tags (one-line bugfix included) #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In line 1612 of pysam/csamtools.pyx:

                for pytag, value in tags:
                    t = type(value)
                    if t == types.FloatType:
line 1612 --->          fmt = "<cccf"
                    elif t == types.IntType:

the fmt is defined by pytype is not. For the other types, both fmt and pytype 
are defined. I think line 1612 should be

                        fmt, pytype = "<cccf", 'f'

If not, tags with a floating-point value cannot be used.

Original issue reported on code.google.com by mjldeh...@gmail.com on 17 Dec 2010 at 8:41

GoogleCodeExporter commented 8 years ago
fixed, many thanks!

Original comment by andreas....@gmail.com on 1 Feb 2011 at 10:37