Skip to content

Fixed empty timestep value issue #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025
Merged

Conversation

ikonsta
Copy link
Contributor

@ikonsta ikonsta commented Mar 26, 2025

Added try-except for timestep reading, because in some cases timestep key was in dictionary, but the value was equal to - " " e.g. string with one space

Added try-except for timestep reading, because in some cases timestep key was in dictionary, but the value was equal to - " " e.g. string with one space
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.00%. Comparing base (3e9b06f) to head (05232ba).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/flowio/flowdata.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #33      +/-   ##
===========================================
- Coverage    93.76%   93.00%   -0.76%     
===========================================
  Files            7        7              
  Lines          481      486       +5     
===========================================
+ Hits           451      452       +1     
- Misses          30       34       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@whitews
Copy link
Owner

whitews commented Mar 26, 2025

Thanks Konstantin!

For future reference, see related discussion here: whitews/FlowKit#247

@whitews whitews merged commit 28257b2 into whitews:develop Mar 26, 2025
5 of 7 checks passed
@whitews
Copy link
Owner

whitews commented Mar 27, 2025

Hi Konstantin,

I'm looking through the files in the Zenodo archive link you provided in the previous PR and having trouble finding an example with the empty string timestep value. Could you to let me know which ones have these values? Just want to add it to the tests.

Thanks,
Scott

whitews added a commit that referenced this pull request Mar 27, 2025
@ikonsta
Copy link
Contributor Author

ikonsta commented Mar 27, 2025

Hi Scott,

Sure! It was Ki67-117 tube 1.LMD sample. By the way, the next sample e.g. Ki67-117 tube 2.LMD has two samples within it, so if I understood correctly there is no way currently to read those samples using fk.Sample (only with flowio.read_multiple_data_sets), but this I should probably raise in a separate issue.

Sincerely,
Konstantin

@whitews
Copy link
Owner

whitews commented Mar 27, 2025

Thanks! I'll include that one in the tests.

For the multi-set samples, the read_multiple_data_sets function is the way to read those and it returns a list of FlowData instances corresponding to each sample in the file. For reading a set of FCS files where you do not know which are multi-set, I created the custom error MultipleDataSetsError to catch these files (e.g. in a loop):

for fp in fcs_file_paths:
    try:
        fd = flowio.FlowData(fp)
    except MultipleDataSetsError:
        fd_list = flowio.read_multiple_data_sets(fp)

@whitews
Copy link
Owner

whitews commented Mar 27, 2025

Sorry, I didn't realize you were referencing FlowKit. In FlowKit there is a similar function read_multi_dataset_fcs (docs here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants