johnbachman / py-fcm

Automatically exported from code.google.com/p/py-fcm
0 stars 1 forks source link

loadFCS failing #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. x = fcm.loadFCS("/Volumes/HD3/data/TREG2010/cJHn_Cytostim 6hr.fcs")

What is the expected output? What do you see instead?

error                                     Traceback (most recent call last)

/Users/cliburn/hg/fcm/sample_data/<ipython console> in <module>()

/Users/cliburn/MyPython/fcm/io/readfcs.pyc in loadFCS(filename, auto_logicle, 
auto_comp, 
spill)
    314 
    315     tmp = FCSreader(filename, auto_logicle, spill=spill)
--> 316     return tmp.get_FCMdata(auto_comp)
    317 
    318 def is_fl_channel(name):

/Users/cliburn/MyPython/fcm/io/readfcs.pyc in get_FCMdata(self, auto_comp)
     61         lmd = self.fix_lmd(self.cur_offset,header['text_start'], header['text_stop'] )
     62         dstop = dstop+lmd
---> 63         data = self.parse_data(self.cur_offset, dstart, dstop, text)
     64         # build fcmdata object

     65         channels = []

/Users/cliburn/MyPython/fcm/io/readfcs.pyc in parse_data(self, offset, start, 
stop, text)
    202             data = self.parse_int_data(offset, start, stop, bitwidth, drange, tot, order)
    203         elif dtype.lower() == 'f' or dtype.lower() == 'd':
--> 204             data = self.parse_float_data(offset, start, stop, 
dtype.lower(), tot, order)
    205         else: # ascii
    206             data = self.parse_ascii_data(offset, start, stop, bitwidth, dtype, tot, order)

/Users/cliburn/MyPython/fcm/io/readfcs.pyc in parse_float_data(self, offset, 
start, stop, dtype, 
tot, order)
    242         num_items = (stop-start+1)/calcsize(dtype)
    243         # unpack binary data

--> 244         tmp = unpack('%s%d%s' % (order, num_items, dtype), 
self.read_bytes(offset, start, 
stop))
    245 #        print 'ss:', start, stop

    246 #        print 'num_items', num_items

error: unpack requires a string argument of length 115349392

In [11]: x = fcm.loadFCS("/Users/Cliburn/Desktop/cJHn_Cytostim 6hr.fcs")

Please use labels and text to provide additional information.

Original issue reported on code.google.com by cliburn....@gmail.com on 15 Apr 2010 at 9:54

GoogleCodeExporter commented 9 years ago
fixed.  I had a keyword mispelled (beginadata which should have been 
begindata). 
fixed, now loads fine.  Was the same issue as 7. 

Original comment by Jacob.Frelinger@gmail.com on 19 Apr 2010 at 12:13

GoogleCodeExporter commented 9 years ago

Original comment by Jacob.Frelinger@gmail.com on 30 Jun 2011 at 3:01