Skip to main content

a C++ FCS Loader

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flowmepy-0.4.1.tar.gz (23.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flowmepy-0.4.1-cp314-cp314-win_amd64.whl (55.5 MB view details)

Uploaded CPython 3.14Windows x86-64

flowmepy-0.4.1-cp314-cp314-manylinux_2_34_x86_64.whl (70.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

flowmepy-0.4.1-cp313-cp313-win_amd64.whl (54.4 MB view details)

Uploaded CPython 3.13Windows x86-64

flowmepy-0.4.1-cp313-cp313-manylinux_2_34_x86_64.whl (70.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

flowmepy-0.4.1-cp312-cp312-win_amd64.whl (54.4 MB view details)

Uploaded CPython 3.12Windows x86-64

flowmepy-0.4.1-cp312-cp312-manylinux_2_34_x86_64.whl (70.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

flowmepy-0.4.1-cp311-cp311-win_amd64.whl (54.4 MB view details)

Uploaded CPython 3.11Windows x86-64

flowmepy-0.4.1-cp311-cp311-manylinux_2_34_x86_64.whl (70.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

flowmepy-0.4.1-cp310-cp310-win_amd64.whl (54.4 MB view details)

Uploaded CPython 3.10Windows x86-64

flowmepy-0.4.1-cp310-cp310-manylinux_2_34_x86_64.whl (70.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file flowmepy-0.4.1.tar.gz.

File metadata

  • Download URL: flowmepy-0.4.1.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flowmepy-0.4.1.tar.gz
Algorithm Hash digest
SHA256 5c33484ec18d78e08e14b5accccb7859a4345a3a6fa2a3cbf95957dff80d4403
MD5 81d937b9f53ba00cae31847eb1a1e16e
BLAKE2b-256 e3d976f9f9407febe1f7affd06b2d62653e5d0893f3866dfc15760f820ef53a9

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: flowmepy-0.4.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 55.5 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flowmepy-0.4.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3f93e2016236627ec6ff32122612316a28bde21dc0cacf0a29c332dbca0319d5
MD5 118fe33b2446133ff4d13604a63b77e9
BLAKE2b-256 1c1d914474391f119473c2491f4467ff5edd4892e4857be2f0ce5209892f4dc5

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for flowmepy-0.4.1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9f4aa9044c2a1537885739bbfe3b6c816784314188c52f0515c78af0f2fb6a55
MD5 efa7a7f488f03308bdeb6495335fabe7
BLAKE2b-256 5ea7eeb843783a2d8917b03dd6b54d68e969e76eccde55ccfbf063966382311a

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: flowmepy-0.4.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 54.4 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flowmepy-0.4.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cb2f715e0ce80513df4bf932f835f320194ffb221bfe11c0c275bea5e7701478
MD5 8635db33c1508c8e389067cab2135799
BLAKE2b-256 ade44d2da6f6b1fa048b4930d3ee8e1eb20fbc2ae09e3c1ca155218720484077

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for flowmepy-0.4.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 14dea6afcd42cd7454f4726607af01217cffe6bdd6b98c881885f07399591638
MD5 20b36a02f82a574171d0abccc1355d39
BLAKE2b-256 27ba84de7a70b6c1436a816147189d7f255bc52236569c564353ced616a5c1a0

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: flowmepy-0.4.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 54.4 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flowmepy-0.4.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5991d0e7803e7a8bcd10ab5b5e575cab85b2b412fa5fb7ef4d457284c2db7a99
MD5 314d5578dd944e8f6afb3f81816d9b82
BLAKE2b-256 75caf9734ec542e968915d7c25d68d9f75ceb32f384d1214375c23039130495c

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for flowmepy-0.4.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0240d146b0ea9615dfd9846db96906e293b3df0cc72fe1cca84b6cea06beef86
MD5 8721f0525e5c15034e673313188dc13a
BLAKE2b-256 4362cd54f05c78fa68250ccf70e7af9b4a72edb4020a433178202bacb890cb69

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: flowmepy-0.4.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 54.4 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flowmepy-0.4.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d700f36de872fe0f17f5a97fcbc6837000fa126f593478bbf5b879558a472cc9
MD5 757287486c58e8b0d2f96c8d4089ee9e
BLAKE2b-256 259286e81550b71e002f16c9fe77304921be8f521c72164becd1514e6ca9c504

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for flowmepy-0.4.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ea8cfc8abdaf2a7fab21e9aa788a290e79af8fc0767db4d6e6f889c2d92ef5a1
MD5 fc709da008757613fc6b0f287103fd53
BLAKE2b-256 c2b794e85288fcdc8bd950a01d5372703c1f2830c4770669132e017f92be1db8

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: flowmepy-0.4.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 54.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flowmepy-0.4.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2b2f6cf7216548001d62526260ce8c1aaed4460300d17608b16e286df4a1fb3e
MD5 3f2bbecb1440ff5a8c5f2db6f7a60511
BLAKE2b-256 1dfc4f08dce14a609ebde0ec79860f644fd95b1f0f6aff54b911f46c17b568a2

See more details on using hashes here.

File details

Details for the file flowmepy-0.4.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for flowmepy-0.4.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fe3fbf20696e3b39cffa9d5ac296c5cd3a8ec67033afe33090c2256c0cb5b6e1
MD5 4ccd8a19a36a534003bc3e0c3e213b1f
BLAKE2b-256 712e7afbc3ae4e96f6e42a2a788c4622e5c0e9d6cce622242d5a882f13140c35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page