Skip to main content

FlowMePy - a Python API for FlowMe

Load FCS 2.0/3.0/3.1 files with super fast C++ code. The FCS processing includes compensation and logicle transform. If FacsDiva projects (XMLs) or Kaluza projects (analysis) are provided, the FlowMePy will label events according to the gates contained.

Read the Docs

Install

We provide a pre-compiled package (currently Windows only) which can be installed using:

pip install flowmepy

Dependencies

  • python (>= 3.6)
  • CMake (>= 3.14.1)
  • Qt SDK or the compiled sources (>= 5.11.0)
  • OpenCV (>= 4.0.0)
  • Visual Studio (>= 2015) or gcc

Configure FlowMe using CMake (Windows only)

  • dir to ./flowme
  • copy CMakeUserPathsGit.cmake and rename it to CMakeUserPaths.cmake
  • add your library paths to the ${CMAKE_PREFIX_PATH} in CMakeUserPaths.cmake

Clone

We use submodules for flowme and pybind11 if you clone using

$ git clone --recursive git@smithers.cvl.tuwien.ac.at:kwc/dev/flowme-python-api.git

everything should be fine. In case the repository's flowme or pybind11 folders are empty, check if the pull worked as expected:

  • don't forget --recursive
  • windows users: it's easiest if you do not password protect the ssh key

Build

$ virtualenv env
$ source /env/bin/activate
$ python setup.py install

If anything did not work as expected, try building FlowMe as standalone package (see README). Then run the above command again.

You can remove old versions using pip:

$ pip uninstall FlowMePy
Successfully uninstalled flowmepy-0.0.3

Packaging FlowMePy

Update pip (on Windows & Linux), then create the wheel:

python -m pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel

where sdist creates the source archive (without C++ files) and bdist_wheel creates the build package.

Then, upload the package:

python -m twine upload dist/*

in case you want to test your package, use this for uploading:

python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Unfortunately, test.pypi.org rejects linux binary wheels - so linux users must build packages on their own. You can install this package using:

pip install -i https://test.pypi.org/simple/ flowmepy --extra-index-url https://pypi.org/simple

Test

Test flowmepy using:

$ python -m unittest discover -v test

build the docs

$ cd docs
$ make html

The compiled docs are here: docs/_build/index.html

FlowMePy in 2 minutes

load an FCS using

import flowme

filepath = "./flowme/src/data/samples/FacsDiva.xml"
sample = flowme.fcs(filepath)
events = sample.events()       # get the event data (pandas.DataFrame)
gates = sample.gate_labels()   # get gating (GT) information (pandas.DataFrame)

Per default events are not filtered by any Gate. However, it is possible to pass the name of a filtering gate:

import flowme

filepath = "./flowme/src/data/samples/FacsDiva.xml"
filter_gatename = "viable"
sample = flowme.fcs(filepath, filter_gatename)

FlowMe provides a built-in data cleaning function that prunes events accumulated at the measured maximum.

import flowme

filepath = "./flowme/src/data/samples/FacsDiva.xml"
sample = flowme.fcs(filepath)
events, gates = sample.filtered_data(cleanDataPercent=0.001)

Handling multi tube files

Some files may contain multiple tubes. The following code shows how available tubes can be queried as well as how to select from which tube to load the data.

import flowme


tube_names = sample.get_tube_names()
sample.set_tube_index(len(tub_names) - 1)
events = sample.events() #events of last tube in sample

mascot

Release files for flowmepy 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowmepy 0.4.1
File Size Uploaded
flowmepy-0.4.1.tar.gz 23.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for flowmepy 0.4.1
File
flowmepy-0.4.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
flowmepy-0.4.1-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details
flowmepy-0.4.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
flowmepy-0.4.1-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details
flowmepy-0.4.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
flowmepy-0.4.1-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
flowmepy-0.4.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
flowmepy-0.4.1-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details
flowmepy-0.4.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
flowmepy-0.4.1-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details

Total release size: 626.2 MB

Release files / flowmepy-0.4.1.tar.gz

Download URL flowmepy-0.4.1.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5c33484ec18d78e08e14b5accccb7859a4345a3a6fa2a3cbf95957dff80d4403
BLAKE2b-256 checksum
How to use checksums
e3d976f9f9407febe1f7affd06b2d62653e5d0893f3866dfc15760f820ef53a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp314-cp314-win_amd64.whl

Download URL flowmepy-0.4.1-cp314-cp314-win_amd64.whl
Size 55.5 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
3f93e2016236627ec6ff32122612316a28bde21dc0cacf0a29c332dbca0319d5
BLAKE2b-256 checksum
How to use checksums
1c1d914474391f119473c2491f4467ff5edd4892e4857be2f0ce5209892f4dc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL flowmepy-0.4.1-cp314-cp314-manylinux_2_34_x86_64.whl
Size 70.6 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
9f4aa9044c2a1537885739bbfe3b6c816784314188c52f0515c78af0f2fb6a55
BLAKE2b-256 checksum
How to use checksums
5ea7eeb843783a2d8917b03dd6b54d68e969e76eccde55ccfbf063966382311a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp313-cp313-win_amd64.whl

Download URL flowmepy-0.4.1-cp313-cp313-win_amd64.whl
Size 54.4 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
cb2f715e0ce80513df4bf932f835f320194ffb221bfe11c0c275bea5e7701478
BLAKE2b-256 checksum
How to use checksums
ade44d2da6f6b1fa048b4930d3ee8e1eb20fbc2ae09e3c1ca155218720484077
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL flowmepy-0.4.1-cp313-cp313-manylinux_2_34_x86_64.whl
Size 70.6 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
14dea6afcd42cd7454f4726607af01217cffe6bdd6b98c881885f07399591638
BLAKE2b-256 checksum
How to use checksums
27ba84de7a70b6c1436a816147189d7f255bc52236569c564353ced616a5c1a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp312-cp312-win_amd64.whl

Download URL flowmepy-0.4.1-cp312-cp312-win_amd64.whl
Size 54.4 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
5991d0e7803e7a8bcd10ab5b5e575cab85b2b412fa5fb7ef4d457284c2db7a99
BLAKE2b-256 checksum
How to use checksums
75caf9734ec542e968915d7c25d68d9f75ceb32f384d1214375c23039130495c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL flowmepy-0.4.1-cp312-cp312-manylinux_2_34_x86_64.whl
Size 70.6 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
0240d146b0ea9615dfd9846db96906e293b3df0cc72fe1cca84b6cea06beef86
BLAKE2b-256 checksum
How to use checksums
4362cd54f05c78fa68250ccf70e7af9b4a72edb4020a433178202bacb890cb69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp311-cp311-win_amd64.whl

Download URL flowmepy-0.4.1-cp311-cp311-win_amd64.whl
Size 54.4 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
d700f36de872fe0f17f5a97fcbc6837000fa126f593478bbf5b879558a472cc9
BLAKE2b-256 checksum
How to use checksums
259286e81550b71e002f16c9fe77304921be8f521c72164becd1514e6ca9c504
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL flowmepy-0.4.1-cp311-cp311-manylinux_2_34_x86_64.whl
Size 70.6 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
ea8cfc8abdaf2a7fab21e9aa788a290e79af8fc0767db4d6e6f889c2d92ef5a1
BLAKE2b-256 checksum
How to use checksums
c2b794e85288fcdc8bd950a01d5372703c1f2830c4770669132e017f92be1db8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp310-cp310-win_amd64.whl

Download URL flowmepy-0.4.1-cp310-cp310-win_amd64.whl
Size 54.4 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
2b2f6cf7216548001d62526260ce8c1aaed4460300d17608b16e286df4a1fb3e
BLAKE2b-256 checksum
How to use checksums
1dfc4f08dce14a609ebde0ec79860f644fd95b1f0f6aff54b911f46c17b568a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / flowmepy-0.4.1-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL flowmepy-0.4.1-cp310-cp310-manylinux_2_34_x86_64.whl
Size 70.6 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
fe3fbf20696e3b39cffa9d5ac296c5cd3a8ec67033afe33090c2256c0cb5b6e1
BLAKE2b-256 checksum
How to use checksums
712e7afbc3ae4e96f6e42a2a788c4622e5c0e9d6cce622242d5a882f13140c35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.4.1 This release

11 release files

0.4.0

6 release files

0.2.16

2 release files

0.2.14

2 release files

0.2.12

2 release files

0.2.1

2 release files

0.2.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page