whitews / FlowKit

A Python toolkit for flow cytometry analysis supporting GatingML and FlowJo workspaces
https://flowkit.readthedocs.io
BSD 3-Clause "New" or "Revised" License
153 stars 38 forks source link

Importing FCS files into Flowkit #193

Closed tinsleykw closed 4 months ago

tinsleykw commented 4 months ago

Describe the bug I am trying to read in my FCS files and I keep getting the following error:

IsADirectoryError: [Errno 21]

I copy the file path to the FCS files into fk.Sample('my specific file path') then I get the above error.

Code To Reproduce Code to reproduce the behavior:

import flowkit as fk
import  bokeh
import pandas as pd
fk.__version__

...

Expected behavior I expect some notification that my FCS files are recognized

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

whitews commented 4 months ago

Hi,

I think the issue here is that you may be giving a directory path instead of a path to a single FCS file as the argument to the Sample class. A Sample instance represents a single FCS file. See the docs on the Sample class for more information about the parameters.

Note there is also a utility function load_samples that provides a convenient way to load multiple FCS files from a single directory path. See the doc on load_samples here.

Let me know if that gets you past the error.

-Scott