Skip to content

Reading Annotation Volume as 16-bit, not 32-bit uints #2

@dgoodwin208

Description

@dgoodwin208

I think there is a subtle issue with the foldchange.py example

In the api documentation the annotation volume is listed at as a 32-bit uint:
http://help.brain-map.org/display/mousebrain/API

But in the foldchange code, the data is loaded from the zip with the 'H' (unsigned short, 16-bit) designation.

I was running around in circles trying to figure out why the annot variable in the main() was twice as long as the gene-specific data. I believe this is the issue.

The solution is easy: change "arr = array.array('H', raw)" to arr = array.array('I', raw) in the DownloadAnnotationVolume() function
(reference: http://docs.python.org/2/library/array.html)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions