johnbachman / py-fcm

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

FCSreader cannot import LMD files #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run test_load_lmd.py unit test
2.
3.

What is the expected output? What do you see instead?
Error with parsing binary file

    self.fcm =
FCSreader('/Volumes/HD2/data/flow/cvc_ics/Lab04/ICS2D1S1R1lab4.LMD').get_FCMdata
()
  File "/Volumes/HD2/hg/fcm/src/io/readfcs.py", line 28, in get_FCMdata
    header = self.parse_header(self.cur_offset)
  File "/Volumes/HD2/hg/fcm/src/io/readfcs.py", line 94, in parse_header
    header['analysis_start'] = int(self.read_bytes(offset, 42, 49))
ValueError: invalid literal for int() with base 10: '

Please use labels and text to provide additional information.

Original issue reported on code.google.com by cliburn....@gmail.com on 25 Jul 2009 at 2:59

GoogleCodeExporter commented 9 years ago
LMD works fine.  The LMD file in discussion over specifies it's range on all 
fields
in the header (ie endtext enddata etc) by 1.  flow fails to load this file, and
rflowcyt complains about the text segment size but loads the data sucessfully.  
I'm
looking at how they manage this, and how a couple of other tools manage this.  
But
there is now a unit test in the tree to help track this once I figure out a fix.

Original comment by Jacob.Frelinger@gmail.com on 30 Jul 2009 at 5:29

GoogleCodeExporter commented 9 years ago
Issue 11 has been merged into this issue.

Original comment by Jacob.Frelinger@gmail.com on 12 Nov 2009 at 9:32

GoogleCodeExporter commented 9 years ago
Have implemented simple fix for this problem

    def parse_int_data(self, offset, start, stop, bitwidth, drange, tot, order):
        """Parse out and return integer list data from fcs file"""
        try:
            return self._parse_int_data(offset, start, stop, bitwidth, drange, tot, order)
        except error:
            return self._parse_int_data(offset, start, stop-1, bitwidth, drange, tot, order)

If this fix looks reasonable, can you go ahead and implement it across all the 
parse routines with some clean-
up?

Original comment by cliburn....@gmail.com on 14 Nov 2009 at 4:56

GoogleCodeExporter commented 9 years ago
I'm hoping I can find a way to identify LMD files from the get go, and 
automatically
adjust stop to be one short in that case, but failing the proposed try/except 
method
will have to do.

Original comment by Jacob.Frelinger@gmail.com on 14 Nov 2009 at 7:39

GoogleCodeExporter commented 9 years ago
fix has been commited and pushed.  Once we get a LMD file we can add to the 
repo, we
can rehook the unit test and close this issue.

Original comment by Jacob.Frelinger@gmail.com on 15 Nov 2009 at 6:47

GoogleCodeExporter commented 9 years ago
unit test now hooked up.  committed and pushed.

Original comment by Jacob.Frelinger@gmail.com on 17 Nov 2009 at 7:07