Comments (4)
Hi Benjamin,
I'm not seeing the same output for that file. Using the script:
from flowio import FlowData, __version__
import numpy as np
import pandas as pd
flow_data = FlowData('../examples/fcs_files/100715.fcs')
np_events_reshaped = np.reshape(flow_data.events, (-1, flow_data.channel_count))
df_events = pd.DataFrame(np_events_reshaped)
df_events_describe = df_events.describe()
pd.set_option('display.max_columns', None)
print(df_events_describe)
print(__version__)
I get the output:
0 1 2 3 \
count 65016.000000 65016.000000 65016.000000 65016.000000
mean 44672.320312 43189.898438 331.918762 3203.209473
std 16795.664062 12862.360352 555.111084 6042.640625
min 23406.000000 27008.500000 -8.014621 -67.282539
25% 34158.000000 33993.687500 168.284748 1988.901764
50% 41644.250000 40842.875000 219.902458 2851.754395
75% 50878.937500 49323.500000 278.990265 3344.790100
max 262143.500000 256543.750000 46248.464844 261572.656250
4 5 6 7 \
count 65016.000000 65016.000000 65016.000000 65016.000000
mean 1253.388184 2342.416016 1507.453735 2668.065430
std 3056.480957 4014.197021 5344.309082 5278.330078
min -67.119034 -44.558552 -79.819801 -110.409325
25% 528.528076 1127.267487 738.003311 1302.372589
50% 898.317688 1732.623718 1100.638245 1879.138245
75% 1515.642242 2637.698792 1521.934418 2623.603210
max 261566.531250 261455.734375 261584.765625 261410.890625
8 9 10 11 \
count 65016.000000 65016.000000 65016.000000 65016.000000
mean 2587.166504 4795.202148 2889.029785 4140.847656
std 9648.791016 9937.980469 3198.799072 6172.310059
min -66.276711 -110.472748 -28.876564 -110.527817
25% 1136.139801 2360.606567 1785.755310 2011.960175
50% 1725.221863 3601.517822 2450.640381 3073.307739
75% 2211.242126 4681.368652 3266.696472 4898.110107
max 261585.406250 261586.531250 253481.906250 261539.921875
12 13 14 15
count 65016.000000 65016.000000 65016.000000 65016.000000
mean 2629.491943 3336.955566 2536.822998 3581.059082
std 4276.859863 7223.131348 4542.974121 6306.551758
min -89.503387 -51.957710 -61.939350 -33.256630
25% 1462.618042 1812.386444 1411.367889 1940.519623
50% 2159.566162 2705.184937 2117.235474 2812.368774
75% 2993.534851 3459.337158 2751.399902 4092.057434
max 261563.796875 261581.218750 261537.015625 261576.218750
1.0.1
These values seem inline with what you report for flowCore. What version of FlowIO are you using? What python version and OS?
It should also be noted that FlowIO does not do any type of preprocessing on the event data (e.g. applying gain). It is meant as a low level input/output library for reading the exact contents of the FCS file. For analysis, flow data should be pre-processed and the related FlowKit library will do this automatically in the Sample class.
Thanks,
Scott
from flowio.
Hi Scott,
Thank you for the quick reply. It seems to be a problem on my end. Depending on the package installation or environment, the weird values show up both on version 1.0.1 and Python 3.10 with my Mac M1 Pro laptop and CentOS 7 workstation. With a clean install, I can get the nice values on my laptop, but they still remain on the workstation. I'll try to debug some more later this week to reproduce the issue.
Thanks a lot already!
from flowio.
Hmm, that is troubling. If you still have an environment where you see the odd values can you post the pip freeze
requirements output here? My suspicion is that it may have something to do with NumPy dtypes during a conversion from the regular flat event data array to a NumPy array. You could also examine the values in the FlowData events array without using / converting to NumPy on those machines that exhibit the behavior. This would be very helpful in narrowing down where the issue is happening.
from flowio.
I can't seem to reproduce it, so I think I just messed up two different files, the 100715.fcs
one from FlowIO here and the example.fcs
from readfcs
here. The comment says it's originally the same, but they have different file sizes. Sorry for the trouble!
from flowio.
Related Issues (15)
- Removing a channel HOT 2
- Missing set zeroes if data offsets are greater than header max data size HOT 3
- Error when exporting some FCS files: REPORT BUG: error calculating text offset
- Open files containing multiple datasets HOT 5
- Getting event data as an Int but expecting a float? HOT 2
- Missing license HOT 5
- Better handling of data section byte offset discrepancy
- Incorrect estimation of data_stop HOT 7
- Support for FCS3.2 HOT 2
- Question about flow cytometry data HOT 1
- Issue loading fcs files HOT 5
- FlowData.write_fcs attempts to write strings to file opened in binary mode HOT 5
- write_fcs mixes up PNN and PNS labels HOT 1
- Parsing an FCS file with variable int sizes fails raises an exception (and it could parse much faster) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowio.