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)

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.2.16.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

flowmepy-0.2.16-cp38-cp38-win_amd64.whl (21.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

File details

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

File metadata

  • Download URL: flowmepy-0.2.16.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.3 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.6

File hashes

Hashes for flowmepy-0.2.16.tar.gz
Algorithm Hash digest
SHA256 1379b58ac770a2dd443b533e53d2b91fdd7e17fc25535b2b0bc4df6d4fa0d823
MD5 a2bac9caac0b6a2af45fe188c406a652
BLAKE2b-256 37d4ef5c45127ca983162a1928ebdcf268ae31a1ae06f1e8eb24520513acae94

See more details on using hashes here.

File details

Details for the file flowmepy-0.2.16-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: flowmepy-0.2.16-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 21.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.3 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.6

File hashes

Hashes for flowmepy-0.2.16-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 45ed65382a91d700177b57d50053353f0a184f6e3440fd67fe71ed3158fd335c
MD5 a95e5f70f344876b089b1860133db6fa
BLAKE2b-256 b9aa184f910391d3cf54d02a09d392fca7aff4b1552e17ebbcc9d61d21eabae0

See more details on using hashes here.

Supported by

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