Read fluorescence correlation spectroscopy (FCS) data files
Project description
Fcsfiles is a Python library to read Carl Zeiss(r) ConfoCor(r) RAW and ASCII measurement data files.
- Author:
- License:
BSD 3-Clause
- Version:
2023.8.30
Quickstart
Install the fcsfiles package and all dependencies from the Python Package Index:
python -m pip install -U fcsfiles
See Examples for using the programming interface.
Source code and support are available on GitHub.
Requirements
This revision was tested with the following requirements and dependencies (other versions may work):
Revisions
2023.8.30
Fix linting issues.
Add py.typed marker.
Convert to Google style docstrings.
Drop support for Python 3.8 and numpy < 1.22 (NEP29).
2022.9.28
Update metadata.
2022.2.2
Add type hints.
Use float64 or int64 for ConfoCor3Fcs arrays.
Drop support for Python 3.7 and numpy < 1.19 (NEP29).
2021.6.6
Remove support for Python 3.6 (NEP 29).
2020.9.18
Relax ConfoCor3Raw header requirement.
Support os.PathLike file names.
2020.1.1
Remove support for Python 2.7 and 3.5.
Notes
“Carl Zeiss” and “ConfoCor” are registered trademarks of Carl Zeiss, Inc.
The use of this implementation may be subject to patent or license restrictions.
The API is not stable yet and is expected to change between revisions.
This module does not read flow cytometry standard FCS files.
Examples
Read the CountRateArray from a ConfoCor3 ASCII file as a numpy array:
>>> fcs = ConfoCor3Fcs('ConfoCor3.fcs') >>> fcs['FcsData']['FcsEntry'][0]['FcsDataSet']['CountRateArray'].shape (60000, 2) >>> print(fcs) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE Carl Zeiss ConfoCor3 - measurement data file - version 3.0 ANSI BEGIN FcsData 30000 Name = Fluorescein Comment = AverageFlags = Repeat|Position|Average_Fit_Results SortOrder = Channel-Repeat-Position-Kinetics BEGIN FcsEntry1 10000 ...
Read data and metadata from a ConfoCor3 RAW file:
>>> fcs = ConfoCor3Raw('ConfoCor3.raw') >>> fcs.filename 'f5ee4f36488fca2f89cb6b8626111006_R1_P1_K1_Ch1.raw' >>> fcs.frequency 20000000 >>> times = fcs.asarray() >>> times[10858] 1199925494 >>> times, bincounts = fcs.asarray(bins=1000) >>> times.shape (1000,) >>> bincounts[618] 23 >>> fcs.close()
Read data and metadata from a ConfoCor2 RAW file:
>>> fcs = ConfoCor2Raw('ConfoCor2.raw') >>> fcs.frequency 20000000 >>> ch0, ch1 = fcs.asarray() >>> ch1[4812432] 999999833 >>> times, ch0, ch1 = fcs.asarray(bins=1000) >>> times.shape (1000,) >>> ch1[428] 10095 >>> fcs.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fcsfiles-2023.8.30-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67dbc852b4eb15ab41991e07539482cb3c050f6dfd3c1209d08d8dd120dad31 |
|
MD5 | 929a6652436c41c43ace264b66e6a561 |
|
BLAKE2b-256 | a1a2838fb2a90d34b32eb6aef24bf75839a0bb04c9b96791fff6252f01a6707f |